How manthan89-py/multi-agent-query-resolution works
This is a FastAPI-backed customer-query resolution system. A client submits a query to the API, which runs a workflow: a routing team selects product knowledge or customer support, then a personality agent rewrites the specialist response and the API returns structured output. Product questions use a website-derived vector knowledge base, with optional Tavily search; support tools look up customer records and manage tickets in in-memory stores. The graph follows the sampled API, workflow, agent, and knowledge code; README-described details without sampled implementation are represented only where their module path is supported.
Main entry points: api.py FastAPI endpoints · workflow.py Query workflow · router_agent.py Routing team · knowledge_agent.py Knowledge specialist
Components 16
API entry
- FastAPI endpoints
api.py - Request and response models
utils/models.py - Workflow JSON storage
api.py
Query orchestration
- Query workflow
agents/workflow.py - Routing team
agents/router_agent.py - Personality layer
agents/workflow.py
Specialist agents
- Knowledge specialist
agents/knowledge_agent.py - Support specialist
agents/customer_support_agent.py
Knowledge and support data
- Website knowledge base
agents/knowledge_agent.py - Knowledge vector store
agents/knowledge_agent.py - Customer records
agents/customer_support_agent.py - Support tickets
agents/customer_support_agent.py
External services
- InfinitePay website
- Mistral API
- Tavily search
Other components
- Query client
Connections 20
- Query client → FastAPI endpoints: submits query
- FastAPI endpoints → Request and response models: validates request
- FastAPI endpoints → Query workflow: runs query
- FastAPI endpoints → Workflow JSON storage: configures storage
- Query workflow → Routing team: routes query
- Routing team → Knowledge specialist: dispatches
- Routing team → Support specialist: dispatches
- Query workflow → Personality layer: enhances response
- Query workflow → Request and response models: builds final output
- Knowledge specialist → Website knowledge base: searches knowledge
- Website knowledge base → Knowledge vector store: retrieves chunks
- FastAPI endpoints → Website knowledge base: loads knowledge
- Website knowledge base → InfinitePay website: extracts content
- Support specialist → Customer records: looks up customer
- Support specialist → Support tickets: checks or creates tickets
- Routing team → Mistral API: classifies queries
- Knowledge specialist → Mistral API: generates answers
- Personality layer → Mistral API: rewrites response
- Support specialist → Mistral API: generates support response
- Knowledge specialist → Tavily search: searches web