ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Build an Outbound Agent with Claude Code and Scavio
Tutorial

How to Build an Outbound Agent with Claude Code and Scavio

Use Claude Code's agent loop and Scavio's SERP and Reddit endpoints to build a personalized outbound agent that researches and drafts emails.

Get Free API KeyAPI Docs

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.

JSON
{
  "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.

Text
// 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.

Bash
# cron
0 9 * * * cd ~/projects/outbound && claude-code run ./agent.md

Python Example

Python
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

JavaScript
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

JSON
Per-prospect research brief + email draft in Gmail drafts ready for human send. Typical run: 45s per prospect, $0.02 in Scavio credits.

Related Tutorials

  • How to Build an SDR Research Agent
  • How to Replace Clay with Claude Code and Scavio
  • How to Enrich LinkedIn Post Comments for Buyer Intent

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Claude Code latest. A Scavio API key. An email/CRM destination (Gmail, HubSpot). Node.js 20+. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best Search API for Claude Code in 2026

Read more
Best Of

Best API for SDR Agents in 2026

Read more
Solution

Scale Cold Email with Real-Time Search Signals

Read more
Use Case

Outbound Agent Skillset

Read more
Use Case

Claude Code Rapid Agent Build (2-Day Pattern)

Read more
Workflow

Claude Code Web Search via Scavio MCP

Read more

Start Building

Use Claude Code's agent loop and Scavio's SERP and Reddit endpoints to build a personalized outbound agent that researches and drafts emails.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy