How I Built an Agentic AI System That Generated $2M+ ARR
This is the architecture behind Speculo.ai — an autonomous outreach system I designed and built that replaced an entire inside sales team. Here is how it works, what the hard parts were, and what I would do differently.
The Problem We Were Solving
Speculo needed to reach thousands of qualified prospects weekly across email and phone. A human SDR team doing this at scale costs $500K+ per year in salaries alone, with inconsistent quality and limited operating hours. The alternative: build an AI system that does it autonomously, at any scale, at any hour, with consistent quality.
The Architecture: Five Agents, One Pipeline
The entire system runs on LangGraph, which handles the orchestration, state management, and conditional routing between agents. Here is the pipeline:
Agent 1: Research. Given a company name and URL, this agent pulls recent news, hiring signals, funding announcements, and leadership information using parallel web searches. It constructs a structured company profile including the most relevant hook for outreach.
Agent 2: Personalization. Takes the company profile and generates a personalized email. Not a mail-merge template — a contextually aware message that references the company specifically. Subject lines, opening lines, and CTAs are all generated per prospect. This agent also decides whether email or phone is the better first touch.
Agent 3: Email delivery. Manages SMTP routing, sending windows, rate limiting, and bounce handling. Emails go out through warm domains with proper SPF/DKIM/DMARC. Bounce signals feed back into the lead scoring model.
Agent 4: Voice call. For high-priority prospects, a voice agent calls using a realistic ElevenLabs voice delivered through Twilio. The agent handles the full conversation flow: introduction, qualification questions, objection handling, and calendar booking. Calls are transcribed and scored in real time.
Agent 5: Follow-up sequencing. Tracks engagement and orchestrates multi-touch follow-up. Opened email but no reply? Schedule a call. Answered the call but not ready to book? Send a follow-up email with a case study. The sequencing logic is a state machine managed by LangGraph.
The hardest engineering problem was not the AI. It was the state management — ensuring that each prospect moved through the right sequence without duplicate touches, skipped steps, or race conditions when multiple agents were active simultaneously.
What Surprised Me
The voice agent converted better than the email agent on cold outreach. We expected the opposite. People pick up the phone and, when the conversation is genuinely helpful and human-sounding, they engage. The ElevenLabs voice quality crossed a threshold where most people did not realize they were talking to an AI unless they specifically asked.
Personalization had a bigger impact than send volume. A smaller batch of highly personalized emails outperformed a larger batch of lightly personalized ones on reply rate every time we tested it.
The Key Technical Decisions
LangGraph over LangChain. LangGraph's explicit state graph makes complex multi-step agent flows debuggable and predictable. With LangChain chains, debugging a failure in step 6 of 8 was painful. With LangGraph, every state transition is logged and inspectable.
pgvector for lead scoring. We embed company profiles and use cosine similarity against a database of won deals to score new leads. Simple, fast, and surprisingly accurate.
Async everywhere. At 117K emails in 6 hours, synchronous processing would never work. Every agent runs async. Research, personalization, and delivery happen in parallel batches with proper backpressure.
Building an autonomous AI system?
I have designed and shipped agentic pipelines that handle millions of interactions. Happy to discuss your architecture.
Get in TouchWritten by Hasnain Ali, Senior AI Engineer. Open to contracts and full-time roles building production LLM and agentic systems.