{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-support-refund-da1db416eb3b",
    "generated_at": "2026-11-07T07:35:57.892Z",
    "event_count": 8,
    "algorithm": "sha256-chain",
    "content_digest": "b572b14d7543077b2afcec2583c5caa2eea2b979556eedc9e3e141321743d794",
    "replay": {
      "cassette_digest": "b6d4a604bccb16d198bbe0abe858cb403c134cb8600cad3ebe2b51a9cb26118f",
      "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": "f0da66d6851204ec48a53bc8f48432301ef20437d082beef7bc186b76f051ff967229fbb3f49963af61c2bbc1b1ba17932897d3dc4f839af913b2e0b84c48007",
      "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-da1db416eb3b",
    "name": "support-refund-agent",
    "status": "success",
    "input": "Customer #8708 is asking for a refund of A$54.82 on order ORD-31640 because the item arrived damaged.",
    "output": {
      "summary": "I processed a refund of A$54.82 for customer #8708 on order ORD-31640 due to the item arriving damaged."
    },
    "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": "gpt-4o-mini",
      "demo_agent": true,
      "est_cost_usd": 0.000241,
      "sandbox_tools": true,
      "scenario_seed": "support-refund-agent:2026-10-24:0"
    },
    "step_count": 3,
    "total_tokens": 1268,
    "started_at": "2026-10-24T13:10:49.052+00:00",
    "ended_at": "2026-10-24T13:10:55.013+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": "Customer #8708 is asking for a refund of A$54.82 on order ORD-31640 because the item arrived damaged.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-support-refund-da1db416eb3b",
      "status": "running",
      "ts_end": "2026-10-24T13:10:55.013Z",
      "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": "gpt-4o-mini",
        "demo_agent": true,
        "est_cost_usd": 0.000241,
        "sandbox_tools": true,
        "scenario_seed": "support-refund-agent:2026-10-24:0"
      },
      "ts_start": "2026-10-24T13:10:49.052Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "b74caf2cd6f70dc3d74ae0f4924f5621da77dda87f36562a7097f465bc648f44"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 288,
        "total_tokens": 339,
        "output_tokens": 51
      },
      "run_id": "sbx-support-refund-da1db416eb3b",
      "ts_end": "2026-10-24T13:10:51.534Z",
      "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 #8708 is asking for a refund of A$54.82 on order ORD-31640 because the item arrived damaged."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "customer_id": 8708
            },
            "tool_name": "lookup_customer",
            "tool_call_id": "call_1334xLSnI842IZrjmLaAAd9A"
          },
          {
            "input": {
              "order_id": "ORD-31640"
            },
            "tool_name": "lookup_order",
            "tool_call_id": "call_Av9XbSLLIQqVpi3epLgfkses"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-10-24T13:10:49.052Z",
      "latency_ms": 2481,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "01f7a07cfa77bd4659a81e2cb5b755d23651016da262947f3c932ac05230a586"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "customer_id": 8708
      },
      "output": {
        "id": 8708,
        "city": "Sydney",
        "name": "Emerson Placeholder",
        "tier": "gold",
        "customer_since": "2025-02-01"
      },
      "run_id": "sbx-support-refund-da1db416eb3b",
      "ts_end": "2026-10-24T13:10:51.635Z",
      "span_id": "t1",
      "ts_start": "2026-10-24T13:10:51.534Z",
      "tool_name": "lookup_customer",
      "latency_ms": 101,
      "tool_call_id": "call_1334xLSnI842IZrjmLaAAd9A",
      "parent_span_id": "l1",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "038487b1fa810d4ae7edc91cb188679885ab2587151b6a08f991d64e28f3f63c"
    },
    {
      "seq": 3,
      "type": "tool",
      "error": null,
      "input": {
        "order_id": "ORD-31640"
      },
      "output": {
        "status": "delivered",
        "payment": "card",
        "disputed": false,
        "order_id": "ORD-31640",
        "total_aud": 54.82,
        "customer_id": 8708
      },
      "run_id": "sbx-support-refund-da1db416eb3b",
      "ts_end": "2026-10-24T13:10:51.665Z",
      "span_id": "t2",
      "ts_start": "2026-10-24T13:10:51.635Z",
      "tool_name": "lookup_order",
      "latency_ms": 30,
      "tool_call_id": "call_Av9XbSLLIQqVpi3epLgfkses",
      "parent_span_id": "l1",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "e14bd97c09239ba69094ad266c1e3a8952cf9df7fd1a0f067fb56381129d71ff"
    },
    {
      "seq": 4,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 401,
        "total_tokens": 433,
        "output_tokens": 32
      },
      "run_id": "sbx-support-refund-da1db416eb3b",
      "ts_end": "2026-10-24T13:10:53.087Z",
      "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 #8708 is asking for a refund of A$54.82 on order ORD-31640 because the item arrived damaged."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 8708
                },
                "toolName": "lookup_customer",
                "toolCallId": "call_1334xLSnI842IZrjmLaAAd9A"
              },
              {
                "type": "tool-call",
                "input": {
                  "order_id": "ORD-31640"
                },
                "toolName": "lookup_order",
                "toolCallId": "call_Av9XbSLLIQqVpi3epLgfkses"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "id": 8708,
                    "city": "Sydney",
                    "name": "Emerson Placeholder",
                    "tier": "gold",
                    "customer_since": "2025-02-01"
                  }
                },
                "toolName": "lookup_customer",
                "toolCallId": "call_1334xLSnI842IZrjmLaAAd9A"
              },
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "status": "delivered",
                    "payment": "card",
                    "disputed": false,
                    "order_id": "ORD-31640",
                    "total_aud": 54.82,
                    "customer_id": 8708
                  }
                },
                "toolName": "lookup_order",
                "toolCallId": "call_Av9XbSLLIQqVpi3epLgfkses"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "amount": 54.82,
              "order_id": "ORD-31640",
              "customer_id": 8708
            },
            "tool_name": "issue_refund",
            "tool_call_id": "call_8FP5UxZliEV0aRKXm1ZZ2OFv"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-10-24T13:10:51.665Z",
      "latency_ms": 1422,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "a96952dc058f7112dc0988e8eb186a6f808c9a7997cfbca4b0d6332fa2893548"
    },
    {
      "seq": 5,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 54.82,
        "order_id": "ORD-31640",
        "customer_id": 8708
      },
      "output": {
        "sandbox": true,
        "refunded": true,
        "refund_id": "RF-7085482",
        "amount_aud": 54.82
      },
      "run_id": "sbx-support-refund-da1db416eb3b",
      "ts_end": "2026-10-24T13:10:53.117Z",
      "span_id": "t3",
      "ts_start": "2026-10-24T13:10:53.087Z",
      "tool_name": "issue_refund",
      "latency_ms": 30,
      "tool_call_id": "call_8FP5UxZliEV0aRKXm1ZZ2OFv",
      "parent_span_id": "l2",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "bd4310845ec96f3d88dcf8ca087f7291eede8b6714bd1f51e8fcfd048413eda6"
    },
    {
      "seq": 6,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o-mini",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 466,
        "total_tokens": 496,
        "output_tokens": 30
      },
      "run_id": "sbx-support-refund-da1db416eb3b",
      "ts_end": "2026-10-24T13:10:55.013Z",
      "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 #8708 is asking for a refund of A$54.82 on order ORD-31640 because the item arrived damaged."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "customer_id": 8708
                },
                "toolName": "lookup_customer",
                "toolCallId": "call_1334xLSnI842IZrjmLaAAd9A"
              },
              {
                "type": "tool-call",
                "input": {
                  "order_id": "ORD-31640"
                },
                "toolName": "lookup_order",
                "toolCallId": "call_Av9XbSLLIQqVpi3epLgfkses"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "id": 8708,
                    "city": "Sydney",
                    "name": "Emerson Placeholder",
                    "tier": "gold",
                    "customer_since": "2025-02-01"
                  }
                },
                "toolName": "lookup_customer",
                "toolCallId": "call_1334xLSnI842IZrjmLaAAd9A"
              },
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "status": "delivered",
                    "payment": "card",
                    "disputed": false,
                    "order_id": "ORD-31640",
                    "total_aud": 54.82,
                    "customer_id": 8708
                  }
                },
                "toolName": "lookup_order",
                "toolCallId": "call_Av9XbSLLIQqVpi3epLgfkses"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "amount": 54.82,
                  "order_id": "ORD-31640",
                  "customer_id": 8708
                },
                "toolName": "issue_refund",
                "toolCallId": "call_8FP5UxZliEV0aRKXm1ZZ2OFv"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "sandbox": true,
                    "refunded": true,
                    "refund_id": "RF-7085482",
                    "amount_aud": 54.82
                  }
                },
                "toolName": "issue_refund",
                "toolCallId": "call_8FP5UxZliEV0aRKXm1ZZ2OFv"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "I processed a refund of A$54.82 for customer #8708 on order ORD-31640 due to the item arriving damaged.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-10-24T13:10:53.117Z",
      "latency_ms": 1895,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "fa4d974725157c8f1b1ae2041dfc3e2415da4627e6eb58b252e93f128a76d5ec"
    },
    {
      "seq": 7,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "I processed a refund of A$54.82 for customer #8708 on order ORD-31640 due to the item arriving damaged."
      },
      "run_id": "sbx-support-refund-da1db416eb3b",
      "status": "success",
      "ts_end": "2026-10-24T13:10:55.013Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-10-24T13:10:55.013Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "b572b14d7543077b2afcec2583c5caa2eea2b979556eedc9e3e141321743d794"
    }
  ]
}