{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-notify-customer-5d0bf495b699",
    "generated_at": "2026-11-07T07:36:03.893Z",
    "event_count": 7,
    "algorithm": "sha256-chain",
    "content_digest": "f112dc74ccea988eb430189d25f098ecf5113bf2f6bff75633af7543f8b864cb",
    "replay": {
      "cassette_digest": "8111ca63ce41afe425d950230f98bba833c039da5fb74954cb76bf3cf7ac8904",
      "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": "3627c759a7ea7ebfa3b02d17c2d602ee9553371afcd901a98e81bf205a601f98fdc660ac0e7376b4a6b0d5583761e656275acf79de83fff7beca49ce47b88d09",
      "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-5d0bf495b699",
    "name": "notify-customer-agent",
    "status": "success",
    "input": "Send today's priority notifications: customer #1708 — refund processed.",
    "output": {
      "summary": "Sent an email to customer #1708 notifying them that their refund 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",
      "demo_agent": true,
      "est_cost_usd": 0.000061,
      "sandbox_tools": true,
      "scenario_seed": "notify-customer-agent:2026-11-06:68"
    },
    "step_count": 3,
    "total_tokens": 1329,
    "started_at": "2026-11-06T12:11:07.407+00:00",
    "ended_at": "2026-11-06T12:11:09.342+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "notify-customer-agent",
      "type": "run",
      "error": null,
      "input": "Send today's priority notifications: customer #1708 — refund processed.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-notify-customer-5d0bf495b699",
      "status": "running",
      "ts_end": "2026-11-06T12:11:09.342Z",
      "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",
        "demo_agent": true,
        "est_cost_usd": 0.000061,
        "sandbox_tools": true,
        "scenario_seed": "notify-customer-agent:2026-11-06:68"
      },
      "ts_start": "2026-11-06T12:11:07.407Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "4e151e12e8f15312f1af4355500f7ca97a3a1e3f0aae7d609cc8eae47a1966da"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 319,
        "total_tokens": 383,
        "output_tokens": 64
      },
      "run_id": "sbx-notify-customer-5d0bf495b699",
      "ts_end": "2026-11-06T12:11:07.796Z",
      "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": "Send today's priority notifications: customer #1708 — refund processed."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "customer_id": 1708
            },
            "tool_name": "get_customer_contact",
            "tool_call_id": "fc_3aadaff9-dbfc-4bb5-b4c9-0af4e15071a8"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T12:11:07.407Z",
      "latency_ms": 389,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "c269d9bbe8978587aa5124f10930e56c52e5e9080d69d397997e6a159212d0a0"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "customer_id": 1708
      },
      "output": {
        "email": "jordan.mockridge1708@example.com",
        "sms_opt_in": false,
        "customer_id": 1708
      },
      "run_id": "sbx-notify-customer-5d0bf495b699",
      "ts_end": "2026-11-06T12:11:07.861Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T12:11:07.796Z",
      "tool_name": "get_customer_contact",
      "latency_ms": 65,
      "tool_call_id": "fc_3aadaff9-dbfc-4bb5-b4c9-0af4e15071a8",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "f91e02deb09a586cb3be32793ad8c0102ed3a5e2b9e0689b3c30264fd600dc71"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 371,
        "total_tokens": 468,
        "output_tokens": 97
      },
      "run_id": "sbx-notify-customer-5d0bf495b699",
      "ts_end": "2026-11-06T12:11:08.655Z",
      "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": "Send today's priority notifications: customer #1708 — refund processed."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 1708
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3aadaff9-dbfc-4bb5-b4c9-0af4e15071a8"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "jordan.mockridge1708@example.com",
                    "sms_opt_in": false,
                    "customer_id": 1708
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3aadaff9-dbfc-4bb5-b4c9-0af4e15071a8"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "body": "Your refund has been processed successfully.",
              "subject": "Refund Processed",
              "customer_id": 1708
            },
            "tool_name": "send_email",
            "tool_call_id": "fc_d3a25e3a-4f50-4ecb-8753-74117c70bade"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T12:11:07.861Z",
      "latency_ms": 794,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "724437b329df705ccda245999633608cc0d89958d0d401efd0f8a9f60678d588"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "body": "Your refund has been processed successfully.",
        "subject": "Refund Processed",
        "customer_id": 1708
      },
      "output": {
        "sent": true,
        "channel": "email",
        "sandbox": true
      },
      "run_id": "sbx-notify-customer-5d0bf495b699",
      "ts_end": "2026-11-06T12:11:08.734Z",
      "span_id": "t2",
      "ts_start": "2026-11-06T12:11:08.655Z",
      "tool_name": "send_email",
      "latency_ms": 79,
      "tool_call_id": "fc_d3a25e3a-4f50-4ecb-8753-74117c70bade",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "1d82f6d25609007f0697f721d630ee54d64c7d2b3d9e9c1d69de5813a1440783"
    },
    {
      "seq": 5,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 426,
        "total_tokens": 478,
        "output_tokens": 52
      },
      "run_id": "sbx-notify-customer-5d0bf495b699",
      "ts_end": "2026-11-06T12:11:09.342Z",
      "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": "Send today's priority notifications: customer #1708 — refund processed."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 1708
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3aadaff9-dbfc-4bb5-b4c9-0af4e15071a8"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "jordan.mockridge1708@example.com",
                    "sms_opt_in": false,
                    "customer_id": 1708
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3aadaff9-dbfc-4bb5-b4c9-0af4e15071a8"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "body": "Your refund has been processed successfully.",
                  "subject": "Refund Processed",
                  "customer_id": 1708
                },
                "toolName": "send_email",
                "toolCallId": "fc_d3a25e3a-4f50-4ecb-8753-74117c70bade"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "sent": true,
                    "channel": "email",
                    "sandbox": true
                  }
                },
                "toolName": "send_email",
                "toolCallId": "fc_d3a25e3a-4f50-4ecb-8753-74117c70bade"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "Sent an email to customer #1708 notifying them that their refund has been processed.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T12:11:08.734Z",
      "latency_ms": 608,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "0dad92f3436c7d50bd4581676213f9e797802632ed5ad2f3aa6ced12d360dcbe"
    },
    {
      "seq": 6,
      "name": "notify-customer-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "Sent an email to customer #1708 notifying them that their refund has been processed."
      },
      "run_id": "sbx-notify-customer-5d0bf495b699",
      "status": "success",
      "ts_end": "2026-11-06T12:11:09.342Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T12:11:09.342Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "f112dc74ccea988eb430189d25f098ecf5113bf2f6bff75633af7543f8b864cb"
    }
  ]
}