How haeronpereira/acme-customer-support-agent works
ACME Customer Support Agent serves support and sales users through a Streamlit interface and authenticated FastAPI API. The API routes chat requests through intent detection and the LangGraph agent, which selects native or MCP tools; business services retrieve or update customer-support data, and the agent returns a response with conversation state checkpointed in Redis. Separate capabilities include escalation summaries, role-based access, and operational logging. Relationships are based on the excerpts and README; some README-described integrations, including LangSmith, were not shown in source excerpts.
Main entry points: agent.py LangGraph agent · main.py FastAPI API · escalation_summary.py Escalation summary · customer_service.py Customer services
Components 24
User experience
- Streamlit UI
frontend/streamlit_app.py
API and access
- FastAPI API
app/main.py - API schemas
app/schemas.py - JWT authentication
app/auth.py - Role access control
app/rbac.py - Intent detection
app/intent_router.py
Agent workflow
- LangGraph agent
app/agent.py - Agent prompts
app/prompts.py - Agent state
app/state.py - Native tools
app/tools.py - MCP client
app/mcp_client.py - Language model
app/llm.py
Business capabilities
- MCP business tools
mcp_server/server.py - Escalation summary
app/skills/escalation_summary.py - Customer services
app/services/customer_service.py
Data and operations
- Business data models
app/models.py - Database sessions
app/database.py - PostgreSQL
- Redis checkpointing
app/checkpointer.py - Redis
- Structured logging
app/logger.py
Other components
- Support user
- Keycloak
- LangSmith
Connections 29
- Support user → Streamlit UI: uses
README.md - Streamlit UI → FastAPI API: sends requests
README.md - FastAPI API → JWT authentication: validates identity
app/main.py - JWT authentication → Keycloak: authenticates users
README.md - FastAPI API → Role access control: checks roles
app/main.py - FastAPI API → API schemas: uses schemas
app/main.py - FastAPI API → Intent detection: detects intent
app/main.py - FastAPI API → Customer services: handles data requests
app/main.py - FastAPI API → LangGraph agent: dispatches chat
app/main.py - Intent detection → Language model: classifies with
app/intent_router.py - LangGraph agent → Language model: invokes
app/agent.py - LangGraph agent → Agent prompts: uses prompt
app/agent.py - LangGraph agent → Agent state: tracks messages
app/agent.py - LangGraph agent → Native tools: registers tools
app/agent.py - LangGraph agent → MCP client: loads tools
app/agent.py - MCP client → MCP business tools: requests tools
app/mcp_client.py - LangGraph agent → Redis checkpointing: checkpoints state
app/agent.py - Native tools → Escalation summary: uses skill
app/tools.py - Escalation summary → Customer services: retrieves support data
app/skills/escalation_summary.py - Escalation summary → Language model: generates summary
app/skills/escalation_summary.py - Escalation summary → Database sessions: opens session
app/skills/escalation_summary.py - MCP business tools → Customer services: calls services
mcp_server/server.py - MCP business tools → Database sessions: opens sessions
mcp_server/server.py - Customer services → Business data models: queries models
app/services/customer_service.py - Database sessions → PostgreSQL: connects to
app/database.py - Redis checkpointing → Redis: stores checkpoints
app/checkpointer.py - FastAPI API → Structured logging: records requests
app/main.py - LangGraph agent → Structured logging: records execution
app/agent.py - LangGraph agent → LangSmith: traces runs
README.md