How rojasantino/shoppilot-multi-agent-ai-customer-operations-platform works
ShopPilot is a customer-operations platform: customers chat with a supervisor that routes requests to order, returns, product, or policy specialists; replies are reviewed, and refund requests remain pending for staff approval. Staff can decide approvals and explore policy vectors through separate UI pages. The graph also shows the API, retrieval, and persistence layers. Some routes and internal wiring are represented from README documentation and the SOURCE INDEX; unsampled implementations are not inferred beyond those references.
Main entry points: nodes.py Specialist agents · graph.py Supervisor graph · api_client.py API client · admin.py Admin endpoints
Components 24
User interfaces
- Chat UI
frontend/app.py - Approvals UI
frontend/pages/1_Approvals.py - Vector Explorer
frontend/pages/2_Vector_Explorer.py - API client
frontend/api_client.py
API and access
- FastAPI app
backend/app/main.py - Chat endpoint
backend/app/api/routes/chat.py - Admin endpoints
backend/app/api/routes/admin.py
Agent workflow
- Supervisor graph
backend/app/agents/graph.py - Intent routing
backend/app/agents/intent.py - Specialist agents
backend/app/agents/nodes.py - Reply reviewer
backend/app/agents/reviewer.py - Reply composer
backend/app/agents/composer.py
Business and retrieval services
- Return rules
backend/app/services/return_policy.py - LLM provider
backend/app/services/llm.py - Policy retrieval
backend/app/services/rag.py - Embedder
backend/app/services/embeddings.py - Redis cache
backend/app/services/cache.py
Persistence
- Order data access
backend/app/repositories/orders.py - Product data access
backend/app/repositories/products.py - Approval records
backend/app/repositories/approvals.py - Knowledge access
backend/app/repositories/knowledge.py - PostgreSQL + pgvector
backend/app/db/models.py
Other components
- Customer
- Staff
Connections 30
- Customer → Chat UI: sends message
- Staff → Approvals UI: reviews requests
- Staff → Vector Explorer: explores vectors
- Chat UI → API client: uses
frontend/app.py - Approvals UI → API client: uses
frontend/pages/1_Approvals.py - Vector Explorer → API client: uses
frontend/pages/2_Vector_Explorer.py - API client → Chat endpoint: posts chat
frontend/api_client.py - API client → Admin endpoints: requests admin data
frontend/api_client.py - FastAPI app → Chat endpoint: registers route
backend/app/main.py - FastAPI app → Admin endpoints: registers route
backend/app/main.py - Chat endpoint → Supervisor graph: runs workflow
- Supervisor graph → Intent routing: routes intent
backend/app/agents/graph.py - Supervisor graph → Specialist agents: dispatches
backend/app/agents/graph.py - Supervisor graph → Reply reviewer: reviews reply
backend/app/agents/graph.py - Supervisor graph → Reply composer: composes reply
backend/app/agents/graph.py - Specialist agents → Return rules: checks eligibility
backend/app/agents/nodes.py - Specialist agents → Order data access: looks up orders
backend/app/agents/nodes.py - Specialist agents → Product data access: looks up products
backend/app/agents/nodes.py - Specialist agents → Approval records: creates pending requests
backend/app/agents/nodes.py - Intent routing → LLM provider: may classify with
backend/app/agents/intent.py - Reply composer → LLM provider: generates wording
backend/app/agents/composer.py - Specialist agents → Policy retrieval: retrieves policy
- Policy retrieval → Embedder: embeds query
backend/app/services/rag.py - Policy retrieval → Knowledge access: searches vectors
backend/app/services/rag.py - Admin endpoints → Approval records: lists and decides
backend/app/api/routes/admin.py - Admin endpoints → Knowledge access: lists and searches
backend/app/api/routes/admin.py - Order data access → PostgreSQL + pgvector: reads
backend/app/repositories/orders.py - Product data access → PostgreSQL + pgvector: reads
backend/app/repositories/products.py - Approval records → PostgreSQL + pgvector: reads and writes
backend/app/repositories/approvals.py - Knowledge access → PostgreSQL + pgvector: reads and writes vectors
backend/app/repositories/knowledge.py