How krupashetty004/agentic-ai works
This is an authenticated, document-grounded multi-agent chat application. Users register or log in, ingest sample or uploaded files, then ask questions through the chat interface; a LangGraph workflow routes work among supervisor, search, and summary agents and returns an answer with sources and review information. Search and conversation state can use Elasticsearch and Redis, with local fallbacks. The README documents MCP tools and feedback-driven routing. Some workflow and integration internals were not excerpted, so those links rely on documented behavior rather than inspected call sites.
Main entry points: chat_workflow.py Chat workflow · main.py FastAPI application · auth_router.py Auth routes · auth_dependencies.py Bearer validation
Components 25
Interface and API
- Chat interface
frontend/app/page.tsx - FastAPI application
backend/app/main.py - Chat routes
backend/app/routers/chat_router.py
Identity and sessions
- Auth routes
backend/app/routers/auth_router.py - Account service
backend/app/services/auth_service.py - Bearer validation
backend/app/dependencies/auth_dependencies.py - Token service
backend/app/services/token_service.py - Conversation memory
backend/app/memory/redis_memory.py
Knowledge ingestion and retrieval
- Ingest routes
backend/app/routers/ingest_router.py - File loaders
backend/app/data_ingest/file_ingest.py - Search and indexing
backend/app/services/search_service.py
Agent workflow
- Chat workflow
backend/app/workflows/chat_workflow.py - Routing graph
backend/app/workflows/routing_graph.py - Supervisor agent
backend/app/agents/supervisor_agent.py - Search agent
backend/app/agents/search_agent.py - Summary agent
backend/app/agents/summary_agent.py - LLM service
backend/app/services/llm_service.py
Feedback and tools
- Feedback metrics
backend/app/services/feedback_service.py - Feedback routes
backend/app/routers/feedback_router.py - MCP knowledge tools
backend/app/services/mcp_tools.py - MCP server
backend/mcp_server.py
Other components
- User
- Elasticsearch
- Hugging Face
- MCP clients
Connections 32
- User → Chat interface: uses
- Chat interface → FastAPI application: calls API
- FastAPI application → Auth routes: registers
backend/app/main.py - FastAPI application → Chat routes: registers
backend/app/main.py - FastAPI application → Ingest routes: registers
backend/app/main.py - FastAPI application → Feedback routes: registers
backend/app/main.py - Auth routes → Account service: registers users
backend/app/routers/auth_router.py - Auth routes → Token service: creates tokens
backend/app/routers/auth_router.py - Account service → Conversation memory: stores accounts
backend/app/services/auth_service.py - Auth routes → Bearer validation: uses
backend/app/routers/auth_router.py - Bearer validation → Token service: validates tokens
backend/app/dependencies/auth_dependencies.py - Bearer validation → Account service: loads user
backend/app/dependencies/auth_dependencies.py - Bearer validation → Conversation memory: reads account
backend/app/dependencies/auth_dependencies.py - Chat routes → Chat workflow: runs
backend/app/routers/chat_router.py - Chat routes → Conversation memory: reads or clears
backend/app/routers/chat_router.py - Ingest routes → File loaders: loads files
backend/app/routers/ingest_router.py - Ingest routes → Search and indexing: indexes documents
backend/app/routers/ingest_router.py - File loaders → Search and indexing: documents indexed
- Search and indexing → Elasticsearch: indexes and searches
- Chat workflow → Routing graph: uses graph
backend/app/workflows/chat_workflow.py - Chat workflow → Supervisor agent: routes requests
backend/app/workflows/chat_workflow.py - Chat workflow → Search agent: dispatches work
backend/app/workflows/chat_workflow.py - Chat workflow → Summary agent: dispatches work
backend/app/workflows/chat_workflow.py - Chat workflow → Conversation memory: uses conversation memory
backend/app/workflows/chat_workflow.py - Search agent → Search and indexing: retrieves documents
backend/app/agents/search_agent.py - Search agent → MCP knowledge tools: uses tools
backend/app/agents/search_agent.py - Supervisor agent → LLM service: requests generation
backend/app/agents/supervisor_agent.py - LLM service → Hugging Face: generates text
backend/app/services/llm_service.py - Feedback routes → Feedback metrics: records and reports
backend/app/routers/feedback_router.py - Chat workflow → Feedback metrics: uses feedback routing
backend/app/workflows/chat_workflow.py - MCP clients → MCP server: requests tools
- MCP server → MCP knowledge tools: exposes tools
backend/mcp_server.py