{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-research-f12c4cf7ed3b",
    "generated_at": "2026-11-07T07:28:26.963Z",
    "event_count": 5,
    "algorithm": "sha256-chain",
    "content_digest": "882b54dc9c7512cfa4689d26e88c94b28607988c33d45401cbc07ee96bc1b2fc",
    "replay": {
      "cassette_digest": "bf42b0736d1849213a4410befaf32efa5f4ad1009f66371f492939ded5585d34",
      "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": "ab91708449d78158a3a42020bfa3fe29eefad308ad3035402f71fa28ae7aaca017ec56d639bef0b8a1673f05c402bde2e3ce4b9de1264921a95e79aefaf1980f",
      "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": "sbx-research-f12c4cf7ed3b",
    "name": "research-agent",
    "status": "success",
    "input": "Summarise this week's trend in delivery delays and whether it needs attention.",
    "output": {
      "summary": "This week's trend in delivery delays shows an average of approximately 109 delays per day, with a peak of 121 delays. The fluctuations suggest a potential issue that may need attention."
    },
    "error": null,
    "metadata": {
      "agent": {
        "description": "Summarises incident and market trends. Runback demo agent: real model calls and real policy decisions; its tools act on a sandbox of synthetic customers, orders and accounts.",
        "systemOfRecord": "Runback demo sandbox (synthetic data)"
      },
      "model": "gpt-4o-mini",
      "demo_agent": true,
      "est_cost_usd": 0.0001,
      "sandbox_tools": true,
      "scenario_seed": "research-agent:2026-11-07:13"
    },
    "step_count": 2,
    "total_tokens": 488,
    "started_at": "2026-11-07T02:10:55.718+00:00",
    "ended_at": "2026-11-07T02:11:00.787+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "research-agent",
      "type": "run",
      "error": null,
      "input": "Summarise this week's trend in delivery delays and whether it needs attention.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-research-f12c4cf7ed3b",
      "status": "running",
      "ts_end": "2026-11-07T02:11:00.787Z",
      "span_id": "r",
      "metadata": {
        "agent": {
          "description": "Summarises incident and market trends. Runback demo agent: real model calls and real policy decisions; its tools act on a sandbox of synthetic customers, orders and accounts.",
          "systemOfRecord": "Runback demo sandbox (synthetic data)"
        },
        "model": "gpt-4o-mini",
        "demo_agent": true,
        "est_cost_usd": 0.0001,
        "sandbox_tools": true,
        "scenario_seed": "research-agent:2026-11-07:13"
      },
      "ts_start": "2026-11-07T02:10:55.718Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "6f0fe85138ea89c0f3f895badfa73c16fa8fe136e82b50c47da7e38884916209"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 186,
        "total_tokens": 207,
        "output_tokens": 21
      },
      "run_id": "sbx-research-f12c4cf7ed3b",
      "ts_end": "2026-11-07T02:10:57.960Z",
      "request": {
        "tools": [
          {
            "name": "search_incidents",
            "parameters": {
              "type": "object",
              "required": [
                "query",
                "days"
              ],
              "properties": {
                "days": {
                  "type": "number",
                  "description": "Look-back window in days"
                },
                "query": {
                  "type": "string",
                  "description": "Search terms"
                }
              },
              "additionalProperties": false
            },
            "description": "Search the incident log."
          },
          {
            "name": "get_metric",
            "parameters": {
              "type": "object",
              "required": [
                "name",
                "days"
              ],
              "properties": {
                "days": {
                  "type": "number",
                  "description": "Days"
                },
                "name": {
                  "type": "string",
                  "description": "Metric name"
                }
              },
              "additionalProperties": false
            },
            "description": "Get a daily metric series."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's operations research agent. You are running in Runback's public demo sandbox: every customer, order, invoice and account is synthetic, and your tools act on test data only. Answer with a short, factual summary grounded only in what the tools return. Say plainly when the data is thin. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Summarise this week's trend in delivery delays and whether it needs attention."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "days": 7,
              "name": "delivery_delays"
            },
            "tool_name": "get_metric",
            "tool_call_id": "call_hjGieZI488TqooQ4aN35uCoi"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-07T02:10:55.718Z",
      "latency_ms": 2241,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "806809cb94a13c281f6e6f21c65c3afc9fb988ff3689cc572e9eefe77c660718"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "days": 7,
        "name": "delivery_delays"
      },
      "output": {
        "name": "delivery_delays",
        "unit": "count/day",
        "last_7_days": [
          95,
          116,
          118,
          90,
          104,
          91,
          121
        ]
      },
      "run_id": "sbx-research-f12c4cf7ed3b",
      "ts_end": "2026-11-07T02:10:58.069Z",
      "span_id": "t1",
      "ts_start": "2026-11-07T02:10:57.960Z",
      "tool_name": "get_metric",
      "latency_ms": 109,
      "tool_call_id": "call_hjGieZI488TqooQ4aN35uCoi",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "878a317e96512b7da5938a609b077a6001b2ce2c8e926512d463cde7290ecb2e"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 243,
        "total_tokens": 281,
        "output_tokens": 38
      },
      "run_id": "sbx-research-f12c4cf7ed3b",
      "ts_end": "2026-11-07T02:11:00.787Z",
      "request": {
        "tools": [
          {
            "name": "search_incidents",
            "parameters": {
              "type": "object",
              "required": [
                "query",
                "days"
              ],
              "properties": {
                "days": {
                  "type": "number",
                  "description": "Look-back window in days"
                },
                "query": {
                  "type": "string",
                  "description": "Search terms"
                }
              },
              "additionalProperties": false
            },
            "description": "Search the incident log."
          },
          {
            "name": "get_metric",
            "parameters": {
              "type": "object",
              "required": [
                "name",
                "days"
              ],
              "properties": {
                "days": {
                  "type": "number",
                  "description": "Days"
                },
                "name": {
                  "type": "string",
                  "description": "Metric name"
                }
              },
              "additionalProperties": false
            },
            "description": "Get a daily metric series."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's operations research agent. You are running in Runback's public demo sandbox: every customer, order, invoice and account is synthetic, and your tools act on test data only. Answer with a short, factual summary grounded only in what the tools return. Say plainly when the data is thin. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Summarise this week's trend in delivery delays and whether it needs attention."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "days": 7,
                  "name": "delivery_delays"
                },
                "toolName": "get_metric",
                "toolCallId": "call_hjGieZI488TqooQ4aN35uCoi"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "name": "delivery_delays",
                    "unit": "count/day",
                    "last_7_days": [
                      95,
                      116,
                      118,
                      90,
                      104,
                      91,
                      121
                    ]
                  }
                },
                "toolName": "get_metric",
                "toolCallId": "call_hjGieZI488TqooQ4aN35uCoi"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": "This week's trend in delivery delays shows an average of approximately 109 delays per day, with a peak of 121 delays. The fluctuations suggest a potential issue that may need attention.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-07T02:10:58.069Z",
      "latency_ms": 2718,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "31622229471fd50c283ff77b5dceb22ae9f1bc060d55c2c4cf8984009fd901d7"
    },
    {
      "seq": 4,
      "name": "research-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "This week's trend in delivery delays shows an average of approximately 109 delays per day, with a peak of 121 delays. The fluctuations suggest a potential issue that may need attention."
      },
      "run_id": "sbx-research-f12c4cf7ed3b",
      "status": "success",
      "ts_end": "2026-11-07T02:11:00.787Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-07T02:11:00.787Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "882b54dc9c7512cfa4689d26e88c94b28607988c33d45401cbc07ee96bc1b2fc"
    }
  ]
}