Anomalies
The Anomalies routes of Amiril's HTTP API that an OAuth access token can call, with their parameters, request bodies and responses.
The agent's strongest current evidence across its names โ the stored-signal strip on the agent page.
Any access token can call this, read-only or full.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
agentId*stringTop signals
application/json- response
signals*array<>curl -X GET 'https://api.amiril.ai/api/agents/string/signals'{ "signals": [ { "road": "string", "signal": "string", "tool": "string", "path": "string", "source": "string", "eventId": "string", "eventType": "string", "value": null, "rarity": 0, "channel": "string", "findingClass": "whole_run", "record": true, "novel": true, "sentence": "string", "inHeadline": true, "headlineRank": 0, "group": "string", "groupLead": true, "suppressed": true, "verdict": { "verdict": "signal", "reason": "string", "source": "inferred", "judgedSentence": "string", "divergent": true, "judgedAt": "string" }, "runId": "string" } ]}Who was involved, where the rarity sits against the lens population, the summary if one ran, every rarity factor with its baseline presentation, and the member runs. Works for the built-in run lens and every data lens.
Any access token can call this, read-only or full.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
unitKind*stringunitId*stringdays?integer1 <= value <= 365hours?integer1 <= value <= 8760from?stringto?stringAnomaly detail
application/json- response
unitKind*stringunitId*stringidentityVersion*numberagentKey*stringcomplete*booleanstartTs*stringendTs*stringitems*numberscores*wholeRunScore*numbersingleEventScore*numberfields*actors*array<>standing*|nullbaseline*|nulloutcome*|nullsummary*|nulldraft*|nullreview*evidence*array<>members*array<>curl -X GET 'https://api.amiril.ai/api/anomalies/string/string'{ "unitKind": "string", "unitId": "string", "identityVersion": 0, "agentKey": "string", "complete": true, "startTs": "string", "endTs": "string", "items": 0, "scores": { "top3": 0, "sum": 0, "mean": 0 }, "wholeRunScore": 0, "singleEventScore": 0, "fields": { "property1": "string", "property2": "string" }, "actors": [ { "agentKey": "string", "runs": 0 } ], "standing": { "higher": 0, "lower": 0, "total": 0, "windowDays": 0, "stoodOut": true, "bar": 0, "anomalyClass": "whole_run", "wholeRunAnomaly": true, "singleEventAnomaly": true }, "baseline": { "edges": [ 0 ], "counts": [ 0 ], "scale": "linear", "n": 0, "score": 0, "observedBin": 0 }, "outcome": { "succeeded": true, "by": "condition", "expected": true }, "summary": { "status": "queued", "headline": "string", "whatHappened": "string", "guess": "likely_mistake", "guessReason": "string", "ruleFit": "fits", "ruleFitReason": "string", "requestedAs": "auto", "citedEvidence": [ "string" ], "model": "string", "error": "string", "paused": "allowance_used", "stale": true, "updatedAt": "string" }, "draft": { "id": "string", "source": "summariser", "instruction": "string", "outcome": "offered", "reason": "string", "name": "string", "text": "string", "rule": { "property1": null, "property2": null }, "tools": [ "string" ], "action": "block", "sentence": "string", "agentId": "string", "agentName": "string", "firesOnRun": true, "backtest": { "pastRuns": 0, "firedRuns": 0, "callsScanned": 0, "callsFired": 0, "exampleRuns": [ "string" ], "few": true, "capped": true }, "model": "string", "createdAt": "string" }, "review": { "verdict": { "verdict": "real", "reason": "string", "reviewer": "string", "judgedAt": "string", "attributedFinding": { "road": "string", "signal": "string", "tool": "string", "path": "string", "source": "string", "runId": "string" } }, "investigator": { "verdict": "real", "reason": "string" }, "legacyMarks": 0 }, "evidence": [ { "road": "string", "signal": "string", "tool": "string", "path": "string", "source": "string", "eventId": "string", "eventType": "string", "value": null, "rarity": 0, "channel": "string", "findingClass": "whole_run", "record": true, "novel": true, "sentence": "string", "inHeadline": true, "headlineRank": 0, "group": "string", "groupLead": true, "suppressed": true, "verdict": { "verdict": "signal", "reason": "string", "source": "inferred", "judgedSentence": "string", "divergent": true, "judgedAt": "string" }, "presentation": { "kind": "histogram", "value": 0, "n": 0, "edges": [ 0 ], "counts": [ 0 ], "scale": "linear", "observedBin": 0, "population": "agent" }, "calibrated": 0, "rarestOf": 0, "runId": "string" } ], "members": [ { "runId": "string", "agentKey": "string", "top3": 0, "items": 0, "complete": true, "startTs": "string", "via": { "kind": "string", "at": "string" } } ]}Removes the anomaly's verdict and the rarity factor marks it wrote. Marks made by hand and other anomalies' marks stay. Responds with the anomaly's review.
Needs a full access token. A read-only token is refused.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
unitKind*stringunitId*stringThe anomaly's review
application/json- response
verdict*|nullinvestigator*|nulllegacyMarks*numbercurl -X DELETE 'https://api.amiril.ai/api/anomalies/string/string/verdict'{ "verdict": { "verdict": "real", "reason": "string", "reviewer": "string", "judgedAt": "string", "attributedFinding": { "road": "string", "signal": "string", "tool": "string", "path": "string", "source": "string", "runId": "string" } }, "investigator": { "verdict": "real", "reason": "string" }, "legacyMarks": 0}Records the reviewer's verdict on the anomaly as a whole, real (a confirmed issue) or not real (normal behavior), one per anomaly, and writes the rarity factor marks it implies: the headline rarity factors of the verdict rarity (the strongest rarity factor of each of its three strongest groups, the ones that count toward the rarity) are marked, or only the rarity factor named in attributedFinding. When the unit's grain has no calibration, or only some rarity factors are graded, raw rarity picks the headline rarity factors instead. Real marks them signal, not real marks them noise. Those marks feed the quiet fields, so a field goes quiet when its rarity factors keep appearing in anomalies marked not real and never in one marked real. Reviewing again replaces the earlier verdict and its marks. Responds with the anomaly's review.
Needs a full access token. A read-only token is refused.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
unitKind*stringunitId*stringapplication/json- body
verdict*AnomalyVerdictWord"real""not_real"reason?|nullattributedFinding?The anomaly's review
application/json- response
verdict*|nullinvestigator*|nulllegacyMarks*numbercurl -X PUT 'https://api.amiril.ai/api/anomalies/string/string/verdict' \ -H 'Content-Type: application/json' \ -d '{ "verdict": "real"}'{ "verdict": { "verdict": "real", "reason": "string", "reviewer": "string", "judgedAt": "string", "attributedFinding": { "road": "string", "signal": "string", "tool": "string", "path": "string", "source": "string", "runId": "string" } }, "investigator": { "verdict": "real", "reason": "string" }, "legacyMarks": 0}Every stored event of every involved run, one time-ordered log. Steps carry their run and agent so handoffs between agents are visible; flagged steps carry evidence.
Any access token can call this, read-only or full.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
unitKind*stringunitId*stringmaxFieldChars?integerCut every string in a step longer than this, ending it with a note of its full length
100 <= value <= 100000stepOffset?integerSkip this many steps (after flaggedOnly)
0 <= value <= 9007199254740991stepLimit?integerReturn at most this many steps
1 <= value <= 10000flaggedOnly?stringOnly the steps that carry evidence
"true""false"Time-ordered steps
application/json- response
unitKind*stringunitId*stringsteps*array<>stepCount*numbermatchedSteps?numberroots*runTotals?curl -X GET 'https://api.amiril.ai/api/trace/string/string'{ "unitKind": "string", "unitId": "string", "steps": [ { "eventId": "string", "type": "string", "kind": "generation", "ts": "string", "tool": "string", "payload": { "property1": null, "property2": null }, "payloadTruncated": true, "flagged": true, "textCaptureOff": true, "parentEventId": "string", "name": "string", "spanKind": "string", "endTs": "string", "durationMs": 0, "durationIsEstimate": true, "level": "debug", "statusMessage": "string", "model": "string", "modelParameters": { "property1": null, "property2": null }, "usage": { "input": 0, "output": 0, "total": 0 }, "cost": { "input": 0, "output": 0, "total": 0 }, "ttftMs": 0, "metadata": { "property1": "string", "property2": "string" }, "runId": "string", "agentKey": "string" } ], "stepCount": 0, "matchedSteps": 0, "roots": { "property1": { "name": "string", "tags": [ "string" ], "metadata": { "property1": "string", "property2": "string" }, "sessionId": "string", "ids": { "property1": "string", "property2": "string" } }, "property2": { "name": "string", "tags": [ "string" ], "metadata": { "property1": "string", "property2": "string" }, "sessionId": "string", "ids": { "property1": "string", "property2": "string" } } }, "runTotals": { "property1": { "durationMs": 0, "tokens": { "input": 0, "output": 0, "total": 0 }, "cost": 0, "errorCount": 0, "warningCount": 0, "models": [ "string" ] }, "property2": { "durationMs": 0, "tokens": { "input": 0, "output": 0, "total": 0 }, "cost": 0, "errorCount": 0, "warningCount": 0, "models": [ "string" ] } }}Most unusual runs in the window, worst first, ranked by a materialized fold column. Judged runs carry their verdict count so the list can sink them.
Any access token can call this, read-only or full.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
days?integer1 <= value <= 36530rank?string"top3""top3""sum""mean"unit?string1 <= length <= 200"run"field?stringvalue?stringagentId?stringrecords?string"0""1""true""false"limit?integer1 <= value <= 20050Ranked runs
application/json- response
windowDays*numberfrom*string|nullto*string|nullrank*string"top3""sum""mean"unit*stringrecords*booleandanglingAgent*booleandanglingUnit*booleandanglingField*booleanentries*array<>curl -X GET 'https://api.amiril.ai/api/anomalies'{ "windowDays": 0, "from": "string", "to": "string", "rank": "top3", "unit": "string", "records": true, "danglingAgent": true, "danglingUnit": true, "danglingField": true, "entries": [ { "runId": "string", "unit": "string", "fields": { "property1": "string", "property2": "string" }, "membersCount": 0, "agentKey": "string", "score": 0, "scores": { "top3": 0, "sum": 0, "mean": 0 }, "items": 0, "complete": true, "startTs": "string", "endTs": "string", "scoredAt": "string", "topSentence": "string", "judgedCount": 0, "summary": { "headline": "string", "stale": true } } ]}Each rarity factor's baseline presentation (histogram, bars, fields or sequence), keyed as the run's evidence is. eventId narrows to one event's rarity factors; an empty eventId names the run's own. Loaded when rarity factors are shown, so a long run's response stays small.
Any access token can call this, read-only or full.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
runId*stringPresentations
application/json- response
presentations*array<>curl -X GET 'https://api.amiril.ai/api/runs/string/presentations'{ "presentations": [ { "road": "string", "signal": "string", "tool": "string", "path": "string", "source": "string", "eventId": "string", "presentation": { "kind": "histogram", "value": 0, "n": 0, "edges": [ 0 ], "counts": [ 0 ], "scale": "linear", "observedBin": 0, "population": "agent" } } ]}Rarity factors (evidence) strongest first with verdicts and rarity, the run's structural topic with its name and label (a topic labelled bad is a reason to review the run of its own, outside its rarity), the turn layer's reasons naming their turns (a turn in a turn topic labelled bad, a shared concept, an ungrounded value, a novel turn; also outside the rarity), the run's one-sentence summary (what the user wanted, what went wrong and how it ended) with its run topic, and the step-by-step event list (the oldest 10,000 events) with flagged steps badged. Baseline presentations load per event from GET /api/runs/:runId/presentations.
Any access token can call this, read-only or full.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
runId*stringmaxFieldChars?integerCut every string in a step longer than this, ending it with a note of its full length
100 <= value <= 100000stepOffset?integerSkip this many steps (after flaggedOnly)
0 <= value <= 9007199254740991stepLimit?integerReturn at most this many steps
1 <= value <= 10000flaggedOnly?stringOnly the steps that carry evidence
"true""false"Run detail
application/json- response
runId*stringagentKey*stringcomplete*booleanstartTs*stringendTs*stringitems*numberscores*wholeRunScore*numbersingleEventScore*numberextractorVersion*stringverdict*evidence*array<>cluster*|nullturnReasons*array<|||>facet*|nullsteps*array<>stepCount*numbermatchedSteps?numberroot*totals*curl -X GET 'https://api.amiril.ai/api/runs/string'{ "runId": "string", "agentKey": "string", "complete": true, "startTs": "string", "endTs": "string", "items": 0, "scores": { "top3": 0, "sum": 0, "mean": 0 }, "wholeRunScore": 0, "singleEventScore": 0, "extractorVersion": "string", "verdict": { "stoodOut": true, "bar": 0, "topShare": 0 }, "evidence": [ { "road": "string", "signal": "string", "tool": "string", "path": "string", "source": "string", "eventId": "string", "eventType": "string", "value": null, "rarity": 0, "channel": "string", "findingClass": "whole_run", "record": true, "novel": true, "sentence": "string", "inHeadline": true, "headlineRank": 0, "group": "string", "groupLead": true, "suppressed": true, "verdict": { "verdict": "signal", "reason": "string", "source": "inferred", "judgedSentence": "string", "divergent": true, "judgedAt": "string" }, "calibrated": 0, "rarestOf": 0 } ], "cluster": { "key": "string", "letter": "string", "name": "string", "label": "bad" }, "turnReasons": [ { "kind": "turn_cluster", "role": "user", "position": 0, "cluster": { "key": "string", "name": "string" } } ], "facet": { "text": "string", "writer": "string", "writtenAt": "string", "cluster": { "key": "string", "letter": "string", "name": "string", "label": "bad" }, "distance": 0, "failure": { "text": "string", "cluster": { "key": "string", "letter": "string", "name": "string", "label": "bad" } } }, "steps": [ { "eventId": "string", "type": "string", "kind": "generation", "ts": "string", "tool": "string", "payload": { "property1": null, "property2": null }, "payloadTruncated": true, "flagged": true, "textCaptureOff": true, "parentEventId": "string", "name": "string", "spanKind": "string", "endTs": "string", "durationMs": 0, "durationIsEstimate": true, "level": "debug", "statusMessage": "string", "model": "string", "modelParameters": { "property1": null, "property2": null }, "usage": { "input": 0, "output": 0, "total": 0 }, "cost": { "input": 0, "output": 0, "total": 0 }, "ttftMs": 0, "metadata": { "property1": "string", "property2": "string" } } ], "stepCount": 0, "matchedSteps": 0, "root": { "name": "string", "tags": [ "string" ], "metadata": { "property1": "string", "property2": "string" }, "sessionId": "string", "ids": { "property1": "string", "property2": "string" } }, "totals": { "durationMs": 0, "tokens": { "input": 0, "output": 0, "total": 0 }, "cost": 0, "errorCount": 0, "warningCount": 0, "models": [ "string" ] }}The run's conversation turns in order, each side (the user's words, the agent's reply) with its turn topic (nearest centroid within its cut-off; null for no-match or before a fit) with name and label, its novelty against the agent's earlier turns, the shared concepts it hit and, on agent turns, the values it stated that no earlier tool result, user turn or instruction stated. Text only when the workspace keeps message text. reasons are the run's turn-layer reasons as the Anomalies list reads them.
Any access token can call this, read-only or full.
accessTokenAuthorizationBearer <JWT>An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.
runId*stringThe run's turns
application/json- response
runId*stringturns*array<>reasons*array<|||>curl -X GET 'https://api.amiril.ai/api/runs/string/turns'{ "runId": "string", "turns": [ { "position": 0, "role": "user", "eventId": "string", "text": "string", "cluster": { "key": "string", "letter": "string", "name": "string", "label": "bad" }, "distance": 0, "novelty": 0, "noveltyShare": 0, "concepts": [ { "id": "string", "label": "string" } ], "ungrounded": [ "string" ] } ], "reasons": [ { "kind": "turn_cluster", "role": "user", "position": 0, "cluster": { "key": "string", "name": "string" } } ]}