How kathirvbk/sales-operation works
Lead-to-Delivery AI Agent is a chat-driven sales and operations application. A user message reaches the FastAPI chat endpoint, where the main workflow classifies intent and dispatches lead qualification or deal, status, and task handling. Sales qualification extracts and scores lead data, then stores it; a won deal can lead to onboarding tasks and later status or task updates. The React dashboard also exposes lead, deal, and task views. The README documents the frontend/backend and Groq setup; unsampled route and UI details are represented only where indexed or documented.
Main entry points: main.py FastAPI endpoints · App.jsx Dashboard app · operations_agent.py Operations agent · database.py SQLite database
Components 26
React dashboard
- Dashboard app
frontend/src/App.jsx - Chat panel
frontend/src/components/ChatPanel.jsx - Leads board
frontend/src/components/LeadsBoard.jsx - Deals board
frontend/src/components/DealsBoard.jsx - Tasks board
frontend/src/components/TasksBoard.jsx - Execution trace
frontend/src/components/ExecutionTrace.jsx - API client
frontend/src/services/api.js
API and routing
- FastAPI endpoints
backend/app/main.py - Request schemas
backend/app/schemas/schemas.py - Intent classifier
backend/app/router/router.py
Agent workflows
- Main workflow
backend/app/workflows/main_graph.py - Sales workflow
backend/app/workflows/sales_workflow.py - Operations workflow
backend/app/workflows/operations_workflow.py
Sales and operations
- Sales agent
backend/app/agents/sales_agent.py - Operations agent
backend/app/agents/operations_agent.py - Lead scoring
backend/app/tools/scoring_tools.py - Lead records
backend/app/tools/lead_tools.py - Deal records
backend/app/tools/deal_tools.py - Onboarding tasks
backend/app/tools/task_tools.py - Status queries
backend/app/tools/status_tools.py - Chat history
backend/app/tools/chat_tools.py - LLM service
backend/app/services/llm_service.py - Execution trace service
backend/app/services/execution_service.py
Persistence
- SQLite database
backend/app/database/database.py
Other components
- User
- Groq LLM
Connections 43
- User → Dashboard app: uses
README.md - Dashboard app → Chat panel: renders
frontend/src/App.jsx - Dashboard app → Leads board: renders
frontend/src/App.jsx - Dashboard app → Deals board: renders
frontend/src/App.jsx - Dashboard app → Tasks board: renders
frontend/src/App.jsx - Chat panel → API client: requests
frontend/src/components/ChatPanel.jsx - Chat panel → Execution trace: renders
frontend/src/components/ChatPanel.jsx - Dashboard app → API client: fetches data
frontend/src/App.jsx - API client → FastAPI endpoints: calls API
README.md - FastAPI endpoints → Request schemas: validates with
backend/app/main.py - FastAPI endpoints → Main workflow: dispatches chat
backend/app/main.py - Main workflow → Intent classifier: classifies with
backend/app/workflows/main_graph.py - Main workflow → Sales workflow: dispatches
backend/app/workflows/main_graph.py - Main workflow → Operations workflow: dispatches
backend/app/workflows/main_graph.py - Main workflow → Execution trace service: logs steps
backend/app/workflows/main_graph.py - Sales workflow → Sales agent: runs
backend/app/workflows/sales_workflow.py - Sales workflow → Execution trace service: logs steps
backend/app/workflows/sales_workflow.py - Operations workflow → Operations agent: runs
backend/app/workflows/operations_workflow.py - Operations workflow → Execution trace service: logs steps
backend/app/workflows/operations_workflow.py - Sales agent → LLM service: extracts with
backend/app/agents/sales_agent.py - Sales agent → Lead scoring: scores lead
backend/app/agents/sales_agent.py - Sales agent → Lead records: saves lead
backend/app/agents/sales_agent.py - Operations agent → LLM service: extracts with
backend/app/agents/operations_agent.py - Operations agent → Lead records: looks up leads
backend/app/agents/operations_agent.py - Operations agent → Deal records: handles deals
backend/app/agents/operations_agent.py - Operations agent → Onboarding tasks: handles tasks
backend/app/agents/operations_agent.py - Operations agent → Status queries: queries status
backend/app/agents/operations_agent.py - Lead scoring → LLM service: uses
backend/app/tools/scoring_tools.py - Status queries → Lead records: reads leads
backend/app/tools/status_tools.py - Status queries → Deal records: reads deals
backend/app/tools/status_tools.py - Status queries → Onboarding tasks: reads tasks
backend/app/tools/status_tools.py - FastAPI endpoints → Lead records: serves lead data
backend/app/main.py - FastAPI endpoints → Deal records: updates deals
backend/app/main.py - FastAPI endpoints → Onboarding tasks: updates tasks
backend/app/main.py - FastAPI endpoints → Status queries: gets status
backend/app/main.py - FastAPI endpoints → Chat history: stores messages
backend/app/main.py - LLM service → Groq LLM: invokes model
backend/app/services/llm_service.py - Lead records → SQLite database: reads and writes
backend/app/tools/lead_tools.py - Deal records → SQLite database: reads and writes
backend/app/tools/deal_tools.py - Onboarding tasks → SQLite database: reads and writes
backend/app/tools/task_tools.py - Chat history → SQLite database: reads and writes
backend/app/tools/chat_tools.py - Execution trace service → SQLite database: persists steps
backend/app/services/execution_service.py - FastAPI endpoints → SQLite database: checks database
backend/app/main.py