{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-notify-customer-b6c82b4431f2",
    "generated_at": "2026-11-07T07:28:21.618Z",
    "event_count": 10,
    "algorithm": "sha256-chain",
    "content_digest": "81ec97be3fca2a1edf3cbd53b13f11ef1ecdc763a6280da423869dada7ee5917",
    "replay": {
      "cassette_digest": "6922de3aebf8b29a69d75e50e8a95a3896c647d2521a1d636fbbc0c379a045aa",
      "entry_count": 8,
      "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": "5d7915d5598aaad287a8905fc4d5fc4f69530a15ac0cfb43703c48b13964ea2f68f4f6262d02547a499277bf5514c287e7acb8725f15e513248247e0fbb2500d",
      "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-b6c82b4431f2",
    "name": "notify-customer-agent",
    "status": "success",
    "input": "Send today's priority notifications: customer #3958 — appointment tomorrow; customer #7060 — payment failed.",
    "output": {
      "stopped": "step limit",
      "summary": null
    },
    "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.000171,
      "sandbox_tools": true,
      "scenario_seed": "notify-customer-agent:2026-11-06:44"
    },
    "step_count": 4,
    "total_tokens": 2566,
    "started_at": "2026-11-06T08:10:53.017+00:00",
    "ended_at": "2026-11-06T08:10:57.125+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 #3958 — appointment tomorrow; customer #7060 — payment failed.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "status": "running",
      "ts_end": "2026-11-06T08:10:57.125Z",
      "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.000171,
        "sandbox_tools": true,
        "scenario_seed": "notify-customer-agent:2026-11-06:44"
      },
      "ts_start": "2026-11-06T08:10:53.017Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "374a65a5f1b52a2d7c33d450052c6b2cd21e356fe118204c01f614ab41daaa4c"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 327,
        "total_tokens": 475,
        "output_tokens": 148
      },
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "ts_end": "2026-11-06T08:10:54.352Z",
      "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 #3958 — appointment tomorrow; customer #7060 — payment failed."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "customer_id": 3958
            },
            "tool_name": "get_customer_contact",
            "tool_call_id": "fc_3c31f96a-463c-4148-8c25-5cba74cb9af4"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T08:10:53.017Z",
      "latency_ms": 1334,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "81f1930898514a0f7b31d0f23df6e736f3c42c50dc44698a323aeaca9be3d47b"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "customer_id": 3958
      },
      "output": {
        "email": "emerson.sandbox3958@example.com",
        "sms_opt_in": true,
        "customer_id": 3958
      },
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "ts_end": "2026-11-06T08:10:54.379Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T08:10:54.352Z",
      "tool_name": "get_customer_contact",
      "latency_ms": 27,
      "tool_call_id": "fc_3c31f96a-463c-4148-8c25-5cba74cb9af4",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "994eefd13f6b231332daf90b10e824f084f23653a0da5427138a91988b0cfc64"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 379,
        "total_tokens": 674,
        "output_tokens": 295
      },
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "ts_end": "2026-11-06T08:10:54.951Z",
      "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 #3958 — appointment tomorrow; customer #7060 — payment failed."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 3958
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3c31f96a-463c-4148-8c25-5cba74cb9af4"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "emerson.sandbox3958@example.com",
                    "sms_opt_in": true,
                    "customer_id": 3958
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3c31f96a-463c-4148-8c25-5cba74cb9af4"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "customer_id": 7060
            },
            "tool_name": "get_customer_contact",
            "tool_call_id": "fc_da245f8e-84e4-42e7-ac15-408464ff4402"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T08:10:54.379Z",
      "latency_ms": 572,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "c9a9de1de6e13f948136bc9fe5984c848abc7ff67c7d945bfcff8b19ba7e7161"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "customer_id": 7060
      },
      "output": {
        "email": "avery.synthwood7060@example.com",
        "sms_opt_in": false,
        "customer_id": 7060
      },
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "ts_end": "2026-11-06T08:10:54.983Z",
      "span_id": "t2",
      "ts_start": "2026-11-06T08:10:54.951Z",
      "tool_name": "get_customer_contact",
      "latency_ms": 32,
      "tool_call_id": "fc_da245f8e-84e4-42e7-ac15-408464ff4402",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "4a3550ec0a4b7527e5f097354499456350cf5c2f487acd78a1ac23e3fccd2ccd"
    },
    {
      "seq": 5,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 431,
        "total_tokens": 846,
        "output_tokens": 415
      },
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "ts_end": "2026-11-06T08:10:55.778Z",
      "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 #3958 — appointment tomorrow; customer #7060 — payment failed."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 3958
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3c31f96a-463c-4148-8c25-5cba74cb9af4"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "emerson.sandbox3958@example.com",
                    "sms_opt_in": true,
                    "customer_id": 3958
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3c31f96a-463c-4148-8c25-5cba74cb9af4"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 7060
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_da245f8e-84e4-42e7-ac15-408464ff4402"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "avery.synthwood7060@example.com",
                    "sms_opt_in": false,
                    "customer_id": 7060
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_da245f8e-84e4-42e7-ac15-408464ff4402"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "message": "Reminder: Your appointment is scheduled for tomorrow. Please confirm if you need to reschedule.",
              "customer_id": 3958
            },
            "tool_name": "send_sms",
            "tool_call_id": "fc_18c0047b-e61a-4ea4-8560-e29690238a97"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T08:10:54.983Z",
      "latency_ms": 795,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "1f9696c7a3726570b5fa3c9c0fe857a8e1d42b397380fab4fef5e3bd67c6f14f"
    },
    {
      "seq": 6,
      "type": "tool",
      "error": null,
      "input": {
        "message": "Reminder: Your appointment is scheduled for tomorrow. Please confirm if you need to reschedule.",
        "customer_id": 3958
      },
      "output": {
        "sent": true,
        "channel": "sms",
        "sandbox": true
      },
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "ts_end": "2026-11-06T08:10:55.873Z",
      "span_id": "t3",
      "ts_start": "2026-11-06T08:10:55.778Z",
      "tool_name": "send_sms",
      "latency_ms": 95,
      "tool_call_id": "fc_18c0047b-e61a-4ea4-8560-e29690238a97",
      "parent_span_id": "l3",
      "schema_version": 1,
      "_hash": "cc14bafaf8809d4d656ea8ec930a3f8bd43cee79a2c84a2e7513fc0883e279f0"
    },
    {
      "seq": 7,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 492,
        "total_tokens": 571,
        "output_tokens": 79
      },
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "ts_end": "2026-11-06T08:10:57.106Z",
      "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 #3958 — appointment tomorrow; customer #7060 — payment failed."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 3958
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3c31f96a-463c-4148-8c25-5cba74cb9af4"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "emerson.sandbox3958@example.com",
                    "sms_opt_in": true,
                    "customer_id": 3958
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_3c31f96a-463c-4148-8c25-5cba74cb9af4"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 7060
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_da245f8e-84e4-42e7-ac15-408464ff4402"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "email": "avery.synthwood7060@example.com",
                    "sms_opt_in": false,
                    "customer_id": 7060
                  }
                },
                "toolName": "get_customer_contact",
                "toolCallId": "fc_da245f8e-84e4-42e7-ac15-408464ff4402"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "message": "Reminder: Your appointment is scheduled for tomorrow. Please confirm if you need to reschedule.",
                  "customer_id": 3958
                },
                "toolName": "send_sms",
                "toolCallId": "fc_18c0047b-e61a-4ea4-8560-e29690238a97"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "sent": true,
                    "channel": "sms",
                    "sandbox": true
                  }
                },
                "toolName": "send_sms",
                "toolCallId": "fc_18c0047b-e61a-4ea4-8560-e29690238a97"
              }
            ]
          }
        ]
      },
      "span_id": "l4",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "body": "Dear Customer,\n\nWe regret to inform you that your recent payment attempt failed. Please update your payment information to avoid service interruption.\n\nThank you.",
              "subject": "Payment Failed Notice",
              "customer_id": 7060
            },
            "tool_name": "send_email",
            "tool_call_id": "fc_811b912b-0fcb-4570-8eb5-95ad9a5ad78a"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T08:10:55.873Z",
      "latency_ms": 1233,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "9f421b4820189a17369c026ccaecadaa7879b970fc3424e08ed4c3b4a200f37b"
    },
    {
      "seq": 8,
      "type": "tool",
      "error": null,
      "input": {
        "body": "Dear Customer,\n\nWe regret to inform you that your recent payment attempt failed. Please update your payment information to avoid service interruption.\n\nThank you.",
        "subject": "Payment Failed Notice",
        "customer_id": 7060
      },
      "output": {
        "sent": true,
        "channel": "email",
        "sandbox": true
      },
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "ts_end": "2026-11-06T08:10:57.125Z",
      "span_id": "t4",
      "ts_start": "2026-11-06T08:10:57.106Z",
      "tool_name": "send_email",
      "latency_ms": 19,
      "tool_call_id": "fc_811b912b-0fcb-4570-8eb5-95ad9a5ad78a",
      "parent_span_id": "l4",
      "schema_version": 1,
      "_hash": "6b3f0e199907335fb7ed2f5c2f6066997877f2c07d177ab216893bab5db444c9"
    },
    {
      "seq": 9,
      "name": "notify-customer-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "stopped": "step limit",
        "summary": null
      },
      "run_id": "sbx-notify-customer-b6c82b4431f2",
      "status": "success",
      "ts_end": "2026-11-06T08:10:57.125Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T08:10:57.125Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "81ec97be3fca2a1edf3cbd53b13f11ef1ecdc763a6280da423869dada7ee5917"
    }
  ]
}