{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-billing-c44a9021fd66",
    "generated_at": "2026-11-07T07:36:05.758Z",
    "event_count": 7,
    "algorithm": "sha256-chain",
    "content_digest": "f6f3af1443e1aa0927dbb0f47b9522daf0f65f95d8033de344875d2f0ac80bed",
    "replay": {
      "cassette_digest": "c04524293d400986f1ee7277f0b5b9459be63846e2466a4aefa8363c8cb5c61a",
      "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": "0a46c6e20b484f8d8b68297d5d16cc317ef13150791c32c13f05c40724c5d6f69a40a3939be8cc7bfb640d178296fa3c0723ec143c8247a517ccdbf43e04ad04",
      "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-c44a9021fd66",
    "name": "billing-agent",
    "status": "success",
    "input": "Invoice INV-25130 for customer #7711 is 37 days overdue. Collect it.",
    "output": {
      "summary": "I successfully charged the customer's card for invoice INV-25130, collecting the overdue amount of AUD 768.11."
    },
    "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-02:65"
    },
    "step_count": 3,
    "total_tokens": 1257,
    "started_at": "2026-11-02T12:10:58.794+00:00",
    "ended_at": "2026-11-02T12:11:03.233+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "billing-agent",
      "type": "run",
      "error": null,
      "input": "Invoice INV-25130 for customer #7711 is 37 days overdue. Collect it.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-billing-c44a9021fd66",
      "status": "running",
      "ts_end": "2026-11-02T12:11:03.233Z",
      "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-02:65"
      },
      "ts_start": "2026-11-02T12:10:58.794Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "bb89ed2a59113e867336ae35381616b976f0931f5db1061b0ffa882a7d012662"
    },
    {
      "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-c44a9021fd66",
      "ts_end": "2026-11-02T12:11:00.552Z",
      "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-25130 for customer #7711 is 37 days overdue. Collect it."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "invoice_id": "INV-25130"
            },
            "tool_name": "get_invoice",
            "tool_call_id": "call_rka9SSo8R1cOtsaGFW81kr0v"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-02T12:10:58.794Z",
      "latency_ms": 1758,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "bd8632f3ee5aac2d9b2519024d2082522960367ed20e18273d478542a11453ad"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "invoice_id": "INV-25130"
      },
      "output": {
        "amount_aud": 768.11,
        "invoice_id": "INV-25130",
        "customer_id": 7711,
        "card_on_file": "valid",
        "days_overdue": 37
      },
      "run_id": "sbx-billing-c44a9021fd66",
      "ts_end": "2026-11-02T12:11:00.577Z",
      "span_id": "t1",
      "ts_start": "2026-11-02T12:11:00.552Z",
      "tool_name": "get_invoice",
      "latency_ms": 25,
      "tool_call_id": "call_rka9SSo8R1cOtsaGFW81kr0v",
      "parent_span_id": "l1",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "67d1c249cc859d43d5d24d1f957a909b73557bfbfab9dad7c7586f652fe640d1"
    },
    {
      "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-c44a9021fd66",
      "ts_end": "2026-11-02T12:11:01.981Z",
      "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-25130 for customer #7711 is 37 days overdue. Collect it."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "invoice_id": "INV-25130"
                },
                "toolName": "get_invoice",
                "toolCallId": "call_rka9SSo8R1cOtsaGFW81kr0v"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "amount_aud": 768.11,
                    "invoice_id": "INV-25130",
                    "customer_id": 7711,
                    "card_on_file": "valid",
                    "days_overdue": 37
                  }
                },
                "toolName": "get_invoice",
                "toolCallId": "call_rka9SSo8R1cOtsaGFW81kr0v"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "amount": 768.11,
              "invoice_id": "INV-25130",
              "customer_id": 7711
            },
            "tool_name": "charge_card",
            "tool_call_id": "call_rUEVBgWlkDbDxZiHRpkscADx"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-02T12:11:00.577Z",
      "latency_ms": 1404,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "1808d94cb853ab4cdd1e90653b5e62ee0265d3e06556cf6c5fd7fc4cd59ebd12"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 768.11,
        "invoice_id": "INV-25130",
        "customer_id": 7711
      },
      "output": {
        "receipt": "RC-115130",
        "sandbox": true,
        "captured": true,
        "amount_aud": 768.11
      },
      "run_id": "sbx-billing-c44a9021fd66",
      "ts_end": "2026-11-02T12:11:02.071Z",
      "span_id": "t2",
      "ts_start": "2026-11-02T12:11:01.981Z",
      "tool_name": "charge_card",
      "latency_ms": 90,
      "tool_call_id": "call_rUEVBgWlkDbDxZiHRpkscADx",
      "parent_span_id": "l2",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "0082fa71d3600bd68b6a6b95e7f8593294003c9db15fb03a8ee39176c9ae3b6f"
    },
    {
      "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-c44a9021fd66",
      "ts_end": "2026-11-02T12:11:03.233Z",
      "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-25130 for customer #7711 is 37 days overdue. Collect it."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "invoice_id": "INV-25130"
                },
                "toolName": "get_invoice",
                "toolCallId": "call_rka9SSo8R1cOtsaGFW81kr0v"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "amount_aud": 768.11,
                    "invoice_id": "INV-25130",
                    "customer_id": 7711,
                    "card_on_file": "valid",
                    "days_overdue": 37
                  }
                },
                "toolName": "get_invoice",
                "toolCallId": "call_rka9SSo8R1cOtsaGFW81kr0v"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "amount": 768.11,
                  "invoice_id": "INV-25130",
                  "customer_id": 7711
                },
                "toolName": "charge_card",
                "toolCallId": "call_rUEVBgWlkDbDxZiHRpkscADx"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "receipt": "RC-115130",
                    "sandbox": true,
                    "captured": true,
                    "amount_aud": 768.11
                  }
                },
                "toolName": "charge_card",
                "toolCallId": "call_rUEVBgWlkDbDxZiHRpkscADx"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "I successfully charged the customer's card for invoice INV-25130, collecting the overdue amount of AUD 768.11.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-02T12:11:02.071Z",
      "latency_ms": 1162,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "1c435c5a9270f85b728352c52f19e4c57dc264520f78c9b833299d03c5a16a4c"
    },
    {
      "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-25130, collecting the overdue amount of AUD 768.11."
      },
      "run_id": "sbx-billing-c44a9021fd66",
      "status": "success",
      "ts_end": "2026-11-02T12:11:03.233Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-02T12:11:03.233Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "f6f3af1443e1aa0927dbb0f47b9522daf0f65f95d8033de344875d2f0ac80bed"
    }
  ]
}