{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-kyc-onboarding-82db80739804",
    "generated_at": "2026-11-07T07:36:16.249Z",
    "event_count": 8,
    "algorithm": "sha256-chain",
    "content_digest": "33ae4cd1d0bebfe344a18f1d24025a4dbb714c4905eed1b84aa98b13185dfdb1",
    "replay": {
      "cassette_digest": "4c250cbf634131be4a44745092b33a4a4385f8549cf6ffc2a2b11f5228afa865",
      "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": "19f5f53a26600f913c122774994f6f2d24f6063d6cce6f09343ae81cc6a5526af77b88237d1c7d11ec1e932c633dcf23ac126d368676140a6ee62e6b0ff0aa0c",
      "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-kyc-onboarding-82db80739804",
    "name": "kyc-onboarding-agent",
    "status": "success",
    "input": "Onboard Bluegum Example Foods (ABN 65728725209) as a new business customer.",
    "output": {
      "summary": "I've requested updated documentation from Bluegum Example Foods because their ABN shows a cancelled business status, despite passing the sanctions screening."
    },
    "error": null,
    "metadata": {
      "agent": {
        "description": "Screens and onboards business customers. 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.004709,
      "sandbox_tools": true,
      "scenario_seed": "kyc-onboarding-agent:2026-11-06:99"
    },
    "step_count": 3,
    "total_tokens": 3697,
    "started_at": "2026-11-06T18:11:21.376+00:00",
    "ended_at": "2026-11-06T18:11:25.404+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "kyc-onboarding-agent",
      "type": "run",
      "error": null,
      "input": "Onboard Bluegum Example Foods (ABN 65728725209) as a new business customer.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-kyc-onboarding-82db80739804",
      "status": "running",
      "ts_end": "2026-11-06T18:11:25.404Z",
      "span_id": "r",
      "metadata": {
        "agent": {
          "description": "Screens and onboards business customers. 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.004709,
        "sandbox_tools": true,
        "scenario_seed": "kyc-onboarding-agent:2026-11-06:99"
      },
      "ts_start": "2026-11-06T18:11:21.376Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "f4ad609330cd2874454c6d2abb288a88d20501e93cc3a4585ee8fde989ba9958"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 960,
        "total_tokens": 1060,
        "output_tokens": 100
      },
      "run_id": "sbx-kyc-onboarding-82db80739804",
      "ts_end": "2026-11-06T18:11:22.645Z",
      "request": {
        "tools": [
          {
            "name": "verify_abn",
            "parameters": {
              "type": "object",
              "required": [
                "abn"
              ],
              "properties": {
                "abn": {
                  "type": "string",
                  "description": "11-digit ABN"
                }
              },
              "additionalProperties": false
            },
            "description": "Verify an Australian Business Number."
          },
          {
            "name": "sanctions_screen",
            "parameters": {
              "type": "object",
              "required": [
                "entity"
              ],
              "properties": {
                "entity": {
                  "type": "string",
                  "description": "Legal entity name"
                }
              },
              "additionalProperties": false
            },
            "description": "Screen an entity against DFAT, OFAC and UN lists."
          },
          {
            "name": "approve_onboarding",
            "parameters": {
              "type": "object",
              "required": [
                "entity",
                "abn"
              ],
              "properties": {
                "abn": {
                  "type": "string",
                  "description": "ABN"
                },
                "entity": {
                  "type": "string",
                  "description": "Legal entity name"
                }
              },
              "additionalProperties": false
            },
            "description": "Approve the business as a customer."
          },
          {
            "name": "request_documents",
            "parameters": {
              "type": "object",
              "required": [
                "entity",
                "documents"
              ],
              "properties": {
                "entity": {
                  "type": "string",
                  "description": "Legal entity name"
                },
                "documents": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            },
            "description": "Ask the applicant for more documents."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's business onboarding 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. Verify the ABN and screen the entity against sanctions lists. Approve onboarding when both are clean; otherwise request documents. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Onboard Bluegum Example Foods (ABN 65728725209) as a new business customer."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "abn": "65728725209"
            },
            "tool_name": "verify_abn",
            "tool_call_id": "toolu_01XrJfQuw5VRUT2JJdGowX62"
          },
          {
            "input": {
              "entity": "Bluegum Example Foods"
            },
            "tool_name": "sanctions_screen",
            "tool_call_id": "toolu_01RHTwQnNs5oHqVZHPsvp3C6"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T18:11:21.376Z",
      "latency_ms": 1269,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "107290c36f3bea01bb3db3a7c3bf8cc808727607c578e83450536f003a9607d2"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "abn": "65728725209"
      },
      "output": {
        "valid": true,
        "status": "cancelled",
        "entity_name": "Bluegum Example Foods"
      },
      "run_id": "sbx-kyc-onboarding-82db80739804",
      "ts_end": "2026-11-06T18:11:22.722Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T18:11:22.645Z",
      "tool_name": "verify_abn",
      "latency_ms": 77,
      "tool_call_id": "toolu_01XrJfQuw5VRUT2JJdGowX62",
      "parent_span_id": "l1",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "00283ab600a673f524d30f675e6a09361d7312fb9d4751b25ede655d9d7af336"
    },
    {
      "seq": 3,
      "type": "tool",
      "error": null,
      "input": {
        "entity": "Bluegum Example Foods"
      },
      "output": {
        "lists": [
          "DFAT",
          "OFAC",
          "UN"
        ],
        "match": false
      },
      "run_id": "sbx-kyc-onboarding-82db80739804",
      "ts_end": "2026-11-06T18:11:22.746Z",
      "span_id": "t2",
      "ts_start": "2026-11-06T18:11:22.722Z",
      "tool_name": "sanctions_screen",
      "latency_ms": 24,
      "tool_call_id": "toolu_01RHTwQnNs5oHqVZHPsvp3C6",
      "parent_span_id": "l1",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "4359735d894d043a7792741e3065800ac1e96755f49c61006d49f9a24f075eca"
    },
    {
      "seq": 4,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 1162,
        "total_tokens": 1284,
        "output_tokens": 122
      },
      "run_id": "sbx-kyc-onboarding-82db80739804",
      "ts_end": "2026-11-06T18:11:24.414Z",
      "request": {
        "tools": [
          {
            "name": "verify_abn",
            "parameters": {
              "type": "object",
              "required": [
                "abn"
              ],
              "properties": {
                "abn": {
                  "type": "string",
                  "description": "11-digit ABN"
                }
              },
              "additionalProperties": false
            },
            "description": "Verify an Australian Business Number."
          },
          {
            "name": "sanctions_screen",
            "parameters": {
              "type": "object",
              "required": [
                "entity"
              ],
              "properties": {
                "entity": {
                  "type": "string",
                  "description": "Legal entity name"
                }
              },
              "additionalProperties": false
            },
            "description": "Screen an entity against DFAT, OFAC and UN lists."
          },
          {
            "name": "approve_onboarding",
            "parameters": {
              "type": "object",
              "required": [
                "entity",
                "abn"
              ],
              "properties": {
                "abn": {
                  "type": "string",
                  "description": "ABN"
                },
                "entity": {
                  "type": "string",
                  "description": "Legal entity name"
                }
              },
              "additionalProperties": false
            },
            "description": "Approve the business as a customer."
          },
          {
            "name": "request_documents",
            "parameters": {
              "type": "object",
              "required": [
                "entity",
                "documents"
              ],
              "properties": {
                "entity": {
                  "type": "string",
                  "description": "Legal entity name"
                },
                "documents": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            },
            "description": "Ask the applicant for more documents."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's business onboarding 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. Verify the ABN and screen the entity against sanctions lists. Approve onboarding when both are clean; otherwise request documents. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Onboard Bluegum Example Foods (ABN 65728725209) as a new business customer."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "abn": "65728725209"
                },
                "toolName": "verify_abn",
                "toolCallId": "toolu_01XrJfQuw5VRUT2JJdGowX62"
              },
              {
                "type": "tool-call",
                "input": {
                  "entity": "Bluegum Example Foods"
                },
                "toolName": "sanctions_screen",
                "toolCallId": "toolu_01RHTwQnNs5oHqVZHPsvp3C6"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "valid": true,
                    "status": "cancelled",
                    "entity_name": "Bluegum Example Foods"
                  }
                },
                "toolName": "verify_abn",
                "toolCallId": "toolu_01XrJfQuw5VRUT2JJdGowX62"
              },
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "lists": [
                      "DFAT",
                      "OFAC",
                      "UN"
                    ],
                    "match": false
                  }
                },
                "toolName": "sanctions_screen",
                "toolCallId": "toolu_01RHTwQnNs5oHqVZHPsvp3C6"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": "I cannot approve this onboarding because the ABN verification shows the business status is \"cancelled\". Let me request updated documentation:",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "entity": "Bluegum Example Foods",
              "documents": [
                "Current ABN registration certificate",
                "Proof of active business status",
                "Updated business registration documents"
              ]
            },
            "tool_name": "request_documents",
            "tool_call_id": "toolu_01GZjYCtDkTs6PJsVC3szJRj"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T18:11:22.746Z",
      "latency_ms": 1668,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "53f1f0b5406e160b7bc25c841918dbdf4ea42377a9ade4d6cfb02be774e89ff5"
    },
    {
      "seq": 5,
      "type": "tool",
      "error": null,
      "input": {
        "entity": "Bluegum Example Foods",
        "documents": [
          "Current ABN registration certificate",
          "Proof of active business status",
          "Updated business registration documents"
        ]
      },
      "output": {
        "documents": [
          "Current ABN registration certificate",
          "Proof of active business status",
          "Updated business registration documents"
        ],
        "requested": true
      },
      "run_id": "sbx-kyc-onboarding-82db80739804",
      "ts_end": "2026-11-06T18:11:24.437Z",
      "span_id": "t3",
      "ts_start": "2026-11-06T18:11:24.414Z",
      "tool_name": "request_documents",
      "latency_ms": 23,
      "tool_call_id": "toolu_01GZjYCtDkTs6PJsVC3szJRj",
      "parent_span_id": "l2",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "a8bdf9dc9aa56fa0e1c1f2a1544806b2da87180f810ddffdc2f353b6fccc3d3a"
    },
    {
      "seq": 6,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 1322,
        "total_tokens": 1353,
        "output_tokens": 31
      },
      "run_id": "sbx-kyc-onboarding-82db80739804",
      "ts_end": "2026-11-06T18:11:25.403Z",
      "request": {
        "tools": [
          {
            "name": "verify_abn",
            "parameters": {
              "type": "object",
              "required": [
                "abn"
              ],
              "properties": {
                "abn": {
                  "type": "string",
                  "description": "11-digit ABN"
                }
              },
              "additionalProperties": false
            },
            "description": "Verify an Australian Business Number."
          },
          {
            "name": "sanctions_screen",
            "parameters": {
              "type": "object",
              "required": [
                "entity"
              ],
              "properties": {
                "entity": {
                  "type": "string",
                  "description": "Legal entity name"
                }
              },
              "additionalProperties": false
            },
            "description": "Screen an entity against DFAT, OFAC and UN lists."
          },
          {
            "name": "approve_onboarding",
            "parameters": {
              "type": "object",
              "required": [
                "entity",
                "abn"
              ],
              "properties": {
                "abn": {
                  "type": "string",
                  "description": "ABN"
                },
                "entity": {
                  "type": "string",
                  "description": "Legal entity name"
                }
              },
              "additionalProperties": false
            },
            "description": "Approve the business as a customer."
          },
          {
            "name": "request_documents",
            "parameters": {
              "type": "object",
              "required": [
                "entity",
                "documents"
              ],
              "properties": {
                "entity": {
                  "type": "string",
                  "description": "Legal entity name"
                },
                "documents": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            },
            "description": "Ask the applicant for more documents."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's business onboarding 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. Verify the ABN and screen the entity against sanctions lists. Approve onboarding when both are clean; otherwise request documents. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Onboard Bluegum Example Foods (ABN 65728725209) as a new business customer."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "abn": "65728725209"
                },
                "toolName": "verify_abn",
                "toolCallId": "toolu_01XrJfQuw5VRUT2JJdGowX62"
              },
              {
                "type": "tool-call",
                "input": {
                  "entity": "Bluegum Example Foods"
                },
                "toolName": "sanctions_screen",
                "toolCallId": "toolu_01RHTwQnNs5oHqVZHPsvp3C6"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "valid": true,
                    "status": "cancelled",
                    "entity_name": "Bluegum Example Foods"
                  }
                },
                "toolName": "verify_abn",
                "toolCallId": "toolu_01XrJfQuw5VRUT2JJdGowX62"
              },
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "lists": [
                      "DFAT",
                      "OFAC",
                      "UN"
                    ],
                    "match": false
                  }
                },
                "toolName": "sanctions_screen",
                "toolCallId": "toolu_01RHTwQnNs5oHqVZHPsvp3C6"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "I cannot approve this onboarding because the ABN verification shows the business status is \"cancelled\". Let me request updated documentation:",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "entity": "Bluegum Example Foods",
                  "documents": [
                    "Current ABN registration certificate",
                    "Proof of active business status",
                    "Updated business registration documents"
                  ]
                },
                "toolName": "request_documents",
                "toolCallId": "toolu_01GZjYCtDkTs6PJsVC3szJRj"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "documents": [
                      "Current ABN registration certificate",
                      "Proof of active business status",
                      "Updated business registration documents"
                    ],
                    "requested": true
                  }
                },
                "toolName": "request_documents",
                "toolCallId": "toolu_01GZjYCtDkTs6PJsVC3szJRj"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "I've requested updated documentation from Bluegum Example Foods because their ABN shows a cancelled business status, despite passing the sanctions screening.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T18:11:24.437Z",
      "latency_ms": 966,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "586311efb11a69329659dec04ea44f3c2f371ac643e3658753c6236fd97224dd"
    },
    {
      "seq": 7,
      "name": "kyc-onboarding-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "I've requested updated documentation from Bluegum Example Foods because their ABN shows a cancelled business status, despite passing the sanctions screening."
      },
      "run_id": "sbx-kyc-onboarding-82db80739804",
      "status": "success",
      "ts_end": "2026-11-06T18:11:25.404Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T18:11:25.404Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "33ae4cd1d0bebfe344a18f1d24025a4dbb714c4905eed1b84aa98b13185dfdb1"
    }
  ]
}