Skip to content

Run Records

RunRecord is the canonical audit artifact produced by aioc when run(..., { record }) is configured.

It supports:

  • post-incident review
  • reproducibility checks after prompt or policy changes
  • structured comparison across runs
  • replay-oriented regression analysis
  • items
  • inputItemCount
  • promptSnapshots
  • requestFingerprints
  • policyDecisions
  • guardrailDecisions
  • metadata

items contains the complete normalized run trajectory: the input that was passed to run(...) plus items produced while the run executes.

inputItemCount marks where the original normalized input ends inside items. This lets replay and inspection tools distinguish:

  • prior conversation history and the current user message that started the run
  • tool calls, tool outputs, and assistant messages emitted by the recorded run

For older records that do not include inputItemCount, replay and inspection utilities may infer the boundary from the first request fingerprint messageCount. If neither value is available, they must fall back to the recorded question and the replay is not history-faithful.

contextSnapshot captures the initial context passed to run(...). It is not the final mutable application state after tools execute.

Use contextRedactor before durable persistence, and persist final app-owned state through your own state store when needed.

aioc also exposes utilities that operate on run records:

  • extractToolCalls(...)
  • compareRunRecords(...)
  • replayFromRunRecord(...)

These are intended to reduce application boilerplate for analysis and non-regression workflows.