Skip to content
TriageAI

How TriageAI goes from the page to the line of code

One agent loop, two starting points. A firing alert or a bug report goes in, a Claude agent investigates with read-only tools across your telemetry and your code, and a structured result comes out.

Architecture

TriageAI architectureA firing alert or a bug report from Jira, Sentry, GitHub or a raw log paste goes through an input normalizer with secret redaction, then into a Claude agent loop. The loop has read-only incident tools (get_alerts, query_metrics, search_logs, list_changes) and code tools (search_codebase, read_file, git_blame, list_recent_commits, run_test). An output formatter posts the result to the incident channel, a GitHub comment, a Jira comment or the web UI.Starts fromFiring alertAlertmanager, PagerDutyJira ticketSentry errorGitHub issueRaw log pasteInput normalizer+ secret redactionClaude agent loopevery tool is read-onlyIncident toolsget_alertsquery_metricssearch_logslist_changesCode tools, when the cause is in codesearch_codebaseread_filegit_blamelist_recent_commitsrun_testOutput formatterfixed sectionsPosted toIncident channelGitHub commentJira commentWeb UI
  1. Layer 1

    Input sources

    An investigation starts from a firing alert or a bug report: a page from Alertmanager or PagerDuty, a Jira webhook, a Sentry event, a new GitHub issue or text pasted into the web UI. None of them is trusted.

  2. Layer 2

    Input normalizer

    Every source is converted into one shape: what failed, where, since when, and any stack trace or context. A sanitizer strips API keys, tokens, passwords, connection strings and emails before anything reaches the model.

  3. Layer 3

    Claude agent loop

    Claude investigates the way a senior engineer would. For an outage it checks impact, ranks recent changes and reads metrics and logs. When the cause is in code, it searches the codebase, reads the failing lines and checks git blame. Every tool is read-only.

  4. Layer 4

    Output formatter

    The result is split into fixed sections: timeline, blast radius and mitigation for an outage, then root cause, suggested fix and regression test when it reaches code. Every result has the same shape wherever it's posted.

  5. Layer 5

    Destinations

    The result goes back where the investigation started: the incident channel, a GitHub or Jira comment, or the web UI with the full investigation trace. Each one carries a note that it's a hypothesis for review.

The agent loop

TriageAI calls Claude with the system prompt, the normalized report and the list of tools. While Claude stops with tool_use, TriageAI runs the requested tool, appends the result and calls again.

When Claude stops with end_turn, the answer is formatted and posted. A cap of 12 iterations and an overall timeout keep a stuck investigation from running forever.

The agent loopTriageAI calls Claude with the system prompt, the normalized report and the tool list. If the stop reason is tool_use, it executes the requested tool, appends the result and calls Claude again. If the stop reason is end_turn, it formats the output and posts it to the incident or ticket. The loop is capped at 12 iterations and an overall timeout.Call Claudesystem prompt + report + toolsstop_reason?tool_useExecute the toolaudited, read-onlyAppend tool_resultend_turnFormat the output3 sectionsPost the resultflagged for human reviewGuardsmax 12 iterations, timeout

The incident tools

For an outage, the loop starts from a firing alert and works outward across services with these read-only tools. When the trail leads into code, it switches to the code tools in the diagram.

More on outage analysis
get_alerts
Firing and recently resolved alerts for the affected services.
query_metrics
Latency, error rate and saturation series for a service and time window.
search_logs
Error logs and traces, filtered by service, time range and pattern.
list_changes
Deploys, config changes, feature-flag flips and Kubernetes events in the window.

Watch TriageAI work a sample outage

Follow it from the alert to the change behind it and the exact line of code, then get the fix and a regression test. You review every step.