Project Info
Inspiration
On-call engineers lose the first 20–30 minutes of every incident just figuring out what's broken — digging through logs, dashboards, and service maps before they can even start fixing anything. We wanted to build something that compresses that window: an AI that investigates an outage the way a senior SRE would, not just answers a support ticket.
What it does
Incident Commander runs a 4-stage pipeline of specialized AI agents — Triage → Diagnosis → Fix → Postmortem — each one handing its findings to the next. The agents don't just guess: they call real tools (log search, metric queries, service dependency mapping, runbook search, and live host metrics) to gather evidence, the same way a human investigator would. Every conclusion comes with a confidence score and a visible evidence chain, so the engineer can see why the AI reached its diagnosis, not just trust a black box.
How we built it
The backend is FastAPI with a WebSocket layer that streams each agent's progress to the frontend in real time. Each agent runs a genuine OpenAI function-calling loop on GPT-5.6 — deciding which tool to call, reading the result, and reasoning over it before concluding. Structured outputs (strict JSON schemas) keep every stage's result typed and predictable instead of free-form text. Codex was our development partner throughout: it helped implement the multi-agent pipeline and tool-calling loop, caught and fixed an XSS vulnerability in how the frontend rendered model output, added a live host-metrics tool (real CPU/memory data via psutil) so at least one data source in the demo is genuinely live rather than simulated, and helped tighten our documentation and demo flow for reliability.
Challenges we ran into
Getting context-chaining right between agents was the hardest part — the Diagnosis agent needs the Triage agent's findings to know which services to investigate, and the Fix agent needs both. We had to carefully design each agent's output schema so it was exactly what the next agent needed as input. We also had to make sure the frontend degrades gracefully — it has a built-in offline demo mode so the experience never breaks even if the backend or API is unavailable.
What we learned
Multi-agent systems are only as good as the evidence they're grounded in — a single prompt guessing at a root cause is very different from an agent that actually searched the logs and can show its work. We also learned how much a small amount of real data (like live host metrics) does for credibility compared to an entirely simulated demo.
What's next
Swapping the mock log/metric tools for real integrations (Datadog, Prometheus, PagerDuty), adding a human-approval step before any suggested remediation command can be run, and expanding the tool set so the Diagnosis agent can correlate evidence across services by timestamp automatically.
Incident Commander
AI-powered incident response agent — built for OpenAI Build Week 2026.
When a production incident hits, most engineers spend the first 20-30 minutes just figuring out what's going on — digging through logs, checking dashboards, tracing which service actually broke. Incident Commander tries to shrink that window. You describe (or simulate) an outage, and a pipeline of specialized AI agents investigates it the way a senior SRE would: checking health metrics, searching logs, tracing service dependencies, and pulling relevant runbooks — before handing you a diagnosis and a fix.
How it works
Four agents run in sequence, each one handing its findings to the next:
Alert → Triage Agent (health_check, metric_query)
↓
Diagnosis Agent (log_search, service_map, metric_query)
↓
Fix Agent (runbook_search, service_map)
↓
Postmortem Agent (full context)
↓
Complete incident writeup
Each agent isn't just prompting an LLM once — it runs a real tool-calling loop. The agent decides what to check, calls a tool, reads the result, and keeps investigating until it has enough evidence to reach a conclusion with a confidence score attached.
Features
- Multi-agent pipeline — triage, diagnosis, fix, and postmortem are handled by separate agents with their own system prompts and tool access, not one giant prompt trying to do everything
- Real tool use — 5 function-calling tools (log search, metric query, service map, health check, runbook search) that agents call to actually gather evidence instead of guessing
- Structured outputs — every agent returns a strict, typed schema (severity, evidence chain, confidence score, etc.), not free-form text
- Live streaming — results stream to the frontend in real time over WebSocket as each agent finishes its stage
- One-click demo — a pre-built outage scenario you can trigger instantly for a clean demo run
Tech stack
| Component | Technology |
|---|---|
| Frontend | Vanilla HTML/CSS/JS (single-page, no build step) |
| Backend | Python, FastAPI, WebSocket |
| AI | OpenAI GPT-5.6 (function calling + structured outputs) |
| Database | SQLite |
Getting started
Prerequisites
- Python 3.10+
- An OpenAI API key with access to GPT-5.6
Backend
cd backend
python -m venv venv
source venv/bin/activate # Mac/Linux
# venv\Scripts\activate # Windows
pip install -r requirements.txt
cp ../.env.example ../.env # then add your real API key to .env
uvicorn main:app --reload --port 8000
Frontend
No build step needed — it's a single static page. Either:
cd frontend
python -m http.server 3000
then open http://localhost:3000, or just open frontend/index.html directly in your browser.
The frontend also has a built-in demo mode that works without the backend running — useful for a quick, guaranteed-not-to-break demo.
Running the demo
- Open the frontend
- Click "Simulate Outage"
- Watch the agents investigate in real time — triage, then diagnosis with evidence, then a fix with commands, then a postmortem
Project structure
incident-commander/
├── backend/
│ ├── agents/ # triage, diagnosis, fix, postmortem agents + orchestrator
│ ├── tools/ # the 5 function-calling tools
│ ├── models/ # Pydantic schemas for structured outputs
│ ├── services/ # vision, voice, incident services
│ ├── routes/ # API endpoints + WebSocket
│ ├── mock_data/ # simulated logs, metrics, and runbooks for the demo
│ └── main.py
├── frontend/
│ ├── index.html
│ └── styles.css
└── README.md
Built for OpenAI Build Week 2026
Category: AI Agents
Built with Codex on GPT-5.6 — multi-agent orchestration with real tool calling, structured outputs, and real-time streaming, wrapped around a scenario every engineer has lived through: the 3 AM outage nobody understands yet.
License
MIT
Analysis
View
Metric
- 5
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- HTMLIn code
- OpenAIIn code
- PythonIn code
- SQLIn code
- JavaScriptClaimed
6 of 7 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
125 KB
Source files
38
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
ABHINAV-SHUKLA-11/OPEN-AI-BUILD-WEEK
48 files · 143 KB · @ 2e241d4
Structure
Interface
2 files · 4%Screens, components and styles rendered to the user.
API & routing
5 files · 10%Request entry points: routes, handlers and controllers.
Application logic
20 files · 42%Domain rules, services and shared utilities.
Data & schema
8 files · 17%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python39%
- HTML34%
- CSS16%
- Markdown12%
- SQL0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
backend/requirements.txt
pypi · 10- aiosqlite
- fastapi
- httpx
- openai
- psutil
- pydantic
- python-dotenv
- python-multipart
- uvicorn[standard]
- websockets
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.