{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-research-c646b053656b",
    "generated_at": "2026-11-07T07:28:21.540Z",
    "event_count": 6,
    "algorithm": "sha256-chain",
    "content_digest": "1ca178dd44b47e778873b49b689fbb5f08b872c6cd3b2d1ce8cfb97b8fb1cd4c",
    "replay": {
      "cassette_digest": "fc6d5595ebbd4dbe95c59d33483444eb1e1bb894795af96d9b1c79abd5c09ac3",
      "entry_count": 4,
      "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": "7b52d4aa4e23b2ed4debeac13c7143e0bd5e51b128e483ca4c27401801e49a0b06d1f5c4c8f70c3d52b3f029e535edacfac016179be9abc68cde0800dcfd9700",
      "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-c646b053656b",
    "name": "research-agent",
    "status": "success",
    "input": "Summarise this week's trend in refund volume and whether it needs attention.",
    "output": {
      "summary": "This week's refund volume shows a fluctuating trend with daily counts of 38, 53, 64, 63, 41, 69, and 59. The highest volume occurred on the sixth day with 69 refunds. Overall, the trend appears to be increasing, particularly towards the end of the week, which may warrant 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.000148,
      "sandbox_tools": true,
      "scenario_seed": "research-agent:2026-11-06:77"
    },
    "step_count": 2,
    "total_tokens": 609,
    "started_at": "2026-11-06T14:10:57.544+00:00",
    "ended_at": "2026-11-06T14:11:04.612+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 refund volume and whether it needs attention.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-research-c646b053656b",
      "status": "running",
      "ts_end": "2026-11-06T14:11:04.612Z",
      "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.000148,
        "sandbox_tools": true,
        "scenario_seed": "research-agent:2026-11-06:77"
      },
      "ts_start": "2026-11-06T14:10:57.544Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "3646eb52cd44909404ba307b56b5c0bda283ff4cff8caa41fb3e0b1ddc97d40f"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 186,
        "total_tokens": 241,
        "output_tokens": 55
      },
      "run_id": "sbx-research-c646b053656b",
      "ts_end": "2026-11-06T14:11:01.645Z",
      "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 refund volume and whether it needs attention."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "days": 7,
              "name": "refund_volume"
            },
            "tool_name": "get_metric",
            "tool_call_id": "call_Ln9Hx5yQb9ymaoKrfdK0igpS"
          },
          {
            "input": {
              "days": 1,
              "name": "refund_volume"
            },
            "tool_name": "get_metric",
            "tool_call_id": "call_yD5nFW5IoYIJtCU3g5C5COPj"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T14:10:57.544Z",
      "latency_ms": 4101,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "ada7cfcb85a32d745b4f8386c1e7406661903cb3c9506605117e279866b33d10"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "days": 7,
        "name": "refund_volume"
      },
      "output": {
        "name": "refund_volume",
        "unit": "count/day",
        "last_7_days": [
          38,
          53,
          64,
          63,
          41,
          69,
          59
        ]
      },
      "run_id": "sbx-research-c646b053656b",
      "ts_end": "2026-11-06T14:11:01.763Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T14:11:01.645Z",
      "tool_name": "get_metric",
      "latency_ms": 118,
      "tool_call_id": "call_Ln9Hx5yQb9ymaoKrfdK0igpS",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "dc4c18c2e8220f8358757c97a2bc9c303d6e19598014f90d0fe73daa3eadfe28"
    },
    {
      "seq": 3,
      "type": "tool",
      "error": null,
      "input": {
        "days": 1,
        "name": "refund_volume"
      },
      "output": {
        "name": "refund_volume",
        "unit": "count/day",
        "last_7_days": [
          38,
          53,
          64,
          63,
          41,
          69,
          59
        ]
      },
      "run_id": "sbx-research-c646b053656b",
      "ts_end": "2026-11-06T14:11:01.793Z",
      "span_id": "t2",
      "ts_start": "2026-11-06T14:11:01.763Z",
      "tool_name": "get_metric",
      "latency_ms": 30,
      "tool_call_id": "call_yD5nFW5IoYIJtCU3g5C5COPj",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "1e2baa229621a42763f29e5b7a7cfd3ce328aa4e73ac75515ff4546d5c488c6a"
    },
    {
      "seq": 4,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 296,
        "total_tokens": 368,
        "output_tokens": 72
      },
      "run_id": "sbx-research-c646b053656b",
      "ts_end": "2026-11-06T14:11:04.612Z",
      "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 refund volume and whether it needs attention."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "days": 7,
                  "name": "refund_volume"
                },
                "toolName": "get_metric",
                "toolCallId": "call_Ln9Hx5yQb9ymaoKrfdK0igpS"
              },
              {
                "type": "tool-call",
                "input": {
                  "days": 1,
                  "name": "refund_volume"
                },
                "toolName": "get_metric",
                "toolCallId": "call_yD5nFW5IoYIJtCU3g5C5COPj"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "name": "refund_volume",
                    "unit": "count/day",
                    "last_7_days": [
                      38,
                      53,
                      64,
                      63,
                      41,
                      69,
                      59
                    ]
                  }
                },
                "toolName": "get_metric",
                "toolCallId": "call_Ln9Hx5yQb9ymaoKrfdK0igpS"
              },
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "name": "refund_volume",
                    "unit": "count/day",
                    "last_7_days": [
                      38,
                      53,
                      64,
                      63,
                      41,
                      69,
                      59
                    ]
                  }
                },
                "toolName": "get_metric",
                "toolCallId": "call_yD5nFW5IoYIJtCU3g5C5COPj"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": "This week's refund volume shows a fluctuating trend with daily counts of 38, 53, 64, 63, 41, 69, and 59. The highest volume occurred on the sixth day with 69 refunds. Overall, the trend appears to be increasing, particularly towards the end of the week, which may warrant attention.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T14:11:01.793Z",
      "latency_ms": 2819,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "2da635a741a90fcfafc8fa7a0249fc579afd06c5c9873e89e786de97366dc6b0"
    },
    {
      "seq": 5,
      "name": "research-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "This week's refund volume shows a fluctuating trend with daily counts of 38, 53, 64, 63, 41, 69, and 59. The highest volume occurred on the sixth day with 69 refunds. Overall, the trend appears to be increasing, particularly towards the end of the week, which may warrant attention."
      },
      "run_id": "sbx-research-c646b053656b",
      "status": "success",
      "ts_end": "2026-11-06T14:11:04.612Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T14:11:04.612Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "1ca178dd44b47e778873b49b689fbb5f08b872c6cd3b2d1ce8cfb97b8fb1cd4c"
    }
  ]
}