{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-research-74142034c8bf",
    "generated_at": "2026-11-07T07:28:12.903Z",
    "event_count": 5,
    "algorithm": "sha256-chain",
    "content_digest": "42571d817bb51272b405bbc6511d640e5ff39ce53ea11fc5bb5c99669d05babb",
    "replay": {
      "cassette_digest": "ad79ddd46ee87b624cb3bd7fdea149cc9cf7dfc3b012f9eb3674419b0856a5e2",
      "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": "58883a2944c68f2ee81b79db1f55c60afa4734e9dc292107aa99d9ede55ad904e57edc30674355a77465d75fc7f81540d86ce5d1c86e283befadbb1e433d9306",
      "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-74142034c8bf",
    "name": "research-agent",
    "status": "success",
    "input": "Summarise this week's trend in checkout errors and whether it needs attention.",
    "output": {
      "summary": "This week's checkout errors show a slight downward trend, declining from 109 errors on day 1 to 87 on day 7, with an average of about 95 errors per day. While the trend is improving, the consistent daily error rate of 80–110 errors suggests this warrants attention to identify root causes and prevent further customer friction during checkout."
    },
    "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": "claude-haiku-4-5",
      "demo_agent": true,
      "est_cost_usd": 0.002529,
      "sandbox_tools": true,
      "scenario_seed": "research-agent:2026-11-06:61"
    },
    "step_count": 2,
    "total_tokens": 1869,
    "started_at": "2026-11-06T11:10:55.273+00:00",
    "ended_at": "2026-11-06T11:10:58.152+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-74142034c8bf",
      "status": "running",
      "ts_end": "2026-11-06T11:10:58.152Z",
      "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": "claude-haiku-4-5",
        "demo_agent": true,
        "est_cost_usd": 0.002529,
        "sandbox_tools": true,
        "scenario_seed": "research-agent:2026-11-06:61"
      },
      "ts_start": "2026-11-06T11:10:55.273Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "ca3a01d80458c930444c90f621e3af341240d4bfa36476516b11d9d38e425bd9"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 788,
        "total_tokens": 871,
        "output_tokens": 83
      },
      "run_id": "sbx-research-74142034c8bf",
      "ts_end": "2026-11-06T11:10:56.473Z",
      "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": "I'll check the checkout errors metric for this week.",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "days": 7,
              "name": "checkout errors"
            },
            "tool_name": "get_metric",
            "tool_call_id": "toolu_01HiaTvg5nAmiSrUxktRrLKW"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T11:10:55.273Z",
      "latency_ms": 1200,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "e05f6effea75965a771c7e81e0916fd4207609848c96857b81aab10b79275e64"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "days": 7,
        "name": "checkout errors"
      },
      "output": {
        "name": "checkout errors",
        "unit": "count/day",
        "last_7_days": [
          109,
          103,
          81,
          101,
          99,
          88,
          87
        ]
      },
      "run_id": "sbx-research-74142034c8bf",
      "ts_end": "2026-11-06T11:10:56.568Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T11:10:56.473Z",
      "tool_name": "get_metric",
      "latency_ms": 95,
      "tool_call_id": "toolu_01HiaTvg5nAmiSrUxktRrLKW",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "05e38a84025115aa7a6ab248452200a247400e5b8c74280c118892f56abe2ec9"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 916,
        "total_tokens": 998,
        "output_tokens": 82
      },
      "run_id": "sbx-research-74142034c8bf",
      "ts_end": "2026-11-06T11:10:58.152Z",
      "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": [
              {
                "text": "I'll check the checkout errors metric for this week.",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "days": 7,
                  "name": "checkout errors"
                },
                "toolName": "get_metric",
                "toolCallId": "toolu_01HiaTvg5nAmiSrUxktRrLKW"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "name": "checkout errors",
                    "unit": "count/day",
                    "last_7_days": [
                      109,
                      103,
                      81,
                      101,
                      99,
                      88,
                      87
                    ]
                  }
                },
                "toolName": "get_metric",
                "toolCallId": "toolu_01HiaTvg5nAmiSrUxktRrLKW"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": "This week's checkout errors show a slight downward trend, declining from 109 errors on day 1 to 87 on day 7, with an average of about 95 errors per day. While the trend is improving, the consistent daily error rate of 80–110 errors suggests this warrants attention to identify root causes and prevent further customer friction during checkout.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T11:10:56.568Z",
      "latency_ms": 1584,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "bce8e0dea65eaa8d418d74beb3d548c474189d93ac942800dc49d1fdf676d2bb"
    },
    {
      "seq": 4,
      "name": "research-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "This week's checkout errors show a slight downward trend, declining from 109 errors on day 1 to 87 on day 7, with an average of about 95 errors per day. While the trend is improving, the consistent daily error rate of 80–110 errors suggests this warrants attention to identify root causes and prevent further customer friction during checkout."
      },
      "run_id": "sbx-research-74142034c8bf",
      "status": "success",
      "ts_end": "2026-11-06T11:10:58.152Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T11:10:58.152Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "42571d817bb51272b405bbc6511d640e5ff39ce53ea11fc5bb5c99669d05babb"
    }
  ]
}