{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-billing-d0203244b424",
    "generated_at": "2026-11-07T07:35:59.060Z",
    "event_count": 7,
    "algorithm": "sha256-chain",
    "content_digest": "c03401c09eed41a66c09978ee4c38dd302ba67d4ce77f51402929f47c9e0ce97",
    "replay": {
      "cassette_digest": "7cfbcd235aa1ead1ce421c6bb8d1c4d9d618bff02fe668c12cd29f1a319e9662",
      "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": "22e767bb01b84acc5a20931d42707add35fbdcc961e64093757723498d790f82b85a103e642ee1b63413b074575fc745faacb02796753e63db10fed2051bc202",
      "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-d0203244b424",
    "name": "billing-agent",
    "status": "success",
    "input": "Invoice INV-67125 for customer #2530 is 12 days overdue. Collect it.",
    "output": {
      "summary": "Charged $161.13 AUD to customer #2530 for overdue invoice INV-67125, receipt RC-307125."
    },
    "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": "openai/gpt-oss-20b",
      "demo_agent": true,
      "est_cost_usd": 0.000057,
      "sandbox_tools": true,
      "scenario_seed": "billing-agent:2026-10-27:49"
    },
    "step_count": 3,
    "total_tokens": 1694,
    "started_at": "2026-10-27T09:10:57.005+00:00",
    "ended_at": "2026-10-27T09:10:58.333+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "billing-agent",
      "type": "run",
      "error": null,
      "input": "Invoice INV-67125 for customer #2530 is 12 days overdue. Collect it.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-billing-d0203244b424",
      "status": "running",
      "ts_end": "2026-10-27T09:10:58.333Z",
      "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": "openai/gpt-oss-20b",
        "demo_agent": true,
        "est_cost_usd": 0.000057,
        "sandbox_tools": true,
        "scenario_seed": "billing-agent:2026-10-27:49"
      },
      "ts_start": "2026-10-27T09:10:57.005Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "1b12499bf684a93ea66ff9ff48d2126d43e7f9f798bbe00652f73645c172b566"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 437,
        "total_tokens": 501,
        "output_tokens": 64
      },
      "run_id": "sbx-billing-d0203244b424",
      "ts_end": "2026-10-27T09:10:57.416Z",
      "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-67125 for customer #2530 is 12 days overdue. Collect it."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "invoice_id": "INV-67125"
            },
            "tool_name": "get_invoice",
            "tool_call_id": "fc_ff2c8575-36a8-4dce-a82d-d69859ff418b"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-10-27T09:10:57.005Z",
      "latency_ms": 411,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "b578d56c31740cadf0909e27552db9dc19db6e9599844b8da5e41b41bedcb51b"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "invoice_id": "INV-67125"
      },
      "output": {
        "amount_aud": 161.13,
        "invoice_id": "INV-67125",
        "customer_id": 2530,
        "card_on_file": "valid",
        "days_overdue": 12
      },
      "run_id": "sbx-billing-d0203244b424",
      "ts_end": "2026-10-27T09:10:57.447Z",
      "span_id": "t1",
      "ts_start": "2026-10-27T09:10:57.416Z",
      "tool_name": "get_invoice",
      "latency_ms": 31,
      "tool_call_id": "fc_ff2c8575-36a8-4dce-a82d-d69859ff418b",
      "parent_span_id": "l1",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "d2c29321a0567a98b4d146f52a96c512ee526b620462957a488e3d532f2c45c3"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 500,
        "total_tokens": 575,
        "output_tokens": 75
      },
      "run_id": "sbx-billing-d0203244b424",
      "ts_end": "2026-10-27T09:10:57.849Z",
      "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-67125 for customer #2530 is 12 days overdue. Collect it."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "invoice_id": "INV-67125"
                },
                "toolName": "get_invoice",
                "toolCallId": "fc_ff2c8575-36a8-4dce-a82d-d69859ff418b"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "amount_aud": 161.13,
                    "invoice_id": "INV-67125",
                    "customer_id": 2530,
                    "card_on_file": "valid",
                    "days_overdue": 12
                  }
                },
                "toolName": "get_invoice",
                "toolCallId": "fc_ff2c8575-36a8-4dce-a82d-d69859ff418b"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "amount": 161.13,
              "invoice_id": "INV-67125",
              "customer_id": 2530
            },
            "tool_name": "charge_card",
            "tool_call_id": "fc_d68d22ff-325c-47be-bc43-d05be0a85c34"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-10-27T09:10:57.447Z",
      "latency_ms": 402,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "ac1adb8c9d1eb10f2d9a94c8758a5aa205a6661ebbe1d117e423ef2eb1daa15c"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 161.13,
        "invoice_id": "INV-67125",
        "customer_id": 2530
      },
      "output": {
        "receipt": "RC-307125",
        "sandbox": true,
        "captured": true,
        "amount_aud": 161.13
      },
      "run_id": "sbx-billing-d0203244b424",
      "ts_end": "2026-10-27T09:10:57.877Z",
      "span_id": "t2",
      "ts_start": "2026-10-27T09:10:57.849Z",
      "tool_name": "charge_card",
      "latency_ms": 28,
      "tool_call_id": "fc_d68d22ff-325c-47be-bc43-d05be0a85c34",
      "parent_span_id": "l2",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "df77a4edf0f01f3215cc7f82425e004582085b2c08442493c7aa9396d7fa0bf1"
    },
    {
      "seq": 5,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 567,
        "total_tokens": 618,
        "output_tokens": 51
      },
      "run_id": "sbx-billing-d0203244b424",
      "ts_end": "2026-10-27T09:10:58.333Z",
      "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-67125 for customer #2530 is 12 days overdue. Collect it."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "invoice_id": "INV-67125"
                },
                "toolName": "get_invoice",
                "toolCallId": "fc_ff2c8575-36a8-4dce-a82d-d69859ff418b"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "amount_aud": 161.13,
                    "invoice_id": "INV-67125",
                    "customer_id": 2530,
                    "card_on_file": "valid",
                    "days_overdue": 12
                  }
                },
                "toolName": "get_invoice",
                "toolCallId": "fc_ff2c8575-36a8-4dce-a82d-d69859ff418b"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "amount": 161.13,
                  "invoice_id": "INV-67125",
                  "customer_id": 2530
                },
                "toolName": "charge_card",
                "toolCallId": "fc_d68d22ff-325c-47be-bc43-d05be0a85c34"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "receipt": "RC-307125",
                    "sandbox": true,
                    "captured": true,
                    "amount_aud": 161.13
                  }
                },
                "toolName": "charge_card",
                "toolCallId": "fc_d68d22ff-325c-47be-bc43-d05be0a85c34"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "Charged $161.13 AUD to customer #2530 for overdue invoice INV-67125, receipt RC-307125.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-10-27T09:10:57.877Z",
      "latency_ms": 456,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "c3b7e0fba119b8ae9f85de4e0d215593b78975c6bc28c2084f588197fbed6bf1"
    },
    {
      "seq": 6,
      "name": "billing-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "Charged $161.13 AUD to customer #2530 for overdue invoice INV-67125, receipt RC-307125."
      },
      "run_id": "sbx-billing-d0203244b424",
      "status": "success",
      "ts_end": "2026-10-27T09:10:58.333Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-10-27T09:10:58.333Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "c03401c09eed41a66c09978ee4c38dd302ba67d4ce77f51402929f47c9e0ce97"
    }
  ]
}