{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-fraud-screening-306d5ae5ebe4",
    "generated_at": "2026-11-07T07:28:23.733Z",
    "event_count": 7,
    "algorithm": "sha256-chain",
    "content_digest": "034a20b71e29a933a4af182b70b4b45272d605b10fbc7aa9f4c26425d80e538b",
    "replay": {
      "cassette_digest": "703d0c990e72b39182e31357c93ad9290352b0b33307d81de9446052672f0962",
      "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": "35823c044c1bdfec46a39ccd726f2032a63ef3f4f7516b00418912384cd2f3a6b2d277ceec77fa164aa2036bca1fecc0c025f03ff8ccec4ffa19782b2523610f",
      "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-306d5ae5ebe4",
    "name": "fraud-screening-agent",
    "status": "success",
    "input": "Screen payment PAY-66635: A$2254.10 from customer #6383 to Harbour Mock Traders.",
    "output": {
      "summary": "Released payment PAY-66635 to settle."
    },
    "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": "openai/gpt-oss-20b",
      "demo_agent": true,
      "est_cost_usd": 0.000059,
      "sandbox_tools": true,
      "scenario_seed": "fraud-screening-agent:2026-11-07:15"
    },
    "step_count": 3,
    "total_tokens": 1319,
    "started_at": "2026-11-07T02:11:08.097+00:00",
    "ended_at": "2026-11-07T02:11:09.582+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "fraud-screening-agent",
      "type": "run",
      "error": null,
      "input": "Screen payment PAY-66635: A$2254.10 from customer #6383 to Harbour Mock Traders.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-fraud-screening-306d5ae5ebe4",
      "status": "running",
      "ts_end": "2026-11-07T02:11:09.582Z",
      "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": "openai/gpt-oss-20b",
        "demo_agent": true,
        "est_cost_usd": 0.000059,
        "sandbox_tools": true,
        "scenario_seed": "fraud-screening-agent:2026-11-07:15"
      },
      "ts_start": "2026-11-07T02:11:08.097Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "40021304b42b64ec1d0eb8eda07c29e5a8d23a248067c24ac4819dc97297017a"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 315,
        "total_tokens": 380,
        "output_tokens": 65
      },
      "run_id": "sbx-fraud-screening-306d5ae5ebe4",
      "ts_end": "2026-11-07T02:11:08.897Z",
      "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-66635: A$2254.10 from customer #6383 to Harbour Mock Traders."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "payment_id": "PAY-66635"
            },
            "tool_name": "get_risk_signals",
            "tool_call_id": "fc_b531e30b-20b3-48ef-a671-81574b3270f5"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-07T02:11:08.097Z",
      "latency_ms": 800,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "553d6e472a0f0abb0206bbd222527dd1296f18e6c799071c9e7edd72d3fa9dbb"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "payment_id": "PAY-66635"
      },
      "output": {
        "new_device": false,
        "payment_id": "PAY-66635",
        "risk_score": 21,
        "geo_mismatch": false,
        "payments_last_24h": 0
      },
      "run_id": "sbx-fraud-screening-306d5ae5ebe4",
      "ts_end": "2026-11-07T02:11:08.918Z",
      "span_id": "t1",
      "ts_start": "2026-11-07T02:11:08.897Z",
      "tool_name": "get_risk_signals",
      "latency_ms": 21,
      "tool_call_id": "fc_b531e30b-20b3-48ef-a671-81574b3270f5",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "a56ec0931c426377ff0b2593a262d6aa0df21c33d8a192056abbac1b9ab43d67"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 382,
        "total_tokens": 460,
        "output_tokens": 78
      },
      "run_id": "sbx-fraud-screening-306d5ae5ebe4",
      "ts_end": "2026-11-07T02:11:09.266Z",
      "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-66635: A$2254.10 from customer #6383 to Harbour Mock Traders."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "payment_id": "PAY-66635"
                },
                "toolName": "get_risk_signals",
                "toolCallId": "fc_b531e30b-20b3-48ef-a671-81574b3270f5"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "new_device": false,
                    "payment_id": "PAY-66635",
                    "risk_score": 21,
                    "geo_mismatch": false,
                    "payments_last_24h": 0
                  }
                },
                "toolName": "get_risk_signals",
                "toolCallId": "fc_b531e30b-20b3-48ef-a671-81574b3270f5"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "payment_id": "PAY-66635"
            },
            "tool_name": "release_payment",
            "tool_call_id": "fc_97031d58-5056-419c-b834-137778d09f7c"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-07T02:11:08.918Z",
      "latency_ms": 348,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "c867a6698748e3f73c90c726e9f11ca6eaee185b310c8a23fd8d362c01eaa83f"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "payment_id": "PAY-66635"
      },
      "output": {
        "sandbox": true,
        "released": true,
        "payment_id": "PAY-66635"
      },
      "run_id": "sbx-fraud-screening-306d5ae5ebe4",
      "ts_end": "2026-11-07T02:11:09.283Z",
      "span_id": "t2",
      "ts_start": "2026-11-07T02:11:09.266Z",
      "tool_name": "release_payment",
      "latency_ms": 17,
      "tool_call_id": "fc_97031d58-5056-419c-b834-137778d09f7c",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "221bec76b1fe6e04b97943b9ee5a31cfa169b74f3b2a7b87cda53564bae7a5c9"
    },
    {
      "seq": 5,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 428,
        "total_tokens": 479,
        "output_tokens": 51
      },
      "run_id": "sbx-fraud-screening-306d5ae5ebe4",
      "ts_end": "2026-11-07T02:11:09.582Z",
      "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-66635: A$2254.10 from customer #6383 to Harbour Mock Traders."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "payment_id": "PAY-66635"
                },
                "toolName": "get_risk_signals",
                "toolCallId": "fc_b531e30b-20b3-48ef-a671-81574b3270f5"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "new_device": false,
                    "payment_id": "PAY-66635",
                    "risk_score": 21,
                    "geo_mismatch": false,
                    "payments_last_24h": 0
                  }
                },
                "toolName": "get_risk_signals",
                "toolCallId": "fc_b531e30b-20b3-48ef-a671-81574b3270f5"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "payment_id": "PAY-66635"
                },
                "toolName": "release_payment",
                "toolCallId": "fc_97031d58-5056-419c-b834-137778d09f7c"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "sandbox": true,
                    "released": true,
                    "payment_id": "PAY-66635"
                  }
                },
                "toolName": "release_payment",
                "toolCallId": "fc_97031d58-5056-419c-b834-137778d09f7c"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "Released payment PAY-66635 to settle.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-07T02:11:09.283Z",
      "latency_ms": 299,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "ff4ca79952b9a2e07fb58c8df9a6bedef62708dc8849f085f91e4c2cb10b42cf"
    },
    {
      "seq": 6,
      "name": "fraud-screening-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "Released payment PAY-66635 to settle."
      },
      "run_id": "sbx-fraud-screening-306d5ae5ebe4",
      "status": "success",
      "ts_end": "2026-11-07T02:11:09.582Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-07T02:11:09.582Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "034a20b71e29a933a4af182b70b4b45272d605b10fbc7aa9f4c26425d80e538b"
    }
  ]
}