Skip to main content
An investigation takes a cluster of related issue reports on one agent and works toward a prompt fix: the AI generates hypotheses about the root cause, drafts prompt candidates (you can add your own), each candidate can be tested in an experiment (replaying the failing calls’ inputs against the candidate prompt), and the winning candidate is applied to the agent. Status flow: idlegenerating_hypothesesawaiting_candidatessearchingreadyapplied (or dismissed at any point). Starting an investigation kicks off the whole flow automatically — diagnosis, candidate prompt changes, and replay testing for each one. Steps run asynchronously — poll the detail endpoint.

Endpoints

All ids on this page are UUIDs except agent_id and call_ids.

Investigation object

The list endpoint returns {"results": [...]} with the same fields minus the nested candidates and experiments.

Start an investigation

Returns 201 with the investigation already running (status="generating_hypotheses") — creation launches the full flow automatically: diagnosis and baseline replays, then the autonomous fix search. Poll GET …/{investigation_id} until status="ready" and read search_result.

Drive the workflow

  1. Poll GET …/{investigation_id} — the investigation advances through generating_hypothesesawaiting_candidatessearchingready on its own.
  2. POST …/candidates/manual — add your own candidate at any non-terminal point: {"label", "prompt", "rationale"?}201 with the new candidate. Manual candidates join the next search round, or can be tested directly (next step).
  3. POST …/candidates/{candidate_id}/experiments — body {"config": {…}} (optional). Replays the failing calls’ inputs against the candidate prompt asynchronously. Returns 201 with the experiment (status: "running"); poll GET …/experiments/{experiment_id} until completed / failed.
  4. POST …/apply — body {"candidate_id": "…"}. Writes the candidate’s prompt to the agent, records an agent config version, sets status applied, and auto-resolves the investigation’s linked issue reports. Allowed from ready / awaiting_candidates (409 otherwise). Returns the final investigation.
  5. POST …/hypotheses — re-kick diagnosis on an investigation that ended idle (for example after an interrupted run). 409 when a run is already in progress.
To abandon an investigation: PATCH /v1/investigations/{id} with {"status": "dismissed"}dismissed is the only status a client may set directly.
apply stages the fix in the agent’s draft (your other pending draft edits are preserved; the live prompt is untouched until you deploy). Pass "deploy": true to deploy in the same call, and "with_ack": true on a tier-upgrade candidate to enable acknowledgements at the same time. A 409 means the prompt changed since the fix was tested — re-run the investigation against the current prompt.
POST /v1/investigations/{investigation_id}/search Runs the autonomous fix search: the AI drafts diverse prompt changes (and, for eligible agents, a tier upgrade), screens each one in parallel replays of the AI turn, culls weak variants, and confirms the best result on fresh replays plus calls without the issue. The investigation’s search_result carries the outcome — tier is fixed (eliminated in a confirmation round), improved (a confirmed reduction), or null when no change was confirmed. A completed search with no winner flags the cluster to ThunderPhone with the replay evidence; when stopped_early is "testing_incomplete" or "replay_budget_exhausted" the search could not finish verifying its candidates, nothing is flagged, and rerunning the search is the right next step (previous searches’ best unconfirmed changes are carried into the new round automatically).

Issue Reports

The raw material investigations start from.

Test Scenarios

Guard the fix with a promoted regression scenario.

Agents

Applied fixes appear in the agent’s version history.

Calls

Evidence calls are ordinary call logs.