r/AIAgents 2026 is full of posts about outbound agents built on Claude Code. The recipe: Claude Code as the reasoning loop, Scavio as the research backend, and a CRM write-back. This tutorial ships the minimum viable outbound agent with prospect-triggered research.
Prerequisites
- Claude Code latest
- A Scavio API key
- An email/CRM destination (Gmail, HubSpot)
- Node.js 20+
Walkthrough
Step 1: Register Scavio MCP in Claude Code
Gives Claude Code tool access to Scavio search.
{
"mcpServers": {
"scavio": { "command": "scavio-mcp", "env": { "SCAVIO_API_KEY": "sk_live_..." } }
}
}Step 2: Write the research skill
A Claude Code skill that triggers on new prospects.
// ~/.claude/skills/outbound-research.md
Instructions: For each prospect, use scavio to search:
1. Company recent news
2. Prospect LinkedIn activity
3. Reddit threads about their industry
Return a 3-bullet brief.Step 3: Draft personalized email
Pipe the brief into an email template in Claude Code.
// Claude Code prompt
> Using the brief from outbound-research for {prospect_name} at {company}, draft a 3-sentence cold email referencing the most recent specific signal.Step 4: Queue for send
Save drafts to Gmail API or a review folder.
// ~/.claude/skills/queue-draft.md
After drafting, call the Gmail create_draft tool to queue for human review.Step 5: Run on a schedule
A cron or GitHub Action triggers the agent for each new prospect.
# cron
0 9 * * * cd ~/projects/outbound && claude-code run ./agent.mdPython Example
import os, requests
API_KEY = os.environ['SCAVIO_API_KEY']
def research(prospect):
queries = [
f'"{prospect["company"]}" news',
f'site:linkedin.com/posts "{prospect["name"]}"',
f'{prospect["industry"]} pain points'
]
out = []
for q in queries:
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': API_KEY},
json={'query': q, 'num_results': 3})
out.append(r.json().get('organic_results', []))
return out
print(research({'name': 'Jane Doe', 'company': 'Acme', 'industry': 'saas'}))JavaScript Example
const API_KEY = process.env.SCAVIO_API_KEY;
export async function research(prospect) {
const queries = [`"${prospect.company}" news`, `site:linkedin.com/posts "${prospect.name}"`];
const out = [];
for (const q of queries) {
const r = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ query: q, num_results: 3 })
});
out.push(((await r.json()).organic_results || []).slice(0, 3));
}
return out;
}Expected Output
Per-prospect research brief + email draft in Gmail drafts ready for human send. Typical run: 45s per prospect, $0.02 in Scavio credits.