How indrayaniparande/autostream-conversation-ai-agent works
AutoStream is a conversational sales agent that answers product questions and qualifies prospective customers. In the implemented CLI workflow, main.py dispatches each turn by the current stage; chat classifies intent, extracts lead details, and uses retrieval for product inquiries. High-intent users are prompted for name, email, and platform before lead capture. The README describes LangGraph routing and WhatsApp as deployment options, but the shown CLI directly calls node functions and no WhatsApp transport is present. The knowledge base is a local JSON file; lead capture is a mock function. Relationships reflect shown calls and reads.
Main entry points: main.py CLI turn loop · graph.py Chat handler · rag.py Keyword retrieval · autostream_kb.json AutoStream knowledge
Components 12
Conversation
- CLI turn loop
main.py - Chat handler
agent/graph.py - Intent classifier
agent/graph.py
Product knowledge
- Keyword retrieval
agent/rag.py - AutoStream knowledge
knowledge_base/autostream_kb.json
Lead qualification
- Name collection
agent/graph.py - Email collection
agent/graph.py - Platform collection
agent/graph.py - Lead capture handler
agent/graph.py - Mock lead capture
tools/lead_capture.py
Other components
- CLI user
- OpenAI model
Connections 13
- CLI user → CLI turn loop: enters message
main.py - CLI turn loop → Chat handler: dispatches chat
main.py - CLI turn loop → Name collection: dispatches stage
main.py - CLI turn loop → Email collection: dispatches stage
main.py - CLI turn loop → Platform collection: dispatches stage
main.py - Platform collection → Lead capture handler: calls capture
main.py - Chat handler → Intent classifier: classifies intent
agent/graph.py - Intent classifier → OpenAI model: invokes fallback
agent/graph.py - Chat handler → OpenAI model: generates reply
agent/graph.py - Chat handler → Keyword retrieval: retrieves context
agent/graph.py - Keyword retrieval → AutoStream knowledge: reads knowledge
agent/rag.py - Chat handler → Lead capture handler: captures complete lead
agent/graph.py - Lead capture handler → Mock lead capture: records lead
agent/graph.py