Personalizing B2B cold outreach is a massive time sink. It usually takes 20 minutes of manual research per lead to write an email that doesn't sound like a robot. I wanted to see if I could automate the research phase using agentic composition, so I built a multi-agent orchestrator using Python and OpenRouter.
Here is the breakdown of the architecture and how I routed the data.
The Problem
If you just ask an LLM to "write a sales email", it hallucinates or sounds generic. It needs grounded context. We needed a system that could read live web pages, run searches for recent news, and synthesize it all before drafting.
The Agent Stack
I deployed specialized tools using OpenRouter as the underlying engine:
- URLReaderAgent: Scrapes the prospect's primary domain and extracts the core value proposition.
- SearchAgent: Hits the web for recent news, funding announcements, or executive moves to find a "trigger event."
- CodeAgent: Handles unstructured data to infer the exact industry vertical.
- SalesOrchestratorAgent: Takes the JSON payload from the first three agents and uses a strict system prompt to draft a highly constrained, 3-sentence pitch.
The Result
The system completes an end-to-end run in about 11.4 seconds.
┌───────────────────────────┐
│ 4-Agent Orchestrator │
│ Free Tier OpenRouter Mode │
└───────────────────────────┘
Type 'exit' to quit.
Enter Target Company URL (e.g., https://example.com): https://anthropic.com
Initializing research loop...
> Fetching https://anthropic.com...
> Searching web for: Anthropic recent news funding 2024 2025...
> Inferring industry vertical...
> Drafting pitch... done
The orchestrator pattern is highly transferable. The exact same shape works for inbound lead triage or support escalations.
I've open-sourced the base architecture so you can run it locally for free. Check out the repository here: https://github.com/osamatech786/AI-Sales-Agent.
If you want to see how I scale this for production with pgvector and custom knowledge bases, I break down my full enterprise stack on my portfolio: https://osamatech786.github.io.
Let's Connect:
- LinkedIn: Connect with me on LinkedIn
- Email: osamatech786@gmail.com
Let me know in the comments if you have questions about the implementation!

Top comments (0)