How dhanishetty/incident-triage-agents works
This repository is an early incident-triage product: a browser architecture page can replay a scripted incident or start a live backend run, while the backend executes a LangGraph workflow in demo mode. The workflow gathers logs, metrics, and change evidence, diagnoses a cause, proposes remediation, pauses for human approval, and files a postmortem. The graph includes the user-facing replay/live branches and the backend’s orchestration, dependency, connector, and event layers. Azure services and a real LLM are documented as planned; live integrations are not implemented yet.
Main entry points: api.py Run API · useLiveRun.ts Live run client · agents.py Triage and evidence agents · deps.py Dependency wiring
Components 25
Triage backend
- Run API
backend/src/triage/api.py - Run manager
backend/src/triage/runs.py - Event stream
backend/src/triage/events.py - Run data models
backend/src/triage/models.py
Incident workflow
- Agent graph
backend/src/triage/graph.py - Triage and evidence agents
backend/src/triage/agents.py - Diagnosis and evidence loop
backend/src/triage/agents.py - Remediation proposal
backend/src/triage/agents.py - Approval gate
backend/src/triage/agents.py - Action executor
backend/src/triage/agents.py - Postmortem filing
backend/src/triage/agents.py
Demo integrations
- Dependency wiring
backend/src/triage/deps.py - Connector interfaces
backend/src/triage/connectors/base.py - Demo connectors
backend/src/triage/connectors/demo.py - Scripted reasoner
backend/src/triage/llm/fake.py
Run experience
- Run controls
frontend/src/features/architecture/RunControls.tsx - Live run client
frontend/src/features/architecture/useLiveRun.ts - Simulated replay
frontend/src/features/architecture/useRun.ts - Run interface
frontend/src/features/architecture/runApi.ts - Interactive flow diagram
frontend/src/features/architecture/FlowDiagram.tsx
Replay and diagrams
- Replay scenarios
frontend/src/features/architecture/scenarios.ts - Architecture diagram data
frontend/src/features/architecture/diagrams.ts
Other components
- Azure Monitor alert
- On-call engineer
- Azure Boards work item
Connections 36
- Azure Monitor alert → Run API: starts run
README.md - Run controls → Live run client: starts live run
frontend/src/features/architecture/ArchitecturePage.tsx - Run controls → Simulated replay: plays replay
frontend/src/features/architecture/ArchitecturePage.tsx - Run controls → Run interface: uses interface
frontend/src/features/architecture/RunControls.tsx - Live run client → Run API: posts run
frontend/src/features/architecture/useLiveRun.ts - Live run client → Run API: requests approval
frontend/src/features/architecture/useLiveRun.ts - Live run client → Event stream: receives SSE
README.md - Simulated replay → Replay scenarios: replays steps
frontend/src/features/architecture/useRun.ts - Live run client → Replay scenarios: selects scenario
frontend/src/features/architecture/useLiveRun.ts - Live run client → Run interface: implements interface
frontend/src/features/architecture/useLiveRun.ts - Simulated replay → Run interface: implements interface
frontend/src/features/architecture/useRun.ts - Run interface → Interactive flow diagram: supplies run view
frontend/src/features/architecture/runApi.ts - Architecture diagram data → Interactive flow diagram: defines rendering data
frontend/src/features/architecture/diagrams.ts - On-call engineer → Run controls: chooses mode
README.md - On-call engineer → Run API: approves or rejects
README.md - Run API → Run manager: starts and decides
backend/src/triage/api.py - Run API → Agent graph: builds workflow
backend/src/triage/api.py - Run API → Event stream: streams events
backend/src/triage/api.py - Run manager → Event stream: stores run events
backend/src/triage/runs.py - Agent graph → Triage and evidence agents: dispatches nodes
backend/src/triage/graph.py - Triage and evidence agents → Dependency wiring: uses dependencies
backend/src/triage/agents.py - Triage and evidence agents → Event stream: emits progress
backend/src/triage/agents.py - Triage and evidence agents → Diagnosis and evidence loop: gathers evidence
backend/src/triage/agents.py - Diagnosis and evidence loop → Remediation proposal: provides cause
README.md - Remediation proposal → Approval gate: requests approval
backend/src/triage/agents.py - Approval gate → On-call engineer: pauses for decision
README.md - Approval gate → Action executor: runs if approved
README.md - Action executor → Postmortem filing: reports outcome
backend/src/triage/agents.py - Approval gate → Postmortem filing: continues if rejected
backend/src/triage/agents.py - Postmortem filing → Azure Boards work item: files report
backend/src/triage/agents.py - Dependency wiring → Connector interfaces: configures interfaces
backend/src/triage/deps.py - Dependency wiring → Demo connectors: selects demo adapters
backend/src/triage/deps.py - Dependency wiring → Scripted reasoner: selects scripted reasoner
backend/src/triage/deps.py - Demo connectors → Replay scenarios: loads incident facts
backend/src/triage/connectors/demo.py - Triage and evidence agents → Run data models: reads and writes state
backend/src/triage/agents.py - Run API → Run data models: validates requests
backend/src/triage/api.py