{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-notify-customer-6e7b6a7ca02f",
    "generated_at": "2026-11-07T07:28:20.804Z",
    "event_count": 7,
    "algorithm": "sha256-chain",
    "content_digest": "5bbcbab9e5c6f88b60de848d174281bca3238f18f59a4a54dea3911222fe3119",
    "replay": {
      "cassette_digest": "b24bde0c9abf3dbc08b0d9e8d024e2a81ff912488f1ec841f0a83bb6fba53c34",
      "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": "60a157b67b5deaed603e722d1340a97ac4510b5cdddffb0c6fcadea2fa920a9f0a58b46f62b7dc829a74e23f10b04be650d30d5300aa502000316aaf32b9e804",
      "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-6e7b6a7ca02f",
    "name": "notify-customer-agent",
    "status": "success",
    "input": "Hand-off from support-refund-agent: notify customer #1016 — refund processed, order ORD-53506. Message: Your refund of A$117.80 for order ORD-53506 has been processed.",
    "output": {
      "summary": "Sent an SMS to customer 1016 notifying them that their refund of A$117.80 for order ORD‑53506 has been processed."
    },
    "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": "openai/gpt-oss-20b",
      "scope": [
        "get_customer_contact",
        "send_email",
        "send_sms"
      ],
      "demo_agent": true,
      "est_cost_usd": 0.000089,
      "parent_run_id": "sbx-support-refund-31e928f8048e",
      "sandbox_tools": true,
      "scenario_seed": "support-refund-agent:2026-11-06:104>notify-customer-agent"
    },
    "step_count": 3,
    "total_tokens": 1619,
    "started_at": "2026-11-06T19:11:07.746+00:00",
    "ended_at": "2026-11-06T19:11:09.204+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 #1016 — refund processed, order ORD-53506. Message: Your refund of A$117.80 for order ORD-53506 has been processed.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-notify-customer-6e7b6a7ca02f",
      "status": "running",
      "ts_end": "2026-11-06T19:11:09.204Z",
      "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": "openai/gpt-oss-20b",
        "scope": [
          "get_customer_contact",
          "send_email",
          "send_sms"
        ],
        "demo_agent": true,
        "est_cost_usd": 0.000089,
        "parent_run_id": "sbx-support-refund-31e928f8048e",
        "sandbox_tools": true,
        "scenario_seed": "support-refund-agent:2026-11-06:104>notify-customer-agent"
      },
      "ts_start": "2026-11-06T19:11:07.746Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "69af072c1784733bad3a29294cae18c3ce2bc10c50746710c9671b54d4ff8156"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 349,
        "total_tokens": 420,
        "output_tokens": 71
      },
      "run_id": "sbx-notify-customer-6e7b6a7ca02f",
      "ts_end": "2026-11-06T19:11:08.140Z",
      "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 #1016 — refund processed, order ORD-53506. Message: Your refund of A$117.80 for order ORD-53506 has been processed."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "customer_id": 1016
            },
            "tool_name": "get_customer_contact",
            "tool_call_id": "fc_b6533836-0720-40dc-85ee-0d15977dea4c"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T19:11:07.746Z",
      "latency_ms": 394,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "0dfe84704c458d14f0aaea2d136c0a8e77112bdcb03966b9f6292b60bfd950ba"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "customer_id": 1016
      },
      "output": {
        "email": "harper.testwell1016@example.com",
        "sms_opt_in": true,
        "customer_id": 1016
      },
      "run_id": "sbx-notify-customer-6e7b6a7ca02f",
      "ts_end": "2026-11-06T19:11:08.164Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T19:11:08.140Z",
      "tool_name": "get_customer_contact",
      "latency_ms": 24,
      "tool_call_id": "fc_b6533836-0720-40dc-85ee-0d15977dea4c",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "c5709e9bb43d27f02d9b6d9efef1af66c8255e1c2bb886c904ad65971303dd73"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 401,
        "total_tokens": 660,
        "output_tokens": 259
      },
      "run_id": "sbx-notify-customer-6e7b6a7ca02f",
      "ts_end": "2026-11-06T19:11:08.785Z",
      "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 #1016 — refund processed, order ORD-53506. Message: Your refund of A$117.80 for order ORD-53506 has been processed."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 1016
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_b6533836-0720-40dc-85ee-0d15977dea4c"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "harper.testwell1016@example.com",
                    "sms_opt_in": true,
                    "customer_id": 1016
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_b6533836-0720-40dc-85ee-0d15977dea4c"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "message": "Your refund of A$117.80 for order ORD-53506 has been processed.",
              "customer_id": 1016
            },
            "tool_name": "send_sms",
            "tool_call_id": "fc_b2cdd50e-e7e7-4f54-926f-2bc1be842352"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T19:11:08.164Z",
      "latency_ms": 621,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "599884c0ea82852450b29ca5abb63235a1fd5dd04839907130d4e891ad6c2285"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "message": "Your refund of A$117.80 for order ORD-53506 has been processed.",
        "customer_id": 1016
      },
      "output": {
        "sent": true,
        "channel": "sms",
        "sandbox": true
      },
      "run_id": "sbx-notify-customer-6e7b6a7ca02f",
      "ts_end": "2026-11-06T19:11:08.803Z",
      "span_id": "t2",
      "ts_start": "2026-11-06T19:11:08.785Z",
      "tool_name": "send_sms",
      "latency_ms": 18,
      "tool_call_id": "fc_b2cdd50e-e7e7-4f54-926f-2bc1be842352",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "b969f7273277e2556c93ecf723bd003e3995af1e499ca446e24107b5309f1cb3"
    },
    {
      "seq": 5,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 462,
        "total_tokens": 539,
        "output_tokens": 77
      },
      "run_id": "sbx-notify-customer-6e7b6a7ca02f",
      "ts_end": "2026-11-06T19:11:09.204Z",
      "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 #1016 — refund processed, order ORD-53506. Message: Your refund of A$117.80 for order ORD-53506 has been processed."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 1016
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_b6533836-0720-40dc-85ee-0d15977dea4c"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "harper.testwell1016@example.com",
                    "sms_opt_in": true,
                    "customer_id": 1016
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_b6533836-0720-40dc-85ee-0d15977dea4c"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "message": "Your refund of A$117.80 for order ORD-53506 has been processed.",
                  "customer_id": 1016
                },
                "toolName": "send_sms",
                "toolCallId": "fc_b2cdd50e-e7e7-4f54-926f-2bc1be842352"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "sent": true,
                    "channel": "sms",
                    "sandbox": true
                  }
                },
                "toolName": "send_sms",
                "toolCallId": "fc_b2cdd50e-e7e7-4f54-926f-2bc1be842352"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "Sent an SMS to customer 1016 notifying them that their refund of A$117.80 for order ORD‑53506 has been processed.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T19:11:08.803Z",
      "latency_ms": 401,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "055b0d3bea05982a58b133c8265923c2cc12df99d720f7067aa4b89ca5f30fab"
    },
    {
      "seq": 6,
      "name": "notify-customer-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "Sent an SMS to customer 1016 notifying them that their refund of A$117.80 for order ORD‑53506 has been processed."
      },
      "run_id": "sbx-notify-customer-6e7b6a7ca02f",
      "status": "success",
      "ts_end": "2026-11-06T19:11:09.204Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T19:11:09.204Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "5bbcbab9e5c6f88b60de848d174281bca3238f18f59a4a54dea3911222fe3119"
    }
  ]
}