Inspiration
I'm a solo founder running NEXYT from Lahore, Pakistan. Client acquisition through cold outreach was time-consuming and repetitive, something I had to do manually every day but didn't want to keep doing by hand. So I built Phantom Protocol to automate it entirely.
What it does
Phantom Protocol is a fully autonomous, multi-agent outreach system built on six specialized agents:
- Strategist: analyzes the target ICP and builds a campaign strategy
- Hunter: discovers real companies matching the ICP using Serper.
- Researcher: enriches each lead with company context, LinkedIn data, and verified contact information via Hunter.io
- Outreacher: drafts genuinely personalized emails (not templates) and sends them during configured campaign hours
- Reply Handler: polls the inbox via IMAP, matches replies to outreach threads, and classifies intent
- Learning Agent: every 75 emails sent, analyzes what's working (subject lines, timing, angles) and triggers the strategist to reconsider it's strategy based on the learnings.
The entire pipeline runs autonomously after initial setup, with no manual intervention required.
How we built it
Phantom Protocol uses an event-driven, database-mediated architecture. Agents don't call each other directly. Each reads and writes state through MongoDB, coordinated via BullMQ job queues backed by Redis. This keeps every agent's context window clean (processing one lead at a time) and makes the system fully resumable if the server restarts.
Tech stack:
- Node.js + TypeScript
- LangGraph.js for agent orchestration
- Qwen3.7 (Max/Plus) via Alibaba Cloud DashScope API
- MongoDB for persistent state
- BullMQ + Redis for job orchestration
- Next.js dashboard for campaign monitoring
- Nodemailer (SMTP) + imapflow (IMAP) for email
- Deployed on Alibaba Cloud ECS via Docker
The Learning Agent is the core differentiator. After every 75 emails sent, it analyzes reply patterns across subject lines, email length, send timing, and messaging angle, then updates the campaign strategy document. Every subsequent email benefits automatically, without any agent needing to know a "learning system" exists. They simply read the latest strategy from MongoDB.
Challenges we ran into
- Balancing model cost with reasoning quality across seven agents, solved by tiering Qwen3.7-Max for reasoning-heavy agents and Plus for lighter tasks
- Building a reliable lead discovery pipeline that avoids directory/portal contamination in search results
- Ensuring email deliverability and contact verification before every send to keep bounce rates low
- Deploying a multi-service Docker stack (Node.js, Next.js, MongoDB, Redis) on Alibaba Cloud ECS for the first time
Accomplishments that we're proud of
- Built a fully autonomous, end-to-end outreach pipeline solo, from lead discovery to email sending to reply handling, in under three weeks
- Designed a DB-mediated, event-driven architecture where seven specialized agents coordinate without ever calling each other directly, making the system resumable and easy to debug
- Built a working Learning Agent that closes the loop. Campaign strategy genuinely improves after every 75 emails sent, based on real reply data
- Successfully deployed the entire stack (Node.js, Next.js, MongoDB, Redis, all seven agents) on Alibaba Cloud ECS via Docker
- Watched Phantom find, research, and draft outreach for real companies with 85-92% ICP fit scores, including pulling LinkedIn profiles and generating genuinely personalized emails, not templates
What we learned
- The real engineering cost of lead discovery. Filtering out directories, portals, and job listings from search results is harder than the search itself
- How to work within LLM cost tiers deliberately. Using Qwen3.7-Max for reasoning-heavy agents (Strategist, Researcher, Outreacher) and Plus for lighter formatting tasks made a meaningful difference in sustainable unit economics
- Deploying a multi-service Docker stack to a cloud VM for the first time. Nginx reverse proxying, cross- subdomain cookie handling, and environment-specific debugging that never shows up in local development
- How much manual, repetitive work goes into cold outreach that most existing tools (Apollo, Hunter.io, Instantly) still leave entirely to a human to orchestrate
What's next for Phantom Protocol
Phantom Protocol OSS is fully open source (AGPL v3) and self-hostable today. Next steps include multi-channel outreach (LinkedIn, Twitter), a conversational Control Agent exposed via MCP for programmatic orchestration, and Phantom Cloud, a managed, multi-tenant version with a cross-campaign learning layer (Phantom Intelligence Network) that improves outreach performance across all users.
Built With
- bullmq
- langgraph
- mongodb
- next.js
- node.js
- qwen
- redis
- typescript
Log in or sign up for Devpost to join the conversation.