{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-support-refund-13a07e7c8af2",
    "generated_at": "2026-11-07T07:35:57.525Z",
    "event_count": 8,
    "algorithm": "sha256-chain",
    "content_digest": "db89e7b2b8a2d575657a4c5468701ce0b98547b2c3194951f75ae9e2975bca45",
    "replay": {
      "cassette_digest": "db598a74ef3d802a47aac3a2c970579bf342b4e71cfb7010083398045d7e9b6b",
      "entry_count": 6,
      "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": "f6fcb39b2e2f6ff62a905298593ae589477d61b68b91e7c1d74840b945a9eb9a3f29b2c6ba4d99cd00d4c7a420259e3e065413b2057fd52d49ced33d5997ee0c",
      "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-support-refund-13a07e7c8af2",
    "name": "support-refund-agent",
    "status": "success",
    "input": "Customer #4902 is asking for a refund of A$69.01 on order ORD-10497 because the order never arrived.",
    "output": {
      "summary": "I've issued a full refund of A$69.01 to customer Parker Sandbox for the undelivered order ORD-10497 (refund ID: RF-9026901)."
    },
    "error": null,
    "metadata": {
      "agent": {
        "description": "Decides refunds and escalates disputed charges. 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": "claude-haiku-4-5",
      "demo_agent": true,
      "est_cost_usd": 0.005286,
      "sandbox_tools": true,
      "scenario_seed": "support-refund-agent:2026-10-24:16"
    },
    "step_count": 3,
    "total_tokens": 4058,
    "started_at": "2026-10-24T16:10:50.123+00:00",
    "ended_at": "2026-10-24T16:10:54.64+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": "Customer #4902 is asking for a refund of A$69.01 on order ORD-10497 because the order never arrived.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-support-refund-13a07e7c8af2",
      "status": "running",
      "ts_end": "2026-10-24T16:10:54.640Z",
      "span_id": "r",
      "metadata": {
        "agent": {
          "description": "Decides refunds and escalates disputed charges. 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": "claude-haiku-4-5",
        "demo_agent": true,
        "est_cost_usd": 0.005286,
        "sandbox_tools": true,
        "scenario_seed": "support-refund-agent:2026-10-24:16"
      },
      "ts_start": "2026-10-24T16:10:50.123Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "e849af6e07c0875e004ef3bf0311f89b3f9e17487074e01a104a9b47a9b45658"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 1019,
        "total_tokens": 1135,
        "output_tokens": 116
      },
      "run_id": "sbx-support-refund-13a07e7c8af2",
      "ts_end": "2026-10-24T16:10:51.710Z",
      "request": {
        "tools": [
          {
            "name": "lookup_customer",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id"
              ],
              "properties": {
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Look up a customer by id."
          },
          {
            "name": "lookup_order",
            "parameters": {
              "type": "object",
              "required": [
                "order_id"
              ],
              "properties": {
                "order_id": {
                  "type": "string",
                  "description": "Order id, e.g. ORD-12345"
                }
              },
              "additionalProperties": false
            },
            "description": "Look up an order by id."
          },
          {
            "name": "issue_refund",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "order_id",
                "amount"
              ],
              "properties": {
                "amount": {
                  "type": "number",
                  "description": "Amount in AUD"
                },
                "order_id": {
                  "type": "string",
                  "description": "Order id"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Refund an amount in AUD to the customer's original payment method."
          },
          {
            "name": "escalate_to_human",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "reason"
              ],
              "properties": {
                "reason": {
                  "type": "string",
                  "description": "Why a person should decide"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Hand the case to a human support lead with a reason."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's support refund 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. Resolve refund requests quickly and politely. Look the customer and order up before deciding. Gold-tier customers get the benefit of the doubt. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Customer #4902 is asking for a refund of A$69.01 on order ORD-10497 because the order never arrived."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": "I'll look up the customer and order details to process this refund request.",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "customer_id": 4902
            },
            "tool_name": "lookup_customer",
            "tool_call_id": "toolu_01DrjYHERdY4nFjjtv8FQxoo"
          },
          {
            "input": {
              "order_id": "ORD-10497"
            },
            "tool_name": "lookup_order",
            "tool_call_id": "toolu_01U36S3oD8fHLewPgPSxDUWe"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-10-24T16:10:50.123Z",
      "latency_ms": 1587,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "c8303ba38b36e1dcb35c2feff72ff6498a1707675b5343dc10a21ddf2e2dc912"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "customer_id": 4902
      },
      "output": {
        "id": 4902,
        "city": "Canberra",
        "name": "Parker Sandbox",
        "tier": "silver",
        "customer_since": "2020-02-01"
      },
      "run_id": "sbx-support-refund-13a07e7c8af2",
      "ts_end": "2026-10-24T16:10:51.783Z",
      "span_id": "t1",
      "ts_start": "2026-10-24T16:10:51.710Z",
      "tool_name": "lookup_customer",
      "latency_ms": 73,
      "tool_call_id": "toolu_01DrjYHERdY4nFjjtv8FQxoo",
      "parent_span_id": "l1",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "e1a97b69c836d14e6f5d844e9f2b757afc5e52e6665d0352b3a0532af00c7072"
    },
    {
      "seq": 3,
      "type": "tool",
      "error": null,
      "input": {
        "order_id": "ORD-10497"
      },
      "output": {
        "status": "in_transit",
        "payment": "card",
        "disputed": false,
        "order_id": "ORD-10497",
        "total_aud": 69.01,
        "customer_id": 4902
      },
      "run_id": "sbx-support-refund-13a07e7c8af2",
      "ts_end": "2026-10-24T16:10:51.804Z",
      "span_id": "t2",
      "ts_start": "2026-10-24T16:10:51.783Z",
      "tool_name": "lookup_order",
      "latency_ms": 21,
      "tool_call_id": "toolu_01U36S3oD8fHLewPgPSxDUWe",
      "parent_span_id": "l1",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "1944b85626603c76dab993d9af9c50732741e5fd64e2cc17d7ea4ac26fbbc404"
    },
    {
      "seq": 4,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 1273,
        "total_tokens": 1418,
        "output_tokens": 145
      },
      "run_id": "sbx-support-refund-13a07e7c8af2",
      "ts_end": "2026-10-24T16:10:53.575Z",
      "request": {
        "tools": [
          {
            "name": "lookup_customer",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id"
              ],
              "properties": {
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Look up a customer by id."
          },
          {
            "name": "lookup_order",
            "parameters": {
              "type": "object",
              "required": [
                "order_id"
              ],
              "properties": {
                "order_id": {
                  "type": "string",
                  "description": "Order id, e.g. ORD-12345"
                }
              },
              "additionalProperties": false
            },
            "description": "Look up an order by id."
          },
          {
            "name": "issue_refund",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "order_id",
                "amount"
              ],
              "properties": {
                "amount": {
                  "type": "number",
                  "description": "Amount in AUD"
                },
                "order_id": {
                  "type": "string",
                  "description": "Order id"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Refund an amount in AUD to the customer's original payment method."
          },
          {
            "name": "escalate_to_human",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "reason"
              ],
              "properties": {
                "reason": {
                  "type": "string",
                  "description": "Why a person should decide"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Hand the case to a human support lead with a reason."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's support refund 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. Resolve refund requests quickly and politely. Look the customer and order up before deciding. Gold-tier customers get the benefit of the doubt. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Customer #4902 is asking for a refund of A$69.01 on order ORD-10497 because the order never arrived."
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "I'll look up the customer and order details to process this refund request.",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 4902
                },
                "toolName": "lookup_customer",
                "toolCallId": "toolu_01DrjYHERdY4nFjjtv8FQxoo"
              },
              {
                "type": "tool-call",
                "input": {
                  "order_id": "ORD-10497"
                },
                "toolName": "lookup_order",
                "toolCallId": "toolu_01U36S3oD8fHLewPgPSxDUWe"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "id": 4902,
                    "city": "Canberra",
                    "name": "Parker Sandbox",
                    "tier": "silver",
                    "customer_since": "2020-02-01"
                  }
                },
                "toolName": "lookup_customer",
                "toolCallId": "toolu_01DrjYHERdY4nFjjtv8FQxoo"
              },
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "status": "in_transit",
                    "payment": "card",
                    "disputed": false,
                    "order_id": "ORD-10497",
                    "total_aud": 69.01,
                    "customer_id": 4902
                  }
                },
                "toolName": "lookup_order",
                "toolCallId": "toolu_01U36S3oD8fHLewPgPSxDUWe"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": "The order matches the customer and amount. Since the order is still showing as \"in_transit\" and the customer reports it never arrived, this is a legitimate non-delivery claim. I'll process the refund.",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "amount": 69.01,
              "order_id": "ORD-10497",
              "customer_id": 4902
            },
            "tool_name": "issue_refund",
            "tool_call_id": "toolu_011GVbH6SVjvC4h1zYZfPvuA"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-10-24T16:10:51.804Z",
      "latency_ms": 1771,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "f480757359db83403968e1978896ae3bbc740e41e7016405e373c08dd56b82d8"
    },
    {
      "seq": 5,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 69.01,
        "order_id": "ORD-10497",
        "customer_id": 4902
      },
      "output": {
        "sandbox": true,
        "refunded": true,
        "refund_id": "RF-9026901",
        "amount_aud": 69.01
      },
      "run_id": "sbx-support-refund-13a07e7c8af2",
      "ts_end": "2026-10-24T16:10:53.612Z",
      "span_id": "t3",
      "ts_start": "2026-10-24T16:10:53.575Z",
      "tool_name": "issue_refund",
      "latency_ms": 37,
      "tool_call_id": "toolu_011GVbH6SVjvC4h1zYZfPvuA",
      "parent_span_id": "l2",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "1a6a674815f68f2ba5b5cda3cfbda86d4e3ead86503ec59e99aec5fa2241001e"
    },
    {
      "seq": 6,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 1459,
        "total_tokens": 1505,
        "output_tokens": 46
      },
      "run_id": "sbx-support-refund-13a07e7c8af2",
      "ts_end": "2026-10-24T16:10:54.640Z",
      "request": {
        "tools": [
          {
            "name": "lookup_customer",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id"
              ],
              "properties": {
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Look up a customer by id."
          },
          {
            "name": "lookup_order",
            "parameters": {
              "type": "object",
              "required": [
                "order_id"
              ],
              "properties": {
                "order_id": {
                  "type": "string",
                  "description": "Order id, e.g. ORD-12345"
                }
              },
              "additionalProperties": false
            },
            "description": "Look up an order by id."
          },
          {
            "name": "issue_refund",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "order_id",
                "amount"
              ],
              "properties": {
                "amount": {
                  "type": "number",
                  "description": "Amount in AUD"
                },
                "order_id": {
                  "type": "string",
                  "description": "Order id"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Refund an amount in AUD to the customer's original payment method."
          },
          {
            "name": "escalate_to_human",
            "parameters": {
              "type": "object",
              "required": [
                "customer_id",
                "reason"
              ],
              "properties": {
                "reason": {
                  "type": "string",
                  "description": "Why a person should decide"
                },
                "customer_id": {
                  "type": "number",
                  "description": "Customer id"
                }
              },
              "additionalProperties": false
            },
            "description": "Hand the case to a human support lead with a reason."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's support refund 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. Resolve refund requests quickly and politely. Look the customer and order up before deciding. Gold-tier customers get the benefit of the doubt. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Customer #4902 is asking for a refund of A$69.01 on order ORD-10497 because the order never arrived."
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "I'll look up the customer and order details to process this refund request.",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 4902
                },
                "toolName": "lookup_customer",
                "toolCallId": "toolu_01DrjYHERdY4nFjjtv8FQxoo"
              },
              {
                "type": "tool-call",
                "input": {
                  "order_id": "ORD-10497"
                },
                "toolName": "lookup_order",
                "toolCallId": "toolu_01U36S3oD8fHLewPgPSxDUWe"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "id": 4902,
                    "city": "Canberra",
                    "name": "Parker Sandbox",
                    "tier": "silver",
                    "customer_since": "2020-02-01"
                  }
                },
                "toolName": "lookup_customer",
                "toolCallId": "toolu_01DrjYHERdY4nFjjtv8FQxoo"
              },
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "status": "in_transit",
                    "payment": "card",
                    "disputed": false,
                    "order_id": "ORD-10497",
                    "total_aud": 69.01,
                    "customer_id": 4902
                  }
                },
                "toolName": "lookup_order",
                "toolCallId": "toolu_01U36S3oD8fHLewPgPSxDUWe"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "The order matches the customer and amount. Since the order is still showing as \"in_transit\" and the customer reports it never arrived, this is a legitimate non-delivery claim. I'll process the refund.",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "amount": 69.01,
                  "order_id": "ORD-10497",
                  "customer_id": 4902
                },
                "toolName": "issue_refund",
                "toolCallId": "toolu_011GVbH6SVjvC4h1zYZfPvuA"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "sandbox": true,
                    "refunded": true,
                    "refund_id": "RF-9026901",
                    "amount_aud": 69.01
                  }
                },
                "toolName": "issue_refund",
                "toolCallId": "toolu_011GVbH6SVjvC4h1zYZfPvuA"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "I've issued a full refund of A$69.01 to customer Parker Sandbox for the undelivered order ORD-10497 (refund ID: RF-9026901).",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-10-24T16:10:53.612Z",
      "latency_ms": 1028,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "64e32cf7f6bd8c03047c6f4fcb44c86a78371f74fc3cdbe36f909d2cf57572d3"
    },
    {
      "seq": 7,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "I've issued a full refund of A$69.01 to customer Parker Sandbox for the undelivered order ORD-10497 (refund ID: RF-9026901)."
      },
      "run_id": "sbx-support-refund-13a07e7c8af2",
      "status": "success",
      "ts_end": "2026-10-24T16:10:54.640Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-10-24T16:10:54.640Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "db89e7b2b8a2d575657a4c5468701ce0b98547b2c3194951f75ae9e2975bca45"
    }
  ]
}