How to Build an AI Sales Agent with Claude Code and AgentPatch

AI sales agents are one of the fastest-growing searches in AI right now. The appeal is obvious: an agent that finds prospects, researches them, and sends tailored outreach without you copying and pasting between tabs. This post shows how to build one using Claude Code and AgentPatch.

What Makes This Different from CRM Automation

Most sales automation tools run on templates and rules. You set up a sequence, write a few email variants, and blast them to a list. The “personalization” is a merge field: Hi {first_name}, I noticed {company_name} is in {industry}.

An AI sales agent works differently. It reasons about each prospect. It reads their website, checks their reviews, looks at their online presence, and writes outreach based on what it finds. The output is closer to what a good SDR would write after spending ten minutes on research.

The building blocks are clear: a way to find businesses, a way to research them, and a way to send email. AgentPatch provides all three through tools your agent can call during a session.

Setup

Connect AgentPatch to your AI agent to get access to the tools:

Install the AgentPatch CLI (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Then use it:

ap search "web search"
ap run agentpatch google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

Claude Code

Run this command to add AgentPatch as an MCP server:

claude mcp add -s user --transport http agentpatch https://agentpatch.ai/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard. Claude Code discovers all AgentPatch tools automatically.

OpenClaw

Add AgentPatch to ~/.openclaw/openclaw.json:

{
  "mcp": {
    "servers": {
      "agentpatch": {
        "transport": "streamable-http",
        "url": "https://agentpatch.ai/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_API_KEY"
        }
      }
    }
  }
}

Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard. Restart OpenClaw and it discovers all AgentPatch tools automatically.

The Workflow

The AI sales agent runs a three-step pipeline: find, research, reach out.

Step 1: Find Prospects with Google Maps

Start by telling Claude Code what you’re looking for:

“Search Google Maps for independent coffee shops in Austin, TX. Find 5 that have fewer than 50 reviews.”

Claude Code calls the Google Maps tool and returns a list of businesses with names, addresses, ratings, and review counts. It filters based on your criteria.

Step 2: Research Each Prospect

Next, have the agent dig into each one:

“For each coffee shop, search Google for their website. Check if they have online ordering, a social media presence, and whether their site is mobile-friendly. Note anything that looks like a gap.”

Claude Code runs a Google Search for each business and reads through the results. It builds a short research profile: this one has no website at all, that one has a WordPress site with broken links, another has an Instagram but no online ordering.

This is where the agent earns its keep. A rule-based system can’t evaluate whether a website “looks outdated” or spot that a business is active on Instagram but has no way to take orders online. The agent can.

Step 3: Send Personalized Outreach

Now the agent writes and sends:

“Draft a short, friendly outreach email to each shop. Reference the specific issue you found. Offer to help. Send them to my test inbox at [email protected].”

The emails come out different for each prospect because the research was different. One email mentions the broken online ordering link. Another mentions that the shop has great reviews but no website to capture that traffic. A third notes their active social media following and suggests converting followers into repeat customers.

Example Prompts

Here are a few prompts you can adapt for different sales use cases:

Local service businesses:

“Find 10 plumbers in Denver with websites. Check which ones have no online booking. Draft outreach offering a booking integration.”

SaaS prospects:

“Search Google News for companies that recently raised Series A funding. For each, check their careers page for engineering job postings. Draft outreach about our developer tools.”

E-commerce:

“Search Google Maps for boutique clothing stores in Portland. Check which ones have an online store. For those without one, draft an email about Shopify setup services.”

Costs

A full pipeline run for 5 prospects uses about 5 Maps calls (375 credits), 5 Google Searches (250 credits), and 5 emails (500 credits). That’s 1,125 credits total, or roughly $0.11. You get 10,000 free credits on signup, enough for about 8 full runs to test the workflow.

Wrapping Up

An AI sales agent built this way does real research and writes real personalized outreach. It’s not a template engine. The combination of Maps, Search, and Email through AgentPatch gives Claude Code (or any connected agent) everything it needs to run a prospecting pipeline. Try it at agentpatch.ai.