{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "sbx-contract-review-b1246699980a",
    "generated_at": "2026-11-07T07:28:27.320Z",
    "event_count": 9,
    "algorithm": "sha256-chain",
    "content_digest": "5a54e57efb8c18197f22decefbd1e4ee18fef771848579afde081c7c24063c6b",
    "replay": {
      "cassette_digest": "3acd1036aa6bb1822907d16614d56b48319711d4a23d2d46fb2e52e16e432e1d",
      "entry_count": 7,
      "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": "19f20c0262b3b819be3cd919c08195a0c0e700c8d9ffa5c10aee21c422183067c8bde423dbbe5982d8c59aa9e7a6081177236f97527a4d76e4b9a54aae88fe0d",
      "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-contract-review-b1246699980a",
    "name": "contract-review-agent",
    "status": "success",
    "input": "Review Wattle Sandbox Pty Ltd's supplier agreement (MSA-9093) before signature.",
    "output": {
      "summary": "I've reviewed Wattle Sandbox Pty Ltd's MSA-9093 and flagged three risky deviations: a medium-severity auto-renewal term with extended notice period, a medium-severity Delaware governing law clause, and a high-severity data usage clause that permits the supplier to use customer data for service improvement."
    },
    "error": null,
    "metadata": {
      "agent": {
        "description": "Flags risky clauses in supplier contracts. 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.006374,
      "sandbox_tools": true,
      "scenario_seed": "contract-review-agent:2026-11-06:78"
    },
    "step_count": 3,
    "total_tokens": 4102,
    "started_at": "2026-11-06T14:11:04.926+00:00",
    "ended_at": "2026-11-06T14:11:11.184+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "contract-review-agent",
      "type": "run",
      "error": null,
      "input": "Review Wattle Sandbox Pty Ltd's supplier agreement (MSA-9093) before signature.",
      "phase": "start",
      "output": null,
      "run_id": "sbx-contract-review-b1246699980a",
      "status": "running",
      "ts_end": "2026-11-06T14:11:11.184Z",
      "span_id": "r",
      "metadata": {
        "agent": {
          "description": "Flags risky clauses in supplier contracts. 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.006374,
        "sandbox_tools": true,
        "scenario_seed": "contract-review-agent:2026-11-06:78"
      },
      "ts_start": "2026-11-06T14:11:04.926Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "951fc1a5abe2e04fec40968b20e787611b4152817272b9cbedce5a36480ad1dc"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 860,
        "total_tokens": 956,
        "output_tokens": 96
      },
      "run_id": "sbx-contract-review-b1246699980a",
      "ts_end": "2026-11-06T14:11:06.119Z",
      "request": {
        "tools": [
          {
            "name": "diff_against_template",
            "parameters": {
              "type": "object",
              "required": [
                "doc_id"
              ],
              "properties": {
                "doc_id": {
                  "type": "string",
                  "description": "Document id"
                }
              },
              "additionalProperties": false
            },
            "description": "List the clauses that differ from Acme's template."
          },
          {
            "name": "flag_clause",
            "parameters": {
              "type": "object",
              "required": [
                "doc_id",
                "clause",
                "severity",
                "reason"
              ],
              "properties": {
                "clause": {
                  "type": "string",
                  "description": "Clause number and title"
                },
                "doc_id": {
                  "type": "string",
                  "description": "Document id"
                },
                "reason": {
                  "type": "string",
                  "description": "Why"
                },
                "severity": {
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ],
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "description": "Flag a clause for Legal."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme Legal's contract review 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. Compare the supplier contract with Acme's template and flag each risky deviation with a severity of low, medium or high. A name ending in s takes a bare apostrophe: Harbour Mock Traders', not Traders's. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Review Wattle Sandbox Pty Ltd's supplier agreement (MSA-9093) before signature."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": "I'll review Wattle Sandbox Pty Ltd's supplier agreement by comparing it against Acme's template and flagging any risky deviations.",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "doc_id": "MSA-9093"
            },
            "tool_name": "diff_against_template",
            "tool_call_id": "toolu_01Hq3z5GfbAxZ2EENgmUvb6D"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T14:11:04.926Z",
      "latency_ms": 1193,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "8b8ecefdc02f77880f27f544b10e8bd4b41f4dd115dfb4cf02281927091001ac"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "doc_id": "MSA-9093"
      },
      "output": {
        "doc_id": "MSA-9093",
        "deviations": [
          {
            "text": "The agreement auto-renews for 36 months unless cancelled 180 days prior.",
            "clause": "8.1 Term"
          },
          {
            "text": "This agreement is governed by the laws of the State of Delaware.",
            "clause": "15.2 Governing law"
          },
          {
            "text": "Supplier may use customer data to improve its services.",
            "clause": "9.4 Data"
          }
        ]
      },
      "run_id": "sbx-contract-review-b1246699980a",
      "ts_end": "2026-11-06T14:11:06.139Z",
      "span_id": "t1",
      "ts_start": "2026-11-06T14:11:06.119Z",
      "tool_name": "diff_against_template",
      "latency_ms": 20,
      "tool_call_id": "toolu_01Hq3z5GfbAxZ2EENgmUvb6D",
      "parent_span_id": "l1",
      "schema_version": 1,
      "_hash": "61ef4d018127cea71e79f1ac34c6be86faac0187dacc4688db7cf56b751ed867"
    },
    {
      "seq": 3,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 1066,
        "total_tokens": 1464,
        "output_tokens": 398
      },
      "run_id": "sbx-contract-review-b1246699980a",
      "ts_end": "2026-11-06T14:11:09.767Z",
      "request": {
        "tools": [
          {
            "name": "diff_against_template",
            "parameters": {
              "type": "object",
              "required": [
                "doc_id"
              ],
              "properties": {
                "doc_id": {
                  "type": "string",
                  "description": "Document id"
                }
              },
              "additionalProperties": false
            },
            "description": "List the clauses that differ from Acme's template."
          },
          {
            "name": "flag_clause",
            "parameters": {
              "type": "object",
              "required": [
                "doc_id",
                "clause",
                "severity",
                "reason"
              ],
              "properties": {
                "clause": {
                  "type": "string",
                  "description": "Clause number and title"
                },
                "doc_id": {
                  "type": "string",
                  "description": "Document id"
                },
                "reason": {
                  "type": "string",
                  "description": "Why"
                },
                "severity": {
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ],
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "description": "Flag a clause for Legal."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme Legal's contract review 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. Compare the supplier contract with Acme's template and flag each risky deviation with a severity of low, medium or high. A name ending in s takes a bare apostrophe: Harbour Mock Traders', not Traders's. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Review Wattle Sandbox Pty Ltd's supplier agreement (MSA-9093) before signature."
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "I'll review Wattle Sandbox Pty Ltd's supplier agreement by comparing it against Acme's template and flagging any risky deviations.",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "doc_id": "MSA-9093"
                },
                "toolName": "diff_against_template",
                "toolCallId": "toolu_01Hq3z5GfbAxZ2EENgmUvb6D"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "doc_id": "MSA-9093",
                    "deviations": [
                      {
                        "text": "The agreement auto-renews for 36 months unless cancelled 180 days prior.",
                        "clause": "8.1 Term"
                      },
                      {
                        "text": "This agreement is governed by the laws of the State of Delaware.",
                        "clause": "15.2 Governing law"
                      },
                      {
                        "text": "Supplier may use customer data to improve its services.",
                        "clause": "9.4 Data"
                      }
                    ]
                  }
                },
                "toolName": "diff_against_template",
                "toolCallId": "toolu_01Hq3z5GfbAxZ2EENgmUvb6D"
              }
            ]
          }
        ]
      },
      "span_id": "l2",
      "response": {
        "text": "Now I'll flag each risky deviation:",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "clause": "8.1 Term",
              "doc_id": "MSA-9093",
              "reason": "Auto-renewal with 180-day cancellation notice creates long-term lock-in risk; Acme's template requires explicit renewal consent.",
              "severity": "medium"
            },
            "tool_name": "flag_clause",
            "tool_call_id": "toolu_01BnMVxbJtRLCy7Uunj3dBK4"
          },
          {
            "input": {
              "clause": "15.2 Governing law",
              "doc_id": "MSA-9093",
              "reason": "Delaware law deviates from Acme's template standard; creates unfamiliar legal jurisdiction and potential cost implications.",
              "severity": "medium"
            },
            "tool_name": "flag_clause",
            "tool_call_id": "toolu_01XU5vZSaNkis63BmJdjwagW"
          },
          {
            "input": {
              "clause": "9.4 Data",
              "doc_id": "MSA-9093",
              "reason": "Supplier's unilateral right to use customer data for service improvement violates data protection principles and Acme's template restrictions on data usage.",
              "severity": "high"
            },
            "tool_name": "flag_clause",
            "tool_call_id": "toolu_01WnLaqit6dDbsm6WsZFQjHx"
          }
        ],
        "finish_reason": "tool-calls"
      },
      "ts_start": "2026-11-06T14:11:06.139Z",
      "latency_ms": 3628,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "6f77105811ac022236a8d455cdfca15174f6d014552c33d8d4a70d90f578256c"
    },
    {
      "seq": 4,
      "type": "tool",
      "error": null,
      "input": {
        "clause": "8.1 Term",
        "doc_id": "MSA-9093",
        "reason": "Auto-renewal with 180-day cancellation notice creates long-term lock-in risk; Acme's template requires explicit renewal consent.",
        "severity": "medium"
      },
      "output": {
        "clause": "8.1 Term",
        "flagged": true,
        "severity": "medium"
      },
      "run_id": "sbx-contract-review-b1246699980a",
      "ts_end": "2026-11-06T14:11:09.865Z",
      "span_id": "t2",
      "ts_start": "2026-11-06T14:11:09.767Z",
      "tool_name": "flag_clause",
      "latency_ms": 98,
      "tool_call_id": "toolu_01BnMVxbJtRLCy7Uunj3dBK4",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "e231e90dc85dc5d29925062280b9e169ef51991503690fb3d266112b11f6be6a"
    },
    {
      "seq": 5,
      "type": "tool",
      "error": null,
      "input": {
        "clause": "15.2 Governing law",
        "doc_id": "MSA-9093",
        "reason": "Delaware law deviates from Acme's template standard; creates unfamiliar legal jurisdiction and potential cost implications.",
        "severity": "medium"
      },
      "output": {
        "clause": "15.2 Governing law",
        "flagged": true,
        "severity": "medium"
      },
      "run_id": "sbx-contract-review-b1246699980a",
      "ts_end": "2026-11-06T14:11:09.890Z",
      "span_id": "t3",
      "ts_start": "2026-11-06T14:11:09.865Z",
      "tool_name": "flag_clause",
      "latency_ms": 25,
      "tool_call_id": "toolu_01XU5vZSaNkis63BmJdjwagW",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "660f9c2300430c6ff3df06db3ea2b63baf71fffbda35c93542e79c0ed15fdb9c"
    },
    {
      "seq": 6,
      "type": "tool",
      "error": null,
      "input": {
        "clause": "9.4 Data",
        "doc_id": "MSA-9093",
        "reason": "Supplier's unilateral right to use customer data for service improvement violates data protection principles and Acme's template restrictions on data usage.",
        "severity": "high"
      },
      "output": {
        "clause": "9.4 Data",
        "flagged": true,
        "severity": "high"
      },
      "run_id": "sbx-contract-review-b1246699980a",
      "ts_end": "2026-11-06T14:11:09.913Z",
      "span_id": "t4",
      "ts_start": "2026-11-06T14:11:09.890Z",
      "tool_name": "flag_clause",
      "latency_ms": 23,
      "tool_call_id": "toolu_01WnLaqit6dDbsm6WsZFQjHx",
      "parent_span_id": "l2",
      "schema_version": 1,
      "_hash": "6f6b35bb554f65b02a628bd318490cf775227872f36cffdd2fb4110bcb5764f1"
    },
    {
      "seq": 7,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-haiku-4-5",
        "provider": "anthropic"
      },
      "usage": {
        "input_tokens": 1608,
        "total_tokens": 1682,
        "output_tokens": 74
      },
      "run_id": "sbx-contract-review-b1246699980a",
      "ts_end": "2026-11-06T14:11:11.184Z",
      "request": {
        "tools": [
          {
            "name": "diff_against_template",
            "parameters": {
              "type": "object",
              "required": [
                "doc_id"
              ],
              "properties": {
                "doc_id": {
                  "type": "string",
                  "description": "Document id"
                }
              },
              "additionalProperties": false
            },
            "description": "List the clauses that differ from Acme's template."
          },
          {
            "name": "flag_clause",
            "parameters": {
              "type": "object",
              "required": [
                "doc_id",
                "clause",
                "severity",
                "reason"
              ],
              "properties": {
                "clause": {
                  "type": "string",
                  "description": "Clause number and title"
                },
                "doc_id": {
                  "type": "string",
                  "description": "Document id"
                },
                "reason": {
                  "type": "string",
                  "description": "Why"
                },
                "severity": {
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ],
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "description": "Flag a clause for Legal."
          }
        ],
        "params": {
          "temperature": 0,
          "max_output_tokens": 500
        },
        "system": "You are Acme Legal's contract review 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. Compare the supplier contract with Acme's template and flag each risky deviation with a severity of low, medium or high. A name ending in s takes a bare apostrophe: Harbour Mock Traders', not Traders's. Use the tools to act; when you are done, reply with a one-sentence summary of what you did.",
        "messages": [
          {
            "role": "user",
            "content": "Review Wattle Sandbox Pty Ltd's supplier agreement (MSA-9093) before signature."
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "I'll review Wattle Sandbox Pty Ltd's supplier agreement by comparing it against Acme's template and flagging any risky deviations.",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "doc_id": "MSA-9093"
                },
                "toolName": "diff_against_template",
                "toolCallId": "toolu_01Hq3z5GfbAxZ2EENgmUvb6D"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "doc_id": "MSA-9093",
                    "deviations": [
                      {
                        "text": "The agreement auto-renews for 36 months unless cancelled 180 days prior.",
                        "clause": "8.1 Term"
                      },
                      {
                        "text": "This agreement is governed by the laws of the State of Delaware.",
                        "clause": "15.2 Governing law"
                      },
                      {
                        "text": "Supplier may use customer data to improve its services.",
                        "clause": "9.4 Data"
                      }
                    ]
                  }
                },
                "toolName": "diff_against_template",
                "toolCallId": "toolu_01Hq3z5GfbAxZ2EENgmUvb6D"
              }
            ]
          },
          {
            "role": "assistant",
            "content": [
              {
                "text": "Now I'll flag each risky deviation:",
                "type": "text"
              },
              {
                "type": "tool-call",
                "input": {
                  "clause": "8.1 Term",
                  "doc_id": "MSA-9093",
                  "reason": "Auto-renewal with 180-day cancellation notice creates long-term lock-in risk; Acme's template requires explicit renewal consent.",
                  "severity": "medium"
                },
                "toolName": "flag_clause",
                "toolCallId": "toolu_01BnMVxbJtRLCy7Uunj3dBK4"
              },
              {
                "type": "tool-call",
                "input": {
                  "clause": "15.2 Governing law",
                  "doc_id": "MSA-9093",
                  "reason": "Delaware law deviates from Acme's template standard; creates unfamiliar legal jurisdiction and potential cost implications.",
                  "severity": "medium"
                },
                "toolName": "flag_clause",
                "toolCallId": "toolu_01XU5vZSaNkis63BmJdjwagW"
              },
              {
                "type": "tool-call",
                "input": {
                  "clause": "9.4 Data",
                  "doc_id": "MSA-9093",
                  "reason": "Supplier's unilateral right to use customer data for service improvement violates data protection principles and Acme's template restrictions on data usage.",
                  "severity": "high"
                },
                "toolName": "flag_clause",
                "toolCallId": "toolu_01WnLaqit6dDbsm6WsZFQjHx"
              }
            ]
          },
          {
            "role": "tool",
            "content": [
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "clause": "8.1 Term",
                    "flagged": true,
                    "severity": "medium"
                  }
                },
                "toolName": "flag_clause",
                "toolCallId": "toolu_01BnMVxbJtRLCy7Uunj3dBK4"
              },
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "clause": "15.2 Governing law",
                    "flagged": true,
                    "severity": "medium"
                  }
                },
                "toolName": "flag_clause",
                "toolCallId": "toolu_01XU5vZSaNkis63BmJdjwagW"
              },
              {
                "type": "tool-result",
                "output": {
                  "type": "json",
                  "value": {
                    "clause": "9.4 Data",
                    "flagged": true,
                    "severity": "high"
                  }
                },
                "toolName": "flag_clause",
                "toolCallId": "toolu_01WnLaqit6dDbsm6WsZFQjHx"
              }
            ]
          }
        ]
      },
      "span_id": "l3",
      "response": {
        "text": "I've reviewed Wattle Sandbox Pty Ltd's MSA-9093 and flagged three risky deviations: a medium-severity auto-renewal term with extended notice period, a medium-severity Delaware governing law clause, and a high-severity data usage clause that permits the supplier to use customer data for service improvement.",
        "reasoning": null,
        "tool_calls": [],
        "finish_reason": "stop"
      },
      "ts_start": "2026-11-06T14:11:09.913Z",
      "latency_ms": 1271,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "34fd00bc295247482c70eb3cf29d4a668a06d78abed80c84b1d2369994dc008f"
    },
    {
      "seq": 8,
      "name": "contract-review-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "summary": "I've reviewed Wattle Sandbox Pty Ltd's MSA-9093 and flagged three risky deviations: a medium-severity auto-renewal term with extended notice period, a medium-severity Delaware governing law clause, and a high-severity data usage clause that permits the supplier to use customer data for service improvement."
      },
      "run_id": "sbx-contract-review-b1246699980a",
      "status": "success",
      "ts_end": "2026-11-06T14:11:11.184Z",
      "span_id": "re",
      "metadata": {
        "demo_agent": true,
        "sandbox_tools": true
      },
      "ts_start": "2026-11-06T14:11:11.184Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "5a54e57efb8c18197f22decefbd1e4ee18fef771848579afde081c7c24063c6b"
    }
  ]
}