{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-research-5cf1e9993d42",
    "generated_at": "2026-11-07T07:28:17.965Z",
    "event_count": 5,
    "algorithm": "sha256-chain",
    "content_digest": "63531de63e2e4c2aed605c219443e71dfb18068fff708fe8e7373ffb86277956",
    "replay": {
      "cassette_digest": "067edb15d884822c52d8901e6a3d737b1843a19a62d2ac08f95c269c5653b8ac",
      "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": "3bd5dbf460b6f4225d47330a9fd8fee9dc8cf26be43dc6c1bdb8155b619bb6db8de023594c64823be0abac78cd21e552dac4d2f7d6791e187f9c5da873b4e40f",
      "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-5cf1e9993d42",
    "name": "research-agent",
    "status": "success",
    "input": "Summarise this week's trend in checkout errors and whether it needs attention.",
    "output": {
      "summary": "This week's trend in checkout errors shows a slight fluctuation, with daily counts ranging from 97 to 121 errors. The average is approximately 109 errors per day. Given the consistent occurrence of errors, it may warrant attention to identify and resolve underlying issues."
    },
    "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.000108,
      "sandbox_tools": true,
      "scenario_seed": "research-agent:2026-11-06:109"
    },
    "step_count": 2,
    "total_tokens": 501,
    "started_at": "2026-11-06T20:11:03.133+00:00",
    "ended_at": "2026-11-06T20:11:06.453+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 checkout errors and whether it needs attention.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-research-5cf1e9993d42",
      "status": "running",
      "ts_end": "2026-11-06T20:11:06.453Z",
      "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.000108,
        "sandbox_tools": true,
        "scenario_seed": "research-agent:2026-11-06:109"
      },
      "ts_start": "2026-11-06T20:11:03.133Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "480d4fbe0189cfa47928272abc7129cf344b9a3abf1d2ad85016ee5631ba7ce3"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 186,
        "total_tokens": 206,
        "output_tokens": 20
      },
      "run_id": "sbx-research-5cf1e9993d42",
      "ts_end": "2026-11-06T20:11:04.515Z",
      "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 checkout errors and whether it needs attention."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "days": 7,
              "name": "checkout_errors"
            },
            "tool_name": "get_metric",
            "tool_call_id": "call_34gFT3g2yzQ1t7rn73IAjgNJ"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T20:11:03.133Z",
      "latency_ms": 1382,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "4cb5dda515db85b513f15dd884be253493663cc82c32a96af6b11d8d3ccd84fb"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "days": 7,
        "name": "checkout_errors"
      },
      "output": {
        "name": "checkout_errors",
        "unit": "count/day",
        "last_7_days": [
          107,
          112,
          99,
          106,
          97,
          121,
          117
        ]
      },
      "run_id": "sbx-research-5cf1e9993d42",
      "ts_end": "2026-11-06T20:11:04.548Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T20:11:04.515Z",
      "tool_name": "get_metric",
      "latency_ms": 33,
      "tool_call_id": "call_34gFT3g2yzQ1t7rn73IAjgNJ",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "df04f5ed50c80a238942e0b0efd0614d2276e0c40e0ccadfca2da16406265af4"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 241,
        "total_tokens": 295,
        "output_tokens": 54
      },
      "run_id": "sbx-research-5cf1e9993d42",
      "ts_end": "2026-11-06T20:11:06.453Z",
      "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 checkout errors and whether it needs attention."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "days": 7,
                  "name": "checkout_errors"
                },
                "toolName": "get_metric",
                "toolCallId": "call_34gFT3g2yzQ1t7rn73IAjgNJ"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "name": "checkout_errors",
                    "unit": "count/day",
                    "last_7_days": [
                      107,
                      112,
                      99,
                      106,
                      97,
                      121,
                      117
                    ]
                  }
                },
                "toolName": "get_metric",
                "toolCallId": "call_34gFT3g2yzQ1t7rn73IAjgNJ"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": "This week's trend in checkout errors shows a slight fluctuation, with daily counts ranging from 97 to 121 errors. The average is approximately 109 errors per day. Given the consistent occurrence of errors, it may warrant attention to identify and resolve underlying issues.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T20:11:04.548Z",
      "latency_ms": 1905,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "e1a41a2bd977fbd52c82007296460eb071f47c3cde4b23e95961a7e5d7e703e7"
    },
    {
      "seq": 4,
      "name": "research-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "This week's trend in checkout errors shows a slight fluctuation, with daily counts ranging from 97 to 121 errors. The average is approximately 109 errors per day. Given the consistent occurrence of errors, it may warrant attention to identify and resolve underlying issues."
      },
      "run_id": "sbx-research-5cf1e9993d42",
      "status": "success",
      "ts_end": "2026-11-06T20:11:06.453Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T20:11:06.453Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "63531de63e2e4c2aed605c219443e71dfb18068fff708fe8e7373ffb86277956"
    }
  ]
}