SaaS Prospect Outreach & Conversion Agent
A LangGraph-powered agent that analyzes B2B prospects by querying a CRM for qualification data, searching Visa product playbooks for value props, and drafting personalized outreach emails. Try one of the example queries or type your own below.
Try it
~10–20s per queryOr try an example:
A dual-tool agent: CRM lookups + product playbook search, routed by intent
This agent simulates a BDR's pre-call research workflow. Given a prospect query, it queries a SQLite CRM for firmographics and qualification (5Cs and BANT), searches a vector database of Visa B2B product playbooks for relevant value propositions, and synthesizes both into an executive-ready outreach plan with a personalized email draft — all routed autonomously by a LangGraph agent that decides which tools are needed for each query.
The architecture separates concerns cleanly: the Cloudflare Worker is the only component that holds API keys; the Northflank deployment server runs the agent logic; Cloudflare D1 and ChromaDB Cloud provide the data layer. The portfolio frontend and a Telegram bot are thin presentation layers — they call the same agent endpoint and display the same structured output.
Key design decisions
- Dual-tool architecture with conditional routing: the LangGraph agent classifies intent first, then conditionally dispatches to the CRM tool, the RAG tool, or both — a prospect evaluation needs both tools; a "list all contacts" query skips RAG entirely; a "what are the discovery questions?" query skips the CRM.
- All secrets live in Cloudflare Workers, never in the agent or frontend. The Python LangGraph agent calls a Worker API gateway that holds the D1, ChromaDB, and DeepInfra credentials server-side. The Next.js frontend calls the agent via a Northflank deployment running FastAPI + LangGraph — no API keys ever reach the browser.
- SQLite-as-a-service via Cloudflare D1: the CRM database is SQLite under the hood, but D1 replicates it to the edge. The Worker and D1 share the SIN colo, so CRM queries resolve in under 2ms. The Text-to-SQL tool injects the full schema, relationship map, and few-shot examples into every LLM prompt to keep generated SQL accurate and safe (SELECT-only enforcement).
- RAG with metadata-filtered retrieval: the product playbooks are chunked into 500-char segments with overlapping paragraphs, embedded via BAAI/bge-large-en-v1.5 (1024 dimensions), and stored in ChromaDB Cloud. When the CRM tool discovers a prospect's product interests, the agent automatically scopes the RAG search to only those products — a prospect interested in Visa Advanced Authorization never sees chunks about Visa Spend Clarity.
- The synthesis prompt is context-aware: if CRM data is present, it produces a full BDR outreach plan (5Cs qualification, BANT assessment, recommended approach, and a personalized email draft under 150 words). If only RAG data is present, it produces a product knowledge brief. If neither tool was needed, it handles general queries gracefully rather than forcing the BDR template.
Tech stack
- LangGraph — Agentic orchestration: intent routing, state management
- Cloudflare D1 — Serverless SQLite CRM: 12 prospects, 5Cs & BANT
- ChromaDB Cloud — Vector store: 163 chunks across 5 Visa product playbooks
- DeepInfra — LLM (DeepSeek-V4-Pro) + embeddings (BAAI/bge-large)
- Cloudflare Workers — API gateway: holds secrets, proxies all external calls
- Northflank — FastAPI + LangGraph host: always-on, free Developer Sandbox
- Next.js + Cloudflare Pages — Portfolio frontend: static export, live demo
- LangSmith — Observability: per-node traces, token counts, latency