How davidsandeep1996-spec/fca-multi-agent-support works
This is an FCA-focused financial-services customer-support system. A customer submits a message through the client/API; the coordinator runs a stateful LangGraph workflow that applies security checks, classifies intent, dispatches a specialist agent, and returns or pauses the response for compliance review. Supporting capabilities include account and product data access, FAQ/RAG retrieval, persistent conversation state, and document ingestion. The graph preserves README-documented integrations; some subsystem links are based on README statements because their implementation was not sampled.
Main entry points: message_workflow.py Message workflow · database.py Database sessions · agent_coordinator.py Agent coordinator · messages.py FastAPI routes
Components 25
Client and API
- Streamlit client
frontend/streamlit_app.py - FastAPI routes
app/api/routes/messages.py
Workflow and agents
- Agent coordinator
app/coordinator/agent_coordinator.py - Message workflow
app/workflows/message_workflow.py - Agent foundation
app/agents/base.py - Intent classifier
app/agents/intent_classifier.py - Account agent
app/agents/account_agent.py - General agent
app/agents/general_agent.py - Human escalation
app/agents/human_agent.py - Product recommender
app/agents/product_recommender.py - FCA compliance
app/agents/compliance_checker.py
Support data
- Support records
app/models/customer.py - Conversation state
app/models/conversation.py - Financial products
app/models/product.py - Database sessions
app/database.py
Runtime services
- Security and PII
app/services/security_service.py - RAG retrieval
app/services/rag_service.py - Ingestion worker
app/worker.py
External services
- Groq inference
- Lakera Guard
- Langfuse tracing
- Redis cache
- Celery workers
Other components
- Customer
- Administrator review
Connections 28
- Customer → Streamlit client: submits query
README.md - Streamlit client → FastAPI routes: sends request
- FastAPI routes → Agent coordinator: forwards message
app/api/routes/messages.py - Agent coordinator → Message workflow: runs workflow
app/coordinator/agent_coordinator.py - Message workflow → Security and PII: checks prompt
app/workflows/message_workflow.py - Security and PII → Lakera Guard: checks injection
app/services/security_service.py - Message workflow → Intent classifier: classifies intent
app/workflows/message_workflow.py - Message workflow → Account agent: dispatches account
app/workflows/message_workflow.py - Message workflow → General agent: dispatches general
app/workflows/message_workflow.py - Message workflow → Human escalation: dispatches escalation
app/workflows/message_workflow.py - Message workflow → Product recommender: dispatches product
app/workflows/message_workflow.py - Message workflow → FCA compliance: checks recommendation
app/workflows/message_workflow.py - FCA compliance → Administrator review: pauses for review
README.md - Message workflow → Groq inference: invokes inference
README.md - Message workflow → Langfuse tracing: emits traces
README.md - General agent → RAG retrieval: retrieves knowledge
app/agents/general_agent.py - RAG retrieval → Database sessions: queries vectors
app/services/rag_service.py - Ingestion worker → RAG retrieval: ingests documents
app/worker.py - Ingestion worker → Celery workers: runs background
README.md - Account agent → Support records: reads account data
- Product recommender → Financial products: queries products
- Agent coordinator → Conversation state: persists conversation
app/coordinator/agent_coordinator.py - Agent coordinator → Database sessions: opens session
app/coordinator/agent_coordinator.py - Database sessions → Support records: stores records
- Database sessions → Conversation state: stores state
- Database sessions → Financial products: stores products
- FastAPI routes → Celery workers: triggers ingestion
README.md - General agent → Redis cache: uses cache
app/agents/general_agent.py