{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-fraud-screening-1c1458543c55",
    "generated_at": "2026-11-07T07:28:31.125Z",
    "event_count": 7,
    "algorithm": "sha256-chain",
    "content_digest": "50b598a7a315494b15ec57d9a0366dd2fdc20d1977690e8790799be0261e695d",
    "replay": {
      "cassette_digest": "2b4f430c23f3624b8cff6616aee6c77a968fc7dd469d055ae0a3ebc97bdcad2d",
      "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": "2c81a01c847f7c1c6140a2f5ea2b59b3a252d54f9d75aee1f406cefd60becdcd83311d7f15896bbbc6b6b644c9b9a85388cce3ea010833155225fcb5268c8d0c",
      "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-1c1458543c55",
    "name": "fraud-screening-agent",
    "status": "success",
    "input": "Screen payment PAY-81186: A$630.10 from customer #8244 to Southern Fixture Co.",
    "output": {
      "summary": "Held payment PAY-81186 due to a high risk score and new device detection."
    },
    "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.000085,
      "sandbox_tools": true,
      "scenario_seed": "fraud-screening-agent:2026-11-06:63"
    },
    "step_count": 3,
    "total_tokens": 1529,
    "started_at": "2026-11-06T11:11:05.655+00:00",
    "ended_at": "2026-11-06T11:11:06.776+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "fraud-screening-agent",
      "type": "run",
      "error": null,
      "input": "Screen payment PAY-81186: A$630.10 from customer #8244 to Southern Fixture Co.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-fraud-screening-1c1458543c55",
      "status": "running",
      "ts_end": "2026-11-06T11:11:06.776Z",
      "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.000085,
        "sandbox_tools": true,
        "scenario_seed": "fraud-screening-agent:2026-11-06:63"
      },
      "ts_start": "2026-11-06T11:11:05.655Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "a61fd230c548f6c5e338515afe7065b64120417a7b489b9ddd9093295b507ebc"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 314,
        "total_tokens": 379,
        "output_tokens": 65
      },
      "run_id": "sbx-fraud-screening-1c1458543c55",
      "ts_end": "2026-11-06T11:11:05.768Z",
      "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-81186: A$630.10 from customer #8244 to Southern Fixture Co."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "payment_id": "PAY-81186"
            },
            "tool_name": "get_risk_signals",
            "tool_call_id": "fc_a120e543-ac00-4696-8b2b-32ddbd169677"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T11:11:05.655Z",
      "latency_ms": 113,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "76a9a857339cb5dda5849284081139db2639bc20df69490431c1033451190d15"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "payment_id": "PAY-81186"
      },
      "output": {
        "new_device": true,
        "payment_id": "PAY-81186",
        "risk_score": 13,
        "geo_mismatch": false,
        "payments_last_24h": 0
      },
      "run_id": "sbx-fraud-screening-1c1458543c55",
      "ts_end": "2026-11-06T11:11:05.814Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T11:11:05.768Z",
      "tool_name": "get_risk_signals",
      "latency_ms": 46,
      "tool_call_id": "fc_a120e543-ac00-4696-8b2b-32ddbd169677",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "d28e0963e69178f83e7c21ff9585719a8c1124ff77d1b416dce556f596b177a7"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 381,
        "total_tokens": 564,
        "output_tokens": 183
      },
      "run_id": "sbx-fraud-screening-1c1458543c55",
      "ts_end": "2026-11-06T11:11:06.301Z",
      "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-81186: A$630.10 from customer #8244 to Southern Fixture Co."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "payment_id": "PAY-81186"
                },
                "toolName": "get_risk_signals",
                "toolCallId": "fc_a120e543-ac00-4696-8b2b-32ddbd169677"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "new_device": true,
                    "payment_id": "PAY-81186",
                    "risk_score": 13,
                    "geo_mismatch": false,
                    "payments_last_24h": 0
                  }
                },
                "toolName": "get_risk_signals",
                "toolCallId": "fc_a120e543-ac00-4696-8b2b-32ddbd169677"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": null,
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "reason": "High risk score and new device detected",
              "payment_id": "PAY-81186"
            },
            "tool_name": "hold_payment",
            "tool_call_id": "fc_7370e93b-aa25-4f7b-8d6f-837287016cc9"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T11:11:05.814Z",
      "latency_ms": 487,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "414d79d1891816ac9640a0c4665c440cb7138fd3d194e3b97c4b3a5b2289e1d2"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "reason": "High risk score and new device detected",
        "payment_id": "PAY-81186"
      },
      "output": {
        "held": true,
        "sandbox": true,
        "payment_id": "PAY-81186"
      },
      "run_id": "sbx-fraud-screening-1c1458543c55",
      "ts_end": "2026-11-06T11:11:06.322Z",
      "span_id": "t2",
      "ts_start": "2026-11-06T11:11:06.301Z",
      "tool_name": "hold_payment",
      "latency_ms": 21,
      "tool_call_id": "fc_7370e93b-aa25-4f7b-8d6f-837287016cc9",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "59817b8611890fa070f1ce46dbe581bafd71adf2b7ef01f89901214fedbe65d9"
    },
    {
      "seq": 5,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "openai/gpt-oss-20b",
        "provider": "groq"
      },
      "usage": {
        "input_tokens": 438,
        "total_tokens": 586,
        "output_tokens": 148
      },
      "run_id": "sbx-fraud-screening-1c1458543c55",
      "ts_end": "2026-11-06T11:11:06.776Z",
      "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-81186: A$630.10 from customer #8244 to Southern Fixture Co."
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "payment_id": "PAY-81186"
                },
                "toolName": "get_risk_signals",
                "toolCallId": "fc_a120e543-ac00-4696-8b2b-32ddbd169677"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "new_device": true,
                    "payment_id": "PAY-81186",
                    "risk_score": 13,
                    "geo_mismatch": false,
                    "payments_last_24h": 0
                  }
                },
                "toolName": "get_risk_signals",
                "toolCallId": "fc_a120e543-ac00-4696-8b2b-32ddbd169677"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "type": "tool-call",
                "input": {
                  "reason": "High risk score and new device detected",
                  "payment_id": "PAY-81186"
                },
                "toolName": "hold_payment",
                "toolCallId": "fc_7370e93b-aa25-4f7b-8d6f-837287016cc9"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "held": true,
                    "sandbox": true,
                    "payment_id": "PAY-81186"
                  }
                },
                "toolName": "hold_payment",
                "toolCallId": "fc_7370e93b-aa25-4f7b-8d6f-837287016cc9"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "Held payment PAY-81186 due to a high risk score and new device detection.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T11:11:06.322Z",
      "latency_ms": 454,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "d6d2b22ecf76214b5e15ffe5e8640bc8854e32da52da9fc7e18928c7246a0fde"
    },
    {
      "seq": 6,
      "name": "fraud-screening-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "Held payment PAY-81186 due to a high risk score and new device detection."
      },
      "run_id": "sbx-fraud-screening-1c1458543c55",
      "status": "success",
      "ts_end": "2026-11-06T11:11:06.776Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T11:11:06.776Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "50b598a7a315494b15ec57d9a0366dd2fdc20d1977690e8790799be0261e695d"
    }
  ]
}