{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sample-d24e44d4-f163-477e-8d21-0a533477eaf7",
    "generated_at": "2026-11-07T07:36:23.638Z",
    "event_count": 4,
    "algorithm": "sha256-chain",
    "content_digest": "5c40c13aa76d1d9a56bfb3caa895877ed13c4f94c0066fcd0c5ee3692f6155d9",
    "replay": {
      "cassette_digest": "4abf2e06aaee42911e49810accd7cf7dfb80983454aed82115ab1dbef60a92cb",
      "entry_count": 3,
      "algorithm": "oracle-chain/sha256",
      "note": "The run's oracle stream — every model response and tool output, hash-chained. Re-execute the agent against `events` with @runback/replay and the cassette digest must reproduce. This is proof the recording IS the deterministic input stream of the run — an audit you can re-run, not just read."
    },
    "signed": true,
    "signature": {
      "alg": "Ed25519",
      "value": "a803740fdf27cec6f0f6cbd129254293d7c180c3c8de1ea5312bf138131fd113e41c6890cde5a0320f7950445418e63baba521ba060370679f0a1403b861f60f",
      "pubkey": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEArDPmR+Gvu1HawnSvM6xjZao7BVPPQ80Qq3sa1hAYvDU=\n-----END PUBLIC KEY-----\n"
    },
    "verify": "Recompute the event chain h_i = SHA-256(h_{i-1} + canonical(event_i)) over `events` → must equal content_digest. Recompute the oracle-stream digest from `events` → must equal replay.cassette_digest. The signature covers `${content_digest}:${cassette_digest}`. Ed25519: verify with the public key embedded in manifest.signature.pubkey (no server key needed — fully offline-verifiable). HMAC-SHA256 (legacy): requires AUDIT_SIGNING_KEY. POST this record to /api/audit/verify.",
    "spec_url": "https://runback.dev/spec",
    "verifier_url": "https://runback.dev/verify"
  },
  "run": {
    "run_id": "sample-d24e44d4-f163-477e-8d21-0a533477eaf7",
    "name": "runback-sample-agent",
    "status": "error",
    "input": "Sample run — Charge customer #6631 A$89 for the overdue invoice.",
    "output": null,
    "error": {
      "name": "CardDeclined",
      "message": "charge_card failed: CardDeclined"
    },
    "metadata": {
      "demo": true,
      "note": "Generated by Runback so you have something to look at. Not a record of your agents.",
      "scenario": "card-declined",
      "runback:sample-run": true
    },
    "step_count": 1,
    "total_tokens": 940,
    "started_at": "2026-11-07T00:04:46.493+00:00",
    "ended_at": "2026-11-07T00:04:48.293+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "runback-sample-agent",
      "type": "run",
      "error": null,
      "input": "Sample run — Charge customer #6631 A$89 for the overdue invoice.",
      "phase": "start",
      "output": null,
      "run_id": "sample-d24e44d4-f163-477e-8d21-0a533477eaf7",
      "status": "running",
      "ts_end": null,
      "span_id": "r0",
      "metadata": {
        "demo": true,
        "note": "Generated by Runback so you have something to look at. Not a record of your agents.",
        "scenario": "card-declined",
        "runback:sample-run": true
      },
      "ts_start": "2026-11-07T00:04:46.493Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "ed0b9c68dc38fa63d89401eadb569806f020a2c9fe7d600ed6ef03c6d084d7ac"
    },
    {
      "seq": 1,
      "type": "tool",
      "error": null,
      "input": {
        "customer_id": "6631"
      },
      "output": {
        "amount_aud": 89,
        "invoice_id": "inv_6631_09",
        "card_on_file": true,
        "days_overdue": 12
      },
      "run_id": "sample-d24e44d4-f163-477e-8d21-0a533477eaf7",
      "ts_end": "2026-11-07T00:04:46.817Z",
      "span_id": "t1",
      "metadata": {
        "demo": true,
        "note": "Generated by Runback so you have something to look at. Not a record of your agents.",
        "scenario": "card-declined",
        "runback:sample-run": true
      },
      "ts_start": "2026-11-07T00:04:46.673Z",
      "tool_name": "lookup_invoice",
      "tool_call_id": "call_1",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "1a129a9bc7bce0cb22c9f6db9a38b67e78ba4c56689ee1d70d4afb4c63b0b6d9"
    },
    {
      "seq": 2,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 752,
        "total_tokens": 940,
        "output_tokens": 188
      },
      "run_id": "sample-d24e44d4-f163-477e-8d21-0a533477eaf7",
      "ts_end": "2026-11-07T00:04:47.609Z",
      "request": {
        "tools": [],
        "params": {
          "temperature": 0,
          "max_output_tokens": 300
        },
        "system": "You are a billing agent. Collect overdue invoices by charging the card on file.",
        "messages": [
          {
            "role": "user",
            "content": "Invoice inv_6631_09 for customer #6631 is 12 days overdue."
          },
          {
            "role": "assistant",
            "content": "Calling lookup_invoice."
          },
          {
            "role": "user",
            "content": "{\"invoice_id\":\"inv_6631_09\",\"amount_aud\":89,\"days_overdue\":12,\"card_on_file\":true}"
          }
        ]
      },
      "span_id": "l1",
      "metadata": {
        "demo": true,
        "note": "Generated by Runback so you have something to look at. Not a record of your agents.",
        "scenario": "card-declined",
        "runback:sample-run": true
      },
      "response": {
        "text": "The invoice is overdue and a card is on file. Charging A$89.00.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-07T00:04:46.853Z",
      "latency_ms": 756,
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "8ffe8cb892ad080476fed51a0bac8ae774dcb0e9239ce57f8788bfd1dbc1ebf2"
    },
    {
      "seq": 3,
      "type": "tool",
      "error": {
        "name": "CardDeclined",
        "message": "Card declined by issuer — insufficient funds."
      },
      "input": {
        "amount_aud": 89,
        "customer_id": "6631"
      },
      "output": null,
      "run_id": "sample-d24e44d4-f163-477e-8d21-0a533477eaf7",
      "ts_end": "2026-11-07T00:04:47.753Z",
      "span_id": "t2",
      "metadata": {
        "demo": true,
        "note": "Generated by Runback so you have something to look at. Not a record of your agents.",
        "scenario": "card-declined",
        "runback:sample-run": true
      },
      "ts_start": "2026-11-07T00:04:47.663Z",
      "tool_name": "charge_card",
      "tool_call_id": "call_2",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "5c40c13aa76d1d9a56bfb3caa895877ed13c4f94c0066fcd0c5ee3692f6155d9"
    }
  ]
}