Appearance
Decision Replay
Reconstructs, step by step, exactly what happened during a decision (or an entire multi-run Runtime Session) — a "flight recorder" for audit and debugging.
Two scopes
- Single-run replay —
GET /runtime/decision-records/{id}/replay. Replays exactly the one Agent Run identified by{id}. - Session replay —
GET /runtime/sessions/{id}/replay. Merges every Agent Run this session has ever owned (initial attempt + every retry) into one chronological timeline, clearly labeling which step belongs to whichrun_id.
Use session replay when you want the whole story, including retries; use single-run replay when you only care about one specific attempt.
Why replay is trustworthy across retries
Because each Agent Run produces its own immutable Decision Context Record, a step from Agent Run #1 will never show data from Agent Run #2 — even after a retry. Each ReplayStep's snapshot fields (agent_output_snapshot, evidence_snapshot, policy_snapshot, risk_snapshot) progressively reveal exactly what was known at that point in that specific run, never a later run's data.
Replay step shape
ts
interface ReplayStep {
step_id; sequence_number; timestamp; event_type; actor;
run_id: string | null; // which Agent Run this step belongs to
state_before: ExecutionState | null;
state_after: ExecutionState | null;
control_action: ControlAction | null;
summary: string;
clinical_context_snapshot; agent_output_snapshot; policy_snapshot;
evidence_snapshot; risk_snapshot; reviewer_action_snapshot;
}SDK usage
ts
const singleRun = await runtime.getDecisionReplay(decisionId);
const wholeSession = await runtime.getSessionReplay(sessionId);
for (const step of wholeSession.replay_steps) {
console.log(step.run_id, step.event_type, step.state_after);
}Every reference integration and the Quickstart retrieve session replay at the end — see Quickstart step 10.