Intake
Puts an alert or console request into a standard incident format. Screens its text for prompt injection: instructions that try to redirect the AI.
- intake
DesignHow it works
01 of 05 · 2 min readFour agents gather evidence in parallel. One proposes a plan, a critic challenges it, code checks it and a person approves it. It takes more model calls than one agent.
Turns an alert or console request into a standard incident format. It re-checks that sensitive text is hidden, keeps the operator's note separate and screens for prompt injection: text that tries to redirect the agent.
Re-checks redaction
Keeps the operator's note separate
Screens the text for prompt injection
log_agent reads logs and code_agent reads code. change_agent lists recent changes and history_agent searches past incidents and runbooks. Each has one read-only tool and cites evidence IDs.
log_agent and code_agent: findings, file and lines
change_agent: recent commits and deploys
history_agent: past incidents and runbooks
gather_findings collects results under each specialist's name. The synthesizer writes the diagnosis and saves it to state as the proposal. The run's profile selects its model (mixed on staging).
Each specialist returns success, partial or failed
A specialist that misses its deadline stops; results still combine
synthesizer: Diagnosis output schema, no tools
critic_1 reviews the diagnosis. If revision is needed, follow_up_agent gathers more evidence and the reviser rewrites the diagnosis. critic_2 then passes it or marks it unresolved. An unresolved result ends the run without an action.
critic_1: pass, or revise
Revise: follow_up_agent gathers more evidence, reviser rewrites
critic_2: pass, or unresolved
validate_proposal checks the plan against the action catalog, patch and citations. An invalid plan is reported unresolved. The gate pauses once for human review, saves approved or rejected to state and chooses the next step from that decision.
validate_proposal checks actions, patch and citations
approval_gate pauses for a person
Writes approved or rejected to state
If approved, apply_mitigation and apply_patch re-check the approval and call action-runner, which makes the writes; verify_outcome then checks recovery. If rejected, record_rejection records the reviewer's comment.
Each action re-checks the approval; a failed re-check ends in record_blocked
action-runner applies the mitigation and opens the pull request
verify_outcome: recovered, contained or not recovered
route_postmortem sends live runs to postmortem_agent, which drafts a postmortem; store_postmortem_draft saves it as unreviewed knowledge. Recorded replays and comparison members skip this step.
Drafted after verified, rejected and unresolved runs
Recorded replays and comparison runs skip it
Stored as an unreviewed draft
Steps appear in order. Evidence, review and outcomes remain visible.
Evidence / agent workWaiting for a personFailingRecovered
THE TRADEOFF
No action can skip the critic, the checks or the approval, and each role uses the model that passed its test.
More model calls and a slower first answer. Changing the process means changing the graph.
The alternative: one agent with every tool, choosing its next step. Quicker to build, but nothing guarantees the checks run.
ONE RESULT
In live staging runs the agents found the connection leak from the evidence.
limitA handful of runs, not a rate. The first three live runs before 3f60dd3f ended unresolved, and its patch would not apply cleanly to the real file. A later run's patch applied at the deployed commit.
WHAT THIS DOES NOT CLAIM
MORE DETAIL
THE WORKFLOW
One run: intake, four specialists in parallel, gather_findings, synthesizer, the critic loop, validate_proposal and approval_gate. After the gate it runs apply_mitigation, apply_patch and verify_outcome if approved, or record_rejection; a postmortem draft follows.
The diagram draws the nodes on the main path. The step cards and the full node list below show all of them, including follow_up_agent, reviser, critic_2, the two route_critique nodes, verify_outcome and store_postmortem_draft.
The two Phase 1 live runs ended needs_more_data and did not name the connection leak. On staging since then, live runs found it and proposed the try/finally fix, and in five of six critic-loop runs the critic triggered a revision. These few runs do not establish a success rate. Every phase that added nodes was a graph change, and unfinished runs were drained first.
EACH STEP
Every node below is in today's graph. Agents read; function nodes route and act.
Puts an alert or console request into a standard incident format. Screens its text for prompt injection: instructions that try to redirect the AI.
Four agents read logs, code, recent changes and past incidents in parallel, and the join collects their results.
One agent writes the diagnosis; up to two critic passes challenge it, with at most one evidence follow-up and one revision.
Code checks the proposal first, then the run pauses until a person approves or rejects the exact plan.
Code re-checks approval before each action, calls action-runner and checks recovery. If the run stopped, it records why. A postmortem draft follows.
| Node | Kind | What it does | Added in |
|---|---|---|---|
| intake | Function | Turns an alert or a console request into a standard incident format. It re-checks redaction, keeps the operator's note apart, and screens the text for prompt injection; flagged text is labelled as data. | Phase 1 |
| log_agent | Agent, one read-only tool (fetch_service_logs) | Reads logs and returns findings with evidence IDs. | Phase 1 |
| code_agent | Agent, one read-only tool | Reads code and returns the file, lines and suspected defect, with evidence IDs. | Phase 1 |
| change_agent | Agent, one read-only tool (get_recent_changes) | Lists recent commits, config diffs and deployments near the incident start. It reports timing, not blame. | Phase 2 |
| history_agent | Agent, one retrieval tool (search_knowledge) | Finds similar past incidents, runbook steps and framework guidance, with kb: evidence IDs. Explains what matches, what differs and which remedy failed before. | Phase 4a |
| gather_findings | JoinNode | Collects results under each specialist's name. Each specialist returns success, partial or failed. A specialist that misses its deadline or raises an ordinary error is reported failed, so the workflow can still join the results. | Phase 1 |
| synthesizer | Agent, Diagnosis output schema, no tools | Writes the diagnosis and saves it to state as the proposal. Its model comes from the run's profile (mixed on staging). | Phase 1 |
| critic_1 / critic_2 | Agent, Critique output schema, no tools | Challenge the diagnosis with structured objections and questions about missing evidence. | Phase 4b |
| route_critique_1 | Function | Saves the critique and routes to pass or revise. | Phase 4b |
| follow_up_agent | Agent, read-only tools | Answers only the critic's missing-evidence questions, with new evidence IDs and at most three tool calls. | Phase 4b |
| reviser | Agent, Diagnosis output schema, no tools | Revises the diagnosis using the new evidence and the critique. | Phase 4b |
| route_critique_2 | Function | Routes to pass or unresolved. Unresolved runs end without any action and show the open objections. | Phase 4b |
| validate_proposal | Function | Fixed code checks before approval: the mitigation is in the allowed catalog, its parameters stay within limits, and the patch applies to the base commit and changes only allowed files. It also checks that every cited evidence ID, including kb: IDs, was issued to this run, and that flagged evidence does not support the action. | Phase 2 |
| approval_gate | Function, rerun_on_resume | The single pause for a human decision. It saves the outcome (approved or rejected) in state and selects the next step. | Phase 1 |
| record_blocked | Function | Ends the run as blocked and records the reason if an action's approval re-check fails. | Phase 2 |
| apply_mitigation | Function, with retries and a timeout | Re-checks the approval, then calls action-runner to apply an approved mitigation, if the plan has one. | Phase 2 |
| apply_patch | Function, with retries and a timeout | Re-checks the approval, then calls action-runner to open the pull request, if the plan has a change. Scripted runs use a mock and recorded replays take no action; live-tool runs open a real pull request. | Phase 1 |
| verify_outcome | Function | Polls service health for recovery within a deadline and records recovered or not recovered, with the pull request's state. It never merges. | Phase 2 |
| record_rejection | Function | Records the reviewer's comment. | Phase 1 |
| report_unresolved | Function | Records an unresolved outcome: more data needed (with the next checks and a suggested owner), open objections or a failed validation. | Phase 2 |
| postmortem_agent | Agent, no tools | Drafts the postmortem in Markdown with a low-cost model. | Phase 4a |
| route_postmortem | Function | Sends a finished run to the postmortem draft, except recorded replays and comparison members. | Phase 4a |
| store_postmortem_draft | Function | Saves the draft as a knowledge document with status draft. It is not searchable until an approver verifies it. | Phase 4a |
DESIGN RULES
Rules that keep the graph replayable and the risky parts in code.
Built
The critic loop sits before the gate and has no request for input inside it, which avoids the replay bugs seen with repeated interrupts. "Request changes" means reject with a comment; an operator can then continue it as a new linked run.
Built
The graph shows the full loop: at most one evidence follow-up, one revision and two critic passes. Each node shown corresponds to one node in the UI's live graph. The loop cannot run forever.
Built
An agent node returns content. Its output replaces its input on the next connection. Only function nodes choose the route, and state carries the proposal through the critic steps.
Built
Every run uses the same graph. Model choice is stored as data and does not change the graph's structure. Each run records its workflow version. If a deploy changes the graph, a run started on the old graph ends failed with a stale-workflow message and makes no model call. The version hash covers only node names, kinds and connections. Before deploying a graph change, the operator manually waits for unfinished runs to end.
Built
The join fires even if a specialist fails. A specialist that misses its deadline or raises an ordinary error is reported failed and the others continue. A budget stop or a run failure still ends the run.
Built
Every action goes through write_operations with a durable key (run_id:proposal_digest:action), an exclusive claim and reconciliation after an ambiguous response. Mitigations are written as "set to value", so repeating one is harmless.
Built
Models only pick a catalog action and parameters within bounds. validate_proposal checks them, a person approves the exact plan, and only action-runner executes it.
THE APPROVAL GATE
The server identifies the reviewer, who approves the exact proposal shown. The run stays paused until then.
Built
Built
MODEL ROUTING
Every role's model is wrapped in RoutedModel, which reserves budget before each attempt. A profile lists candidate models for each role in order. If one fails, the next answers, and the run shows which fallback model was used. A comparison replays one run's frozen evidence under several profiles.
| Role | Default in the plan | Mixed profile (staging default) |
|---|---|---|
| log_agent | A specialist model, which varies by profile | OpenAI gpt-6-luna, then Gemini |
| code_agent | A specialist model, which varies by profile | Claude Sonnet 5.5, then Gemini |
| change_agent / history_agent | A specialist model, which varies by profile | Qwen 3 on Vertex AI, then Gemini |
| synthesizer | Gemini 3.8 Flash | Claude Sonnet 5.5, then Gemini |
| critic_1 / critic_2 | A reasoning model (plan section 5.2) | OpenAI gpt-6.1-sol, then Gemini |
| follow_up_agent | A model that the spike shows can make sequential tool calls | OpenAI gpt-6-luna, then Gemini |
| reviser | Gemini 3.8 Flash | Claude Sonnet 5.5, then Gemini |
| postmortem_agent | A low-cost model | Qwen 3 on Vertex AI, then Gemini |
WHAT YOU SEE
The engineer sees an incident console, a live graph with a node inspector, the graph after the run ends, and a thread with one card per agent. The Approval screen shows the hypothesis board, the critic's review and the diff (proposed code changes). Each run's page shows its estimated model cost, and comparisons show profiles side by side.