How xuxuew/ecommerce-support-agent works
This is an e-commerce customer-support and ticket-coordination application. A user enters through Streamlit or the service API; the LangGraph support agent handles policy questions and order, refund, and ticket workflows, then returns a response. The documented product also includes hybrid policy retrieval, conversation checkpointing, and voice input/output. The README documents the major integrations; sampled source confirms selected service, agent, retrieval, and voice relationships. Some business-tool wiring and UI details are unsampled, so those links rely on the README.
Main entry points: customer_support_agent.py Support agent · service.py FastAPI service · rag.py Hybrid policy RAG · streamlit_app.py Streamlit UI
Components 21
User interfaces
- Streamlit UI
src/streamlit_app.py - HTTP client
src/client/client.py - FastAPI service
src/service/service.py
Agent orchestration
- Support agent
src/agents/customer_support_agent.py - Safety checks
src/agents/safeguard.py - Chat schemas
src/schema/schema.py
Support capabilities
- Policy rules
src/customer_support/policy.py - Hybrid policy RAG
src/customer_support/rag.py - Support tools
src/customer_support/tools.py
Data and memory
- Order and refund data
src/customer_support/mysql_store.py - Ticket data
src/customer_support/mysql_store.py - Conversation checkpoints
src/memory/__init__.py
Model and voice
- Language model
src/core/llm.py - Voice UI integration
src/voice/manager.py - Speech recognition
src/voice/stt.py - Speech synthesis
src/voice/tts.py
Other components
- Customer
- Qwen
- BGE embeddings
- Chroma index
- OpenAI voice providers
src/voice/providers/openai_stt.py
Connections 22
- Customer → Streamlit UI: uses
README.md - Streamlit UI → HTTP client: sends requests
src/streamlit_app.py - HTTP client → FastAPI service: invokes or streams
src/client/client.py - FastAPI service → Support agent: dispatches
src/service/service.py - Support agent → Safety checks: checks safety
- Support agent → Support tools: routes requests
src/agents/customer_support_agent.py - Support agent → Hybrid policy RAG: retrieves policies
README.md - Support agent → Language model: generates replies
- Language model → Qwen: calls
README.md - Support tools → Order and refund data: queries orders
README.md - Support tools → Ticket data: creates tickets
README.md - Hybrid policy RAG → Policy rules: loads policies
src/customer_support/rag.py - Hybrid policy RAG → BGE embeddings: embeds documents
README.md - Hybrid policy RAG → Chroma index: searches index
src/customer_support/rag.py - FastAPI service → Conversation checkpoints: persists conversations
src/service/service.py - Streamlit UI → Voice UI integration: uses voice UI
src/streamlit_app.py - Voice UI integration → Speech recognition: transcribes audio
src/voice/manager.py - Voice UI integration → Speech synthesis: generates audio
src/voice/manager.py - Speech recognition → OpenAI voice providers: loads provider
src/voice/stt.py - Speech synthesis → OpenAI voice providers: loads provider
- HTTP client → Chat schemas: serializes messages
src/client/client.py - FastAPI service → Chat schemas: accepts chat input
src/service/service.py