How aishwaryamy/ai-incident-response-agent works
This is an incident-response copilot API: an engineer submits incident details or logs, and the chat endpoint invokes a LangGraph agent to produce troubleshooting guidance. The agent uses an LLM, tools, and session-linked memory; authentication and session management support ongoing conversations. The README also describes RAG ingestion and retrieval, monitoring, and evaluation. The tree does not show an ingestion implementation, so that capability is represented only where the sampled agent supports retrieval and memory. Some subsystem links rely on README statements or SOURCE INDEX references rather than full source excerpts.
Main entry points: graph.py LangGraph workflow · main.py FastAPI application · database.py Database service · api.py API routing
Components 21
API and identity
- FastAPI application
app/main.py - API routing
app/api/v1/api.py - Authentication and sessions
app/api/v1/auth.py - Chat endpoints
app/api/v1/chatbot.py - Auth schemas
app/schemas/auth.py - Chat schemas
app/schemas/chat.py
Agent and reasoning
- LangGraph workflow
app/core/langgraph/graph.py - Agent prompts
app/core/prompts - Web search tool
app/core/langgraph/tools/duckduckgo_search.py - LLM service
app/services/llm.py
Persistence and memory
- Database service
app/services/database.py - User and session models
app/models/user.py - PostgreSQL and pgvector
Operations and evaluation
- Application settings
app/core/config.py - Structured logging
app/core/logging.py - Prometheus metrics
app/core/metrics.py - Grafana dashboards
grafana/dashboards/json - Agent evaluation
evals/evaluator.py - Evaluation schemas
evals/schemas.py
Other components
- Engineer
- OpenAI models
Connections 21
- Engineer → FastAPI application: sends request
README.md - FastAPI application → API routing: routes requests
app/main.py - API routing → Authentication and sessions: registers routes
app/api/v1/api.py - API routing → Chat endpoints: registers routes
app/api/v1/api.py - Authentication and sessions → Database service: reads and writes
app/api/v1/auth.py - Authentication and sessions → Auth schemas: validates data
app/api/v1/auth.py - Chat endpoints → LangGraph workflow: invokes agent
app/api/v1/chatbot.py - Chat endpoints → Chat schemas: validates data
app/api/v1/chatbot.py - LangGraph workflow → LLM service: requests inference
app/core/langgraph/graph.py - LangGraph workflow → Web search tool: dispatches tools
app/core/langgraph/graph.py - LangGraph workflow → Agent prompts: loads prompts
app/core/langgraph/graph.py - LLM service → OpenAI models: calls models
README.md - LangGraph workflow → PostgreSQL and pgvector: stores memory
app/core/langgraph/graph.py - Database service → User and session models: persists records
app/services/database.py - Database service → PostgreSQL and pgvector: uses database
README.md - FastAPI application → Database service: checks health
app/main.py - FastAPI application → Prometheus metrics: sets up metrics
app/main.py - FastAPI application → Structured logging: configures middleware
app/main.py - Grafana dashboards → Prometheus metrics: visualizes metrics
README.md - Agent evaluation → Evaluation schemas: uses schemas
evals/evaluator.py - Agent evaluation → LangGraph workflow: evaluates responses