How yevsel/customer_support_agent_yt works
This LangGraph customer-support agent routes a customer message to FAQ, order, refund, or escalation handling, then returns a resolution or pauses for human approval. Its main graph coordinates the stages; an order sub-agent loops through tools, while FAQ answers use retrieved policy context. The README documents optional Postgres checkpointing and the RAG ingestion capability; the sampled graph code shows checkpoint setup commented out, and the ingestion code’s database write is also commented out, so those links are marked optional or documented rather than asserted as active.
Main entry points: graphs.py Support Graph · nodes.py Support Nodes · order_agent.py Order Sub-agent · retrieval.py Policy Retrieval
Components 19
Support Workflow
- Support Graph
graphs.py - Conversation State
state.py - Intent Router
edges.py - Support Nodes
nodes.py - Human Escalation
nodes.py - Turn Resolution
nodes.py
Policy Knowledge
- FAQ Policy
rag/company_data/faq.txt - FAQ Ingestion
rag/ingestion.py - Policy Retrieval
rag/retrieval.py - Chroma Store
rag/chroma.sqlite3
Order Handling
- Order Sub-agent
order_agent.py - Order Tools
order_agent.py - Mock Orders
orders_mock_data.py
Refund and Review
- Refund Review
nodes.py - Issue Refund
nodes.py
Other components
- Customer
- OpenAI Model
- Human Approver
- Postgres Checkpointer
Connections 22
- Customer → Support Graph: sends message
README.md - Support Graph → Intent Router: routes through
graphs.py - Support Graph → Support Nodes: registers nodes
graphs.py - Support Graph → Conversation State: uses state
graphs.py - Support Graph → Order Sub-agent: invokes branch
graphs.py - Intent Router → Support Nodes: selects intent
graphs.py - Support Nodes → OpenAI Model: classifies and answers
nodes.py - Support Nodes → Policy Retrieval: searches policy
nodes.py - FAQ Ingestion → FAQ Policy: chunks document
rag/ingestion.py - FAQ Ingestion → Chroma Store: stores embeddings
README.md - Policy Retrieval → Chroma Store: searches
rag/retrieval.py - Order Sub-agent → Order Tools: dispatches tools
order_agent.py - Order Sub-agent → OpenAI Model: invokes model
order_agent.py - Order Tools → Mock Orders: looks up orders
order_agent.py - Order Tools → Policy Retrieval: searches policy
order_agent.py - Support Graph → Refund Review: routes refunds
graphs.py - Refund Review → Mock Orders: checks order
nodes.py - Refund Review → Human Approver: requests approval
README.md - Support Graph → Issue Refund: routes approved
graphs.py - Support Graph → Turn Resolution: routes completion
graphs.py - Support Graph → Human Escalation: routes escalation
graphs.py - Support Graph → Postgres Checkpointer: checkpoints state
README.md