{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-fraud-screening-7e2bd4dd9740",
    "generated_at": "2026-11-07T07:28:22.269Z",
    "event_count": 7,
    "algorithm": "sha256-chain",
    "content_digest": "ad39ca6f2b9dbcf6af51d0cda58c134038849b9345a8bf852b433ac3173fdfef",
    "replay": {
      "cassette_digest": "af1bf122c6069e4ab9cb6d127bdeda2b386f7b7b94a07a2fe00c33db092de918",
      "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": "17a72b9dcba502023ac85abd5511bce6f1bbedd53dd851446ec0eb0602ecaf751e93b25a954fc1aacd1afbfd4f6059a4d8afe80704be31af0915a689af3d330d",
      "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-fraud-screening-7e2bd4dd9740",
    "name": "fraud-screening-agent",
    "status": "success",
    "input": "Screen payment PAY-54525: A$2410.04 from customer #2611 to Coastline Test Supplies.",
    "output": {
      "summary": "Payment PAY-54525 for A$2410.04 from customer #2611 to Coastline Test Supplies was released to settle due to low risk signals."
    },
    "error": null,
    "metadata": {
      "agent": {
        "description": "Screens payments for fraud before they settle. 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.004117,
      "sandbox_tools": true,
      "scenario_seed": "fraud-screening-agent:2026-11-06:39"
    },
    "step_count": 3,
    "total_tokens": 3205,
    "started_at": "2026-11-06T07:10:55.522+00:00",
    "ended_at": "2026-11-06T07:10:59.345+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "fraud-screening-agent",
      "type": "run",
      "error": null,
      "input": "Screen payment PAY-54525: A$2410.04 from customer #2611 to Coastline Test Supplies.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-fraud-screening-7e2bd4dd9740",
      "status": "running",
      "ts_end": "2026-11-06T07:10:59.345Z",
      "span_id": "r",
      "metadata": {
        "agent": {
          "description": "Screens payments for fraud before they settle. 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.004117,
        "sandbox_tools": true,
        "scenario_seed": "fraud-screening-agent:2026-11-06:39"
      },
      "ts_start": "2026-11-06T07:10:55.522Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "730751c0be7690d25ab473d224377030626772cd3d2147dd1d9629d321c04db7"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 859,
        "total_tokens": 940,
        "output_tokens": 81
      },
      "run_id": "sbx-fraud-screening-7e2bd4dd9740",
      "ts_end": "2026-11-06T07:10:56.742Z",
      "request": {
        "tools": [
          {
            "name": "get_risk_signals",
            "parameters": {
              "type": "object",
              "required": [
                "payment_id"
              ],
              "properties": {
                "payment_id": {
                  "type": "string",
                  "description": "Payment id"
                }
              },
              "additionalProperties": false
            },
            "description": "Risk signals for a payment."
          },
          {
            "name": "hold_payment",
            "parameters": {
              "type": "object",
              "required": [
                "payment_id",
                "reason"
              ],
              "properties": {
                "reason": {
                  "type": "string",
                  "description": "Why"
                },
                "payment_id": {
                  "type": "string",
                  "description": "Payment id"
                }
              },
              "additionalProperties": false
            },
            "description": "Hold a payment for review."
          },
          {
            "name": "release_payment",
            "parameters": {
              "type": "object",
              "required": [
                "payment_id"
              ],
              "properties": {
                "payment_id": {
                  "type": "string",
                  "description": "Payment id"
                }
              },
              "additionalProperties": false
            },
            "description": "Release a payment to settle."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's payment fraud screening 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. Check the risk signals for each payment before it settles. Hold anything that looks like fraud with a reason; release the rest. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Screen payment PAY-54525: A$2410.04 from customer #2611 to Coastline Test Supplies."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": "I'll check the risk signals for this payment to determine if it should be held or released.",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "payment_id": "PAY-54525"
            },
            "tool_name": "get_risk_signals",
            "tool_call_id": "toolu_01W1AhcUjoNtgvPN6tU5QsAW"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T07:10:55.522Z",
      "latency_ms": 1220,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "fd77394a8f4e423dfc354adf997a12c564586a8ac6df6b3f45344fb12e1cdfaf"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "payment_id": "PAY-54525"
      },
      "output": {
        "new_device": false,
        "payment_id": "PAY-54525",
        "risk_score": 2,
        "geo_mismatch": false,
        "payments_last_24h": 0
      },
      "run_id": "sbx-fraud-screening-7e2bd4dd9740",
      "ts_end": "2026-11-06T07:10:56.833Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T07:10:56.742Z",
      "tool_name": "get_risk_signals",
      "latency_ms": 91,
      "tool_call_id": "toolu_01W1AhcUjoNtgvPN6tU5QsAW",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "702c301a29e1733cf898907c49f2149067ad46e927bed41b14f538e7917c674f"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 991,
        "total_tokens": 1097,
        "output_tokens": 106
      },
      "run_id": "sbx-fraud-screening-7e2bd4dd9740",
      "ts_end": "2026-11-06T07:10:58.340Z",
      "request": {
        "tools": [
          {
            "name": "get_risk_signals",
            "parameters": {
              "type": "object",
              "required": [
                "payment_id"
              ],
              "properties": {
                "payment_id": {
                  "type": "string",
                  "description": "Payment id"
                }
              },
              "additionalProperties": false
            },
            "description": "Risk signals for a payment."
          },
          {
            "name": "hold_payment",
            "parameters": {
              "type": "object",
              "required": [
                "payment_id",
                "reason"
              ],
              "properties": {
                "reason": {
                  "type": "string",
                  "description": "Why"
                },
                "payment_id": {
                  "type": "string",
                  "description": "Payment id"
                }
              },
              "additionalProperties": false
            },
            "description": "Hold a payment for review."
          },
          {
            "name": "release_payment",
            "parameters": {
              "type": "object",
              "required": [
                "payment_id"
              ],
              "properties": {
                "payment_id": {
                  "type": "string",
                  "description": "Payment id"
                }
              },
              "additionalProperties": false
            },
            "description": "Release a payment to settle."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's payment fraud screening 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. Check the risk signals for each payment before it settles. Hold anything that looks like fraud with a reason; release the rest. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Screen payment PAY-54525: A$2410.04 from customer #2611 to Coastline Test Supplies."
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "I'll check the risk signals for this payment to determine if it should be held or released.",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "payment_id": "PAY-54525"
                },
                "toolName": "get_risk_signals",
                "toolCallId": "toolu_01W1AhcUjoNtgvPN6tU5QsAW"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "new_device": false,
                    "payment_id": "PAY-54525",
                    "risk_score": 2,
                    "geo_mismatch": false,
                    "payments_last_24h": 0
                  }
                },
                "toolName": "get_risk_signals",
                "toolCallId": "toolu_01W1AhcUjoNtgvPN6tU5QsAW"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": "The payment shows a very low risk score of 2 with no concerning signals: no new device, no geographic mismatch, and no other payments in the last 24 hours. I'll release it to settle.",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "payment_id": "PAY-54525"
            },
            "tool_name": "release_payment",
            "tool_call_id": "toolu_018U1B1sXbhVuX6uPAbwBoU1"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T07:10:56.833Z",
      "latency_ms": 1507,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "715521c4993f344a9ed06fe0898cff377a3f602115f9535081aedacd7fa0fc33"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "payment_id": "PAY-54525"
      },
      "output": {
        "sandbox": true,
        "released": true,
        "payment_id": "PAY-54525"
      },
      "run_id": "sbx-fraud-screening-7e2bd4dd9740",
      "ts_end": "2026-11-06T07:10:58.362Z",
      "span_id": "t2",
      "ts_start": "2026-11-06T07:10:58.341Z",
      "tool_name": "release_payment",
      "latency_ms": 21,
      "tool_call_id": "toolu_018U1B1sXbhVuX6uPAbwBoU1",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "f114118dc22797c3ec25f2416adf1587576588170a8df3f201fc79df4e266a26"
    },
    {
      "seq": 5,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 1127,
        "total_tokens": 1168,
        "output_tokens": 41
      },
      "run_id": "sbx-fraud-screening-7e2bd4dd9740",
      "ts_end": "2026-11-06T07:10:59.345Z",
      "request": {
        "tools": [
          {
            "name": "get_risk_signals",
            "parameters": {
              "type": "object",
              "required": [
                "payment_id"
              ],
              "properties": {
                "payment_id": {
                  "type": "string",
                  "description": "Payment id"
                }
              },
              "additionalProperties": false
            },
            "description": "Risk signals for a payment."
          },
          {
            "name": "hold_payment",
            "parameters": {
              "type": "object",
              "required": [
                "payment_id",
                "reason"
              ],
              "properties": {
                "reason": {
                  "type": "string",
                  "description": "Why"
                },
                "payment_id": {
                  "type": "string",
                  "description": "Payment id"
                }
              },
              "additionalProperties": false
            },
            "description": "Hold a payment for review."
          },
          {
            "name": "release_payment",
            "parameters": {
              "type": "object",
              "required": [
                "payment_id"
              ],
              "properties": {
                "payment_id": {
                  "type": "string",
                  "description": "Payment id"
                }
              },
              "additionalProperties": false
            },
            "description": "Release a payment to settle."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme's payment fraud screening 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. Check the risk signals for each payment before it settles. Hold anything that looks like fraud with a reason; release the rest. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Screen payment PAY-54525: A$2410.04 from customer #2611 to Coastline Test Supplies."
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "I'll check the risk signals for this payment to determine if it should be held or released.",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "payment_id": "PAY-54525"
                },
                "toolName": "get_risk_signals",
                "toolCallId": "toolu_01W1AhcUjoNtgvPN6tU5QsAW"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "new_device": false,
                    "payment_id": "PAY-54525",
                    "risk_score": 2,
                    "geo_mismatch": false,
                    "payments_last_24h": 0
                  }
                },
                "toolName": "get_risk_signals",
                "toolCallId": "toolu_01W1AhcUjoNtgvPN6tU5QsAW"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "The payment shows a very low risk score of 2 with no concerning signals: no new device, no geographic mismatch, and no other payments in the last 24 hours. I'll release it to settle.",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "payment_id": "PAY-54525"
                },
                "toolName": "release_payment",
                "toolCallId": "toolu_018U1B1sXbhVuX6uPAbwBoU1"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "sandbox": true,
                    "released": true,
                    "payment_id": "PAY-54525"
                  }
                },
                "toolName": "release_payment",
                "toolCallId": "toolu_018U1B1sXbhVuX6uPAbwBoU1"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "Payment PAY-54525 for A$2410.04 from customer #2611 to Coastline Test Supplies was released to settle due to low risk signals.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T07:10:58.362Z",
      "latency_ms": 983,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "9d9459bcdb5952df03d365d10d4aee6a2bcce67bee0b47bb932056e72700908d"
    },
    {
      "seq": 6,
      "name": "fraud-screening-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "Payment PAY-54525 for A$2410.04 from customer #2611 to Coastline Test Supplies was released to settle due to low risk signals."
      },
      "run_id": "sbx-fraud-screening-7e2bd4dd9740",
      "status": "success",
      "ts_end": "2026-11-06T07:10:59.345Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T07:10:59.345Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "ad39ca6f2b9dbcf6af51d0cda58c134038849b9345a8bf852b433ac3173fdfef"
    }
  ]
}