{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-research-20e5e758db21",
    "generated_at": "2026-11-07T07:35:50.110Z",
    "event_count": 5,
    "algorithm": "sha256-chain",
    "content_digest": "d1fe2d22c6c4922f26064a4a92bde1c0da32e5a5c024b9ca31d35c7698f534d3",
    "replay": {
      "cassette_digest": "eec0ef2a906275b2f54095ff0d5ee71943015e2485f5a9b0b3a2033ab37bf351",
      "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": "cb7bc8f0724cbe955876e2594faa2683a83f360fe5ffc54a9591bb70e908829cd530f4e66755ecb3806f05cfaf24a9ffff3990fb595d8d80e1119543374cc90f",
      "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-20e5e758db21",
    "name": "research-agent",
    "status": "success",
    "input": "Summarise this week's trend in delivery delays and whether it needs attention.",
    "output": {
      "summary": "This week, the trend in delivery delays shows an increase, with counts rising from 104 to 137 delays per day. This upward trend indicates that it may require 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.000099,
      "sandbox_tools": true,
      "scenario_seed": "research-agent:2026-11-06:85"
    },
    "step_count": 2,
    "total_tokens": 487,
    "started_at": "2026-11-06T16:10:56.493+00:00",
    "ended_at": "2026-11-06T16:10:59.907+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-20e5e758db21",
      "status": "running",
      "ts_end": "2026-11-06T16:10:59.907Z",
      "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.000099,
        "sandbox_tools": true,
        "scenario_seed": "research-agent:2026-11-06:85"
      },
      "ts_start": "2026-11-06T16:10:56.493Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "cc580131ff1c9f9c3e5de3733d27edff85fa00796bb0040102d5d905e6ac83d7"
    },
    {
      "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-20e5e758db21",
      "ts_end": "2026-11-06T16:10:57.922Z",
      "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_O2KmAdPUxWwK1J4VJAWURV7H"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T16:10:56.493Z",
      "latency_ms": 1429,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "1f8448834d07627b96c051139e34ef4bcfb3259da50af1c32f1a781b6998f25a"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "days": 7,
        "name": "delivery_delays"
      },
      "output": {
        "name": "delivery_delays",
        "unit": "count/day",
        "last_7_days": [
          104,
          105,
          103,
          133,
          104,
          115,
          137
        ]
      },
      "run_id": "sbx-research-20e5e758db21",
      "ts_end": "2026-11-06T16:10:58.008Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T16:10:57.922Z",
      "tool_name": "get_metric",
      "latency_ms": 86,
      "tool_call_id": "call_O2KmAdPUxWwK1J4VJAWURV7H",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "9f7fb7ba268e8d6e7b485e577e7e6dfa3ffb07d3ed45354a2c0a07aab7c3b512"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 243,
        "total_tokens": 280,
        "output_tokens": 37
      },
      "run_id": "sbx-research-20e5e758db21",
      "ts_end": "2026-11-06T16:10:59.907Z",
      "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_O2KmAdPUxWwK1J4VJAWURV7H"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "name": "delivery_delays",
                    "unit": "count/day",
                    "last_7_days": [
                      104,
                      105,
                      103,
                      133,
                      104,
                      115,
                      137
                    ]
                  }
                },
                "toolName": "get_metric",
                "toolCallId": "call_O2KmAdPUxWwK1J4VJAWURV7H"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": "This week, the trend in delivery delays shows an increase, with counts rising from 104 to 137 delays per day. This upward trend indicates that it may require attention.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T16:10:58.008Z",
      "latency_ms": 1899,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "ad843bd6374558adc2775c44bfcb393c1c12ffc0311011470b6a2535daded3a6"
    },
    {
      "seq": 4,
      "name": "research-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "This week, the trend in delivery delays shows an increase, with counts rising from 104 to 137 delays per day. This upward trend indicates that it may require attention."
      },
      "run_id": "sbx-research-20e5e758db21",
      "status": "success",
      "ts_end": "2026-11-06T16:10:59.907Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T16:10:59.907Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "d1fe2d22c6c4922f26064a4a92bde1c0da32e5a5c024b9ca31d35c7698f534d3"
    }
  ]
}