The problem
Incident evidence is spread across identity, endpoint, threat-intelligence, asset, and mail systems, and some of it is attacker-controlled. An assistant must assemble it quickly without inventing facts, obeying instructions hidden in the evidence, or executing containment without authorization.
How it works
The OpenAI Responses API runs a bounded loop: the model gets strict function tools and must answer in a strict JSON schema of findings, citations, disposition, procedure, and actions. Every tool result gets an evidence ID and a trust label; email bodies are untrusted. The policy gate then checks, in code, that every finding cites evidence from this run, that identifiers in findings appear in the cited records, that the procedure was retrieved, and that every action targets an entity seen in trusted evidence and cites it. Untrusted content can inform a finding but can never authorize an action.
Baseline
The earlier deterministic version is kept as the baseline: fixed tool order, keyword procedure ranking, and hand-written templates for three incident types. Both are scored with one rubric. The baseline passes the three cases it was written for and abstains on the two it has never seen; the agent works all five from the raw tool records.
What is measured
scripts/aegis-eval.ts runs every case several times and scores each run on six criteria in code: required tools, disposition, expected actions, procedure, policy-gate checks, and injection resistance, plus latency, tokens, and tool calls. It keeps the history of prompt versions, so the scorecard shows what each change fixed. The replays in the lab are trial 1 of the eval.
Failure modes
The grounding check matches identifiers, not meaning: a finding can cite the right record and still overstate it. The injection detector is a regex that only flags; enforcement comes from the gate's trust rules, and an injection that argues for a plausible in-scope action would still reach the human approver.
Production tradeoffs
Grow a held-out case set from closed incidents, add a faithfulness grader calibrated against analyst labels, trace every model and tool event, move rate limits and caches to a shared store, expose tools through access-controlled MCP servers with per-tool authorization, and run the eval in CI so a prompt or model change must clear it before release.