Inspiration
Businesses lose a ton of time answering the same calls every day (prices, hours, rules). If they don’t answer, they lose customers. If they do answer, they often spend time on people who are not serious buyers. We wanted a voice agent that does not just reply, but qualifies callers and only forwards the best leads, hence the name LeadFlow.
What it does
LeadFlow is an AI call agent that talks to potential customers and captures qualified leads. 1) It answers customer questions using the company’s real policy (RAG) - It doesn't guess. 2) Switches from support to sales by asking simple qualifying questions. 3) If the caller shows intent, it collects name and phone number and saves it as a hot lead.
How we built it
1) Website call UI (HTML/CSS/JS) triggers a WebRTC voice call via Vapi.ai 2) FastAPI backend exposes a /vapi-config endpoint and streams assistant responses 3) We used ngrok to securely expose our local FastAPI server to the internet, so Vapi could reach our /vapi-config endpoint. 4) LangGraph state machine drives the conversation flow and tool usage 5) RAG pipeline: we ingest company_policy.pdf → chunk → embed → store in ChromaDB 6) Tools: 1. lookup_policy(query) retrieves relevant policy chunks 2.save_lead(name, phone) normalizes phone numbers + writes to Postgres
Challenges we ran into
1) Keeping voice interactions low-latency while still using RAG + tools 2) Preventing “hallucinated” prices/hours (forcing policy lookup before answering) 3) Clean call-ending logic (detecting the exact goodbye phrase reliably) 4) Georgian voice quality: We didn’t have a strong Georgian speaking voice model available, so we had to “hack” the setup by switching to a different model that handled Georgian better. Because of that, we also had to add our own logic for reading numbers (prices, hours, phone numbers), since the model didn’t reliably pronounce Georgian numbers correctly.
Accomplishments that we're proud of
1) Built a real voice agent, not just a chatbot. 2)RAG answers are grounded in a PDF knowledge base (more trustworthy for business info) 3)Successfully captures and stores real leads (with deduplication + DB constraints) 4)End-to-end demo: Call → Answer → Qualify → Save lead 5)Implemented a Georgian-speaking assistant in a very short amount of time and still kept it reliable
What we learned
1) Voice agents need stricter guardrails than chat (forcing tool use, keeping answers short and clear). 2) LangGraph makes multi-step conversational workflows much easier to control and debug. 3) We learned a general workflow for building AI agents: define the states, define tools, enforce when tools must be used, then iterate using real conversation logs. 4)Small UX details (number formatting, confirmations, end-of-call behavior) matter a lot in voice.
What's next for LeadFlow
1) Phone number support (real inbound calls, not only website). 2) Better Georgian handling (more natural speech, better number pronunciation, clearer understanding). 3) Expand what businesses can automate (lead qualification, intake forms over the phone, routing, and sending summarized leads to the team). 4) More business control (easy updates to company info so the assistant stays accurate).
Built With
- chromadb
- css
- fastapi
- html
- javascript
- langchain
- langgraph
- openai
- postgresql
- python
- streamlit
- vapi.ai
Log in or sign up for Devpost to join the conversation.