agent-incident-response
Skill2 starsChanged 4 months agoMITView on GitHub
Run the operational loop for an LLM agent that is itself a production workload — detect, triage, mitigate with existing controls, review blamelessly, and convert each incident into a durable regression check. Use when an agent in production burns its error budget, regresses latency or cost, or misbehaves, and you need a repeatable on-call response.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-evaluationSkill
- agent-guardrailsSkill
- agent-least-privilegeSkill
- agentops-courseSkill
- agentops-telemetrySkill
- agent-resilienceSkill
- agent-token-budgetSkill
The file
Files
Agent Incident Response
An operated agent is a running workload with incidents of its own: error-budget burn, latency regression, injection spikes, schema failures, cost blowouts, thumbs-down clusters. Close each one not when service is restored, but when the smallest repeatable check or evidence path would expose it again.
When to use
- An agent workload fires an alert (error budget, p95, cost, guardrail spike, schema failure).
- A quality or cost incident with no alert (thumbs-down cluster, a change that doubled tokens).
- You want every outage to leave behind a test, eval case, alert, or baseline.
The loop: detect → triage → mitigate → review → prevent
- Detect. Alert on the workload's own health signals (error-budget burn, p95 latency, injection-neutralized spike, structured-output schema failures, missing token telemetry, collector down).
- Triage a fixed walk. Metric (scope it) → trace (read the failing turn's span tree) → logs (the error text the span summarizes) → audit (what state changed, who approved). They join on the trace id.
- Mitigate with existing controls. Roll out startup configuration to freeze writes, cap tokens/context, disable a misbehaving opt-in, or select a validated fallback model. Roll committed prompt or code changes back with the prior evaluated image digest. Record the replacement process's readiness time as the first postmortem line.
- Review blamelessly. Short, factual, about the system: impact, timeline, root cause tied to evidence, "what caught it and what didn't", actions with owners.
- Prevent — the load-bearing step. Promote the incident to the cheapest reproducible check or evidence path that would catch it again: a deterministic unit/red-team test, an eval case, an alert rule, or a corrected cost measurement. Fix or explicitly approve the cost change before reviewing a new baseline; never normalize unexplained inflation.
Reference implementation
From the AgentOps Open Course (agent modules live under agents/python/src/agent/):
- Course chapter
7.7. Incident Response(the full loop and a postmortem template). - Startup configuration and rollback controls across
4.5. Guardrails,7.0. Reproducibility, and7.3. Costs.
Verify
Induce one incident on your local stack (e.g. set the token ceiling to 1, restart, and send a turn), walk the signals, write the five-section postmortem, and promote one action to a repeatable check or evidence path — then confirm it produces the expected result.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

