How annu-chauhan/autostream-agent-ai works
AutoStream is a conversational agent that classifies each user message, answers greetings or pricing questions, and guides high-intent users through multi-turn lead capture. The CLI owns input, persistent conversation data, graph invocation, and response display. The LangGraph workflow routes intent, retrieves pricing from the local JSON knowledge base, and invokes lead capture after the lead-collection node. The separate AgentState class is not wired into the sampled runtime; WhatsApp is documented only as a possible extension.
Main entry points: graph.py LangGraph workflow · main.py CLI loop · rag.py Pricing lookup · intent.py Intent detection
Components 12
Conversation entry
- CLI loop
main.py - Conversation state
main.py
Agent workflow
- LangGraph workflow
agent/graph.py - Intent detection
agent/intent.py - Greeting response
agent/graph.py - Pricing response
agent/graph.py
Pricing knowledge
- Pricing lookup
agent/rag.py - Knowledge JSON
data/knowledge.json
Lead capture
- Lead collection
agent/graph.py - Capture dispatch
agent/graph.py - Lead capture tool
agent/tools.py
Other components
- User
Connections 14
- User → CLI loop: enters message
- CLI loop → Conversation state: updates state
- CLI loop → LangGraph workflow: invokes graph
- Conversation state → LangGraph workflow: provides state
- LangGraph workflow → Conversation state: returns state
- LangGraph workflow → Intent detection: detects intent
- LangGraph workflow → Greeting response: routes greeting
- LangGraph workflow → Pricing response: routes pricing
- LangGraph workflow → Lead collection: routes lead
- Pricing response → Pricing lookup: gets pricing
- Pricing lookup → Knowledge JSON: reads pricing
- Lead collection → Capture dispatch: dispatches after collection
- Capture dispatch → Lead capture tool: captures details
- CLI loop → User: displays response