{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-notify-customer-21cb5d36dafd",
    "generated_at": "2026-11-07T07:36:04.545Z",
    "event_count": 7,
    "algorithm": "sha256-chain",
    "content_digest": "2959b22604b59c2b88f619e2c530f57cc8ed5ed4a370fb0f6a358b2f08bc5e65",
    "replay": {
      "cassette_digest": "31e48aa616ca31155ee3dca438eab05b459e7159cb7bc4ca10481522da4b1639",
      "entry_count": 5,
      "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": "743b07aa845b27ca49c4aea2d183ad01951b9326b1f253aab50716bc5e8ce5db972ec8b6f6b6a9331633153f8bda58281049779b98a4e1b5e3f0560757d8a50a",
      "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-notify-customer-21cb5d36dafd",
    "name": "notify-customer-agent",
    "status": "success",
    "input": "Hand-off from support-refund-agent: notify customer #5495 — refund processed, order ORD-62045. Message: Your refund of A$262.18 for order ORD-62045 has been processed.",
    "output": {
      "summary": "I notified customer #5495 via email about their processed refund of A$262.18 for order ORD-62045."
    },
    "error": null,
    "metadata": {
      "agent": {
        "description": "Sends the day's priority notifications. 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",
      "scope": [
        "get_customer_contact",
        "send_email",
        "send_sms"
      ],
      "demo_agent": true,
      "est_cost_usd": 0.00019,
      "parent_run_id": "sbx-support-refund-abbd7a5f8a68",
      "sandbox_tools": true,
      "scenario_seed": "support-refund-agent:2026-11-06:96>notify-customer-agent"
    },
    "step_count": 3,
    "total_tokens": 1000,
    "started_at": "2026-11-06T18:11:05.274+00:00",
    "ended_at": "2026-11-06T18:11:10.678+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "notify-customer-agent",
      "type": "run",
      "error": null,
      "input": "Hand-off from support-refund-agent: notify customer #5495 — refund processed, order ORD-62045. Message: Your refund of A$262.18 for order ORD-62045 has been processed.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-notify-customer-21cb5d36dafd",
      "status": "running",
      "ts_end": "2026-11-06T18:11:10.678Z",
      "span_id": "r",
      "metadata": {
        "agent": {
          "description": "Sends the day's priority notifications. 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",
        "scope": [
          "get_customer_contact",
          "send_email",
          "send_sms"
        ],
        "demo_agent": true,
        "est_cost_usd": 0.00019,
        "parent_run_id": "sbx-support-refund-abbd7a5f8a68",
        "sandbox_tools": true,
        "scenario_seed": "support-refund-agent:2026-11-06:96>notify-customer-agent"
      },
      "ts_start": "2026-11-06T18:11:05.274Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "0f8a9028db44aafbcee2c2c720e4d161109354f4983a5b60ada41151ae4b2309"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 251,
        "total_tokens": 269,
        "output_tokens": 18
      },
      "run_id": "sbx-notify-customer-21cb5d36dafd",
      "ts_end": "2026-11-06T18:11:06.298Z",
      "request": {
        "tools": [
          {
            "name": "get_customer_contact",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id"
              ],
              "properties": {
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Get a customer's contact details and SMS opt-in."
          },
          {
            "name": "send_email",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "subject",
                "body"
              ],
              "properties": {
                "body": {
                  "type": "string",
                  "description": "Body"
                },
                "subject": {
                  "type": "string",
                  "description": "Subject"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Send an email."
          },
          {
            "name": "send_sms",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Under 160 characters"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Send an SMS."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's customer notification 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. For each event, look up the customer's contact preferences and send one short notification: SMS only to customers who opted in, email otherwise. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Hand-off from support-refund-agent: notify customer #5495 — refund processed, order ORD-62045. Message: Your refund of A$262.18 for order ORD-62045 has been processed."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "customer_id": 5495
            },
            "tool_name": "get_customer_contact",
            "tool_call_id": "call_eLUb0LOBitWsU3P7XXHd3oxa"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T18:11:05.274Z",
      "latency_ms": 1024,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "67c1c74ca616c2bd3697ca178c50aaefccf80b78a0df70e05f0e0f0cd308017a"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "customer_id": 5495
      },
      "output": {
        "email": "harper.mockridge5495@example.com",
        "sms_opt_in": false,
        "customer_id": 5495
      },
      "run_id": "sbx-notify-customer-21cb5d36dafd",
      "ts_end": "2026-11-06T18:11:06.472Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T18:11:06.298Z",
      "tool_name": "get_customer_contact",
      "latency_ms": 174,
      "tool_call_id": "call_eLUb0LOBitWsU3P7XXHd3oxa",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "3d01798d039cc49a2a3b8d9a2b2d3b300c50c417da2d2fcc1f0c2a91b0723013"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 299,
        "total_tokens": 343,
        "output_tokens": 44
      },
      "run_id": "sbx-notify-customer-21cb5d36dafd",
      "ts_end": "2026-11-06T18:11:08.374Z",
      "request": {
        "tools": [
          {
            "name": "get_customer_contact",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id"
              ],
              "properties": {
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Get a customer's contact details and SMS opt-in."
          },
          {
            "name": "send_email",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "subject",
                "body"
              ],
              "properties": {
                "body": {
                  "type": "string",
                  "description": "Body"
                },
                "subject": {
                  "type": "string",
                  "description": "Subject"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Send an email."
          },
          {
            "name": "send_sms",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Under 160 characters"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Send an SMS."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's customer notification 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. For each event, look up the customer's contact preferences and send one short notification: SMS only to customers who opted in, email otherwise. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Hand-off from support-refund-agent: notify customer #5495 — refund processed, order ORD-62045. Message: Your refund of A$262.18 for order ORD-62045 has been processed."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 5495
                },
                "toolName": "get_customer_contact",
                "toolCallId": "call_eLUb0LOBitWsU3P7XXHd3oxa"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "harper.mockridge5495@example.com",
                    "sms_opt_in": false,
                    "customer_id": 5495
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "call_eLUb0LOBitWsU3P7XXHd3oxa"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "body": "Your refund of A$262.18 for order ORD-62045 has been processed.",
              "subject": "Refund Processed",
              "customer_id": 5495
            },
            "tool_name": "send_email",
            "tool_call_id": "call_Bu2MfpPRx11c3bEPNZQWPwii"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T18:11:06.472Z",
      "latency_ms": 1901,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "9a5dbac90a4533196a7c946e8a0ed944fd01638577e74a9c78c6d3776ecd0154"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "body": "Your refund of A$262.18 for order ORD-62045 has been processed.",
        "subject": "Refund Processed",
        "customer_id": 5495
      },
      "output": {
        "sent": true,
        "channel": "email",
        "sandbox": true
      },
      "run_id": "sbx-notify-customer-21cb5d36dafd",
      "ts_end": "2026-11-06T18:11:08.526Z",
      "span_id": "t2",
      "ts_start": "2026-11-06T18:11:08.374Z",
      "tool_name": "send_email",
      "latency_ms": 152,
      "tool_call_id": "call_Bu2MfpPRx11c3bEPNZQWPwii",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "2b4b161b8e7dad2dc3a8c7d0b23b864d3f12e7af4926c773ba4a3c57e0e18a95"
    },
    {
      "seq": 5,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 361,
        "total_tokens": 388,
        "output_tokens": 27
      },
      "run_id": "sbx-notify-customer-21cb5d36dafd",
      "ts_end": "2026-11-06T18:11:10.678Z",
      "request": {
        "tools": [
          {
            "name": "get_customer_contact",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id"
              ],
              "properties": {
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Get a customer's contact details and SMS opt-in."
          },
          {
            "name": "send_email",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "subject",
                "body"
              ],
              "properties": {
                "body": {
                  "type": "string",
                  "description": "Body"
                },
                "subject": {
                  "type": "string",
                  "description": "Subject"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Send an email."
          },
          {
            "name": "send_sms",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Under 160 characters"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Send an SMS."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's customer notification 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. For each event, look up the customer's contact preferences and send one short notification: SMS only to customers who opted in, email otherwise. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Hand-off from support-refund-agent: notify customer #5495 — refund processed, order ORD-62045. Message: Your refund of A$262.18 for order ORD-62045 has been processed."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 5495
                },
                "toolName": "get_customer_contact",
                "toolCallId": "call_eLUb0LOBitWsU3P7XXHd3oxa"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "harper.mockridge5495@example.com",
                    "sms_opt_in": false,
                    "customer_id": 5495
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "call_eLUb0LOBitWsU3P7XXHd3oxa"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "body": "Your refund of A$262.18 for order ORD-62045 has been processed.",
                  "subject": "Refund Processed",
                  "customer_id": 5495
                },
                "toolName": "send_email",
                "toolCallId": "call_Bu2MfpPRx11c3bEPNZQWPwii"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "sent": true,
                    "channel": "email",
                    "sandbox": true
                  }
                },
                "toolName": "send_email",
                "toolCallId": "call_Bu2MfpPRx11c3bEPNZQWPwii"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "I notified customer #5495 via email about their processed refund of A$262.18 for order ORD-62045.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T18:11:08.526Z",
      "latency_ms": 2152,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "521b31c13d3b8d5d7bb76a841aef3b4c8964502d0077e13abeb576dbcca398b6"
    },
    {
      "seq": 6,
      "name": "notify-customer-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "I notified customer #5495 via email about their processed refund of A$262.18 for order ORD-62045."
      },
      "run_id": "sbx-notify-customer-21cb5d36dafd",
      "status": "success",
      "ts_end": "2026-11-06T18:11:10.678Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T18:11:10.678Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "2959b22604b59c2b88f619e2c530f57cc8ed5ed4a370fb0f6a358b2f08bc5e65"
    }
  ]
}