Overview
Correlate a firing incident with recent changes, logs and metrics, then report and open a PR. When an incident fires, the agent investigates it and hands a clear summary back to the human on-call, it never merges a fix on its own.How It Works
When an incident fires, the agent:- Reads the incident details (id, title, severity, affected services) from the trigger, fetching any missing details from your incident management tool.
- Correlates the incident with recent change context: the latest deployments, config changes, and merged PRs for the affected services around the incident start time.
- Pulls the relevant signals: application logs, metrics, and any runbooks for the affected services.
- Determines the most likely root cause and the blast radius, and is explicit about its confidence and what it could not verify.
- Reports its findings to the on-call human in chat: a short summary, the suspected root cause, and a recommended next step.
- If the fix is small and well-understood, opens a PR with the proposed change and links it in the message. It never merges, the human always stays the gate.
Setting It Up
- Credentials: add your incident management tool’s API key and a chat webhook URL (a Slack Incoming Webhook, for example) as secrets, then reference them by name in the agent’s instructions.
- Domain allowlist: add the hostnames the agent needs to reach, your incident management tool’s API and your chat webhook’s domain.
- Resources: this agent mainly makes API calls and reads logs and metrics, a small allocation is enough to start. See Configuration for how resources are set.
Triggering It from incident.io
The template is meant to be triggered by incident.io itself:1
Create a Workflow in incident.io
In incident.io, go to Workflows and create a new one.
2
Set the trigger
Set the trigger to Incident created, or Incident updated filtered to severity changes.
3
Add a Send a webhook step
Point it to this agent task’s webhook URL (shown on its overview page). incident.io includes the incident payload, id, title, severity, and affected services, in that request, which is what the agent reads in step 1 above.