{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-billing-c18424ca983e",
    "generated_at": "2026-11-07T07:35:58.977Z",
    "event_count": 7,
    "algorithm": "sha256-chain",
    "content_digest": "35fcaee9bddda342da9edf53aa071b7c36f2072b26763944b5b0f0997cbf71a0",
    "replay": {
      "cassette_digest": "8878f7a81a08a5f13405acf36a84e5c6e2db657a4f6295b99839fb0c240d5a51",
      "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": "de239f6d57a373189bf4fc221d0677b2f5e507c4eadcdc1f5cf9309eb178a1e605aa85dda7b01e0702719130f7fe5507a4388cff302f190186c00e73ee9bb604",
      "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-billing-c18424ca983e",
    "name": "billing-agent",
    "status": "success",
    "input": "Invoice INV-32621 for customer #7950 is 34 days overdue. Collect it.",
    "output": {
      "summary": "I successfully charged the customer's card for invoice INV-32621, collecting the overdue amount of AUD 100.23."
    },
    "error": null,
    "metadata": {
      "agent": {
        "description": "Charges overdue invoices. 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",
      "demo_agent": true,
      "est_cost_usd": 0.000223,
      "sandbox_tools": true,
      "scenario_seed": "billing-agent:2026-11-01:25"
    },
    "step_count": 3,
    "total_tokens": 1257,
    "started_at": "2026-11-01T04:11:04.327+00:00",
    "ended_at": "2026-11-01T04:11:07.541+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "billing-agent",
      "type": "run",
      "error": null,
      "input": "Invoice INV-32621 for customer #7950 is 34 days overdue. Collect it.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-billing-c18424ca983e",
      "status": "running",
      "ts_end": "2026-11-01T04:11:07.541Z",
      "span_id": "r",
      "metadata": {
        "agent": {
          "description": "Charges overdue invoices. 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",
        "demo_agent": true,
        "est_cost_usd": 0.000223,
        "sandbox_tools": true,
        "scenario_seed": "billing-agent:2026-11-01:25"
      },
      "ts_start": "2026-11-01T04:11:04.327Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "d8de423a6472f01d695639ba0fa4b269a1ff4f362372cedd2d9442a1c97d05be"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 333,
        "total_tokens": 352,
        "output_tokens": 19
      },
      "run_id": "sbx-billing-c18424ca983e",
      "ts_end": "2026-11-01T04:11:05.364Z",
      "request": {
        "tools": [
          {
            "name": "get_invoice",
            "parameters": {
              "type": "object",
              "required": [
                "invoice_id"
              ],
              "properties": {
                "invoice_id": {
                  "type": "string",
                  "description": "Invoice id, e.g. INV-12345"
                }
              },
              "additionalProperties": false
            },
            "description": "Fetch an invoice and the customer's card status."
          },
          {
            "name": "charge_card",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "invoice_id",
                "amount"
              ],
              "properties": {
                "amount": {
                  "type": "number",
                  "description": "Amount in AUD"
                },
                "invoice_id": {
                  "type": "string",
                  "description": "Invoice id"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Charge the card on file for an invoice, in AUD."
          },
          {
            "name": "send_payment_reminder",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "invoice_id"
              ],
              "properties": {
                "invoice_id": {
                  "type": "string",
                  "description": "Invoice id"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Email the customer a reminder to update their payment details."
          },
          {
            "name": "handoff_notify_customer",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string",
                  "description": "What the customer needs to be told"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Hand the customer message to the notification agent, which runs as its own agent and picks SMS or email from the customer's contact preferences."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's billing 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. Collect overdue invoices: check the invoice, charge the card on file when it is valid, and when it is not, make sure the customer is told — a payment reminder email, or the notification agent, which knows their SMS and email preferences. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Invoice INV-32621 for customer #7950 is 34 days overdue. Collect it."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "invoice_id": "INV-32621"
            },
            "tool_name": "get_invoice",
            "tool_call_id": "call_1Zi4bBa7PJtaZEPlLijoPxA9"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-01T04:11:04.327Z",
      "latency_ms": 1036,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "8c12e2d8558a5e917d1c6353a78272ee18bbf2ab5b581c5d54e0525a57d2ff1d"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "invoice_id": "INV-32621"
      },
      "output": {
        "amount_aud": 100.23,
        "invoice_id": "INV-32621",
        "customer_id": 7950,
        "card_on_file": "valid",
        "days_overdue": 34
      },
      "run_id": "sbx-billing-c18424ca983e",
      "ts_end": "2026-11-01T04:11:05.385Z",
      "span_id": "t1",
      "ts_start": "2026-11-01T04:11:05.364Z",
      "tool_name": "get_invoice",
      "latency_ms": 21,
      "tool_call_id": "call_1Zi4bBa7PJtaZEPlLijoPxA9",
      "parent_span_id": "l1",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "c87de3e35d5b8b62589ce63a63ce59c755c4eea54e5aad9686de144f8af75875"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 392,
        "total_tokens": 424,
        "output_tokens": 32
      },
      "run_id": "sbx-billing-c18424ca983e",
      "ts_end": "2026-11-01T04:11:06.508Z",
      "request": {
        "tools": [
          {
            "name": "get_invoice",
            "parameters": {
              "type": "object",
              "required": [
                "invoice_id"
              ],
              "properties": {
                "invoice_id": {
                  "type": "string",
                  "description": "Invoice id, e.g. INV-12345"
                }
              },
              "additionalProperties": false
            },
            "description": "Fetch an invoice and the customer's card status."
          },
          {
            "name": "charge_card",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "invoice_id",
                "amount"
              ],
              "properties": {
                "amount": {
                  "type": "number",
                  "description": "Amount in AUD"
                },
                "invoice_id": {
                  "type": "string",
                  "description": "Invoice id"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Charge the card on file for an invoice, in AUD."
          },
          {
            "name": "send_payment_reminder",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "invoice_id"
              ],
              "properties": {
                "invoice_id": {
                  "type": "string",
                  "description": "Invoice id"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Email the customer a reminder to update their payment details."
          },
          {
            "name": "handoff_notify_customer",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string",
                  "description": "What the customer needs to be told"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Hand the customer message to the notification agent, which runs as its own agent and picks SMS or email from the customer's contact preferences."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's billing 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. Collect overdue invoices: check the invoice, charge the card on file when it is valid, and when it is not, make sure the customer is told — a payment reminder email, or the notification agent, which knows their SMS and email preferences. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Invoice INV-32621 for customer #7950 is 34 days overdue. Collect it."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "invoice_id": "INV-32621"
                },
                "toolName": "get_invoice",
                "toolCallId": "call_1Zi4bBa7PJtaZEPlLijoPxA9"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "amount_aud": 100.23,
                    "invoice_id": "INV-32621",
                    "customer_id": 7950,
                    "card_on_file": "valid",
                    "days_overdue": 34
                  }
                },
                "toolName": "get_invoice",
                "toolCallId": "call_1Zi4bBa7PJtaZEPlLijoPxA9"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "amount": 100.23,
              "invoice_id": "INV-32621",
              "customer_id": 7950
            },
            "tool_name": "charge_card",
            "tool_call_id": "call_0qv4h9dc6SGuAYlFSUCCPaJW"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-01T04:11:05.385Z",
      "latency_ms": 1122,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "d20ddade257d2c1543fa9024093d991420c93f0a019fce6207640d2d0a4d2819"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 100.23,
        "invoice_id": "INV-32621",
        "customer_id": 7950
      },
      "output": {
        "receipt": "RC-502621",
        "sandbox": true,
        "captured": true,
        "amount_aud": 100.23
      },
      "run_id": "sbx-billing-c18424ca983e",
      "ts_end": "2026-11-01T04:11:06.536Z",
      "span_id": "t2",
      "ts_start": "2026-11-01T04:11:06.508Z",
      "tool_name": "charge_card",
      "latency_ms": 28,
      "tool_call_id": "call_0qv4h9dc6SGuAYlFSUCCPaJW",
      "parent_span_id": "l2",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "8e9678e7026cc8e248772e118b58118993c2f385f1090eb941d757b52bd758d8"
    },
    {
      "seq": 5,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 455,
        "total_tokens": 481,
        "output_tokens": 26
      },
      "run_id": "sbx-billing-c18424ca983e",
      "ts_end": "2026-11-01T04:11:07.541Z",
      "request": {
        "tools": [
          {
            "name": "get_invoice",
            "parameters": {
              "type": "object",
              "required": [
                "invoice_id"
              ],
              "properties": {
                "invoice_id": {
                  "type": "string",
                  "description": "Invoice id, e.g. INV-12345"
                }
              },
              "additionalProperties": false
            },
            "description": "Fetch an invoice and the customer's card status."
          },
          {
            "name": "charge_card",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "invoice_id",
                "amount"
              ],
              "properties": {
                "amount": {
                  "type": "number",
                  "description": "Amount in AUD"
                },
                "invoice_id": {
                  "type": "string",
                  "description": "Invoice id"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Charge the card on file for an invoice, in AUD."
          },
          {
            "name": "send_payment_reminder",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "invoice_id"
              ],
              "properties": {
                "invoice_id": {
                  "type": "string",
                  "description": "Invoice id"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Email the customer a reminder to update their payment details."
          },
          {
            "name": "handoff_notify_customer",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string",
                  "description": "What the customer needs to be told"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Hand the customer message to the notification agent, which runs as its own agent and picks SMS or email from the customer's contact preferences."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's billing 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. Collect overdue invoices: check the invoice, charge the card on file when it is valid, and when it is not, make sure the customer is told — a payment reminder email, or the notification agent, which knows their SMS and email preferences. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Invoice INV-32621 for customer #7950 is 34 days overdue. Collect it."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "invoice_id": "INV-32621"
                },
                "toolName": "get_invoice",
                "toolCallId": "call_1Zi4bBa7PJtaZEPlLijoPxA9"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "amount_aud": 100.23,
                    "invoice_id": "INV-32621",
                    "customer_id": 7950,
                    "card_on_file": "valid",
                    "days_overdue": 34
                  }
                },
                "toolName": "get_invoice",
                "toolCallId": "call_1Zi4bBa7PJtaZEPlLijoPxA9"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "amount": 100.23,
                  "invoice_id": "INV-32621",
                  "customer_id": 7950
                },
                "toolName": "charge_card",
                "toolCallId": "call_0qv4h9dc6SGuAYlFSUCCPaJW"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "receipt": "RC-502621",
                    "sandbox": true,
                    "captured": true,
                    "amount_aud": 100.23
                  }
                },
                "toolName": "charge_card",
                "toolCallId": "call_0qv4h9dc6SGuAYlFSUCCPaJW"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "I successfully charged the customer's card for invoice INV-32621, collecting the overdue amount of AUD 100.23.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-01T04:11:06.536Z",
      "latency_ms": 1005,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "6b8b87c433caa2b172be53fa237be0d1903059581689b183874cd69a6a3fb0a8"
    },
    {
      "seq": 6,
      "name": "billing-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "I successfully charged the customer's card for invoice INV-32621, collecting the overdue amount of AUD 100.23."
      },
      "run_id": "sbx-billing-c18424ca983e",
      "status": "success",
      "ts_end": "2026-11-01T04:11:07.541Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-01T04:11:07.541Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "35fcaee9bddda342da9edf53aa071b7c36f2072b26763944b5b0f0997cbf71a0"
    }
  ]
}