agentflight_verify_cassette
Verify an AgentFlight cassette's SHA-256 hash chain and structural integrity to detect tampering, truncation, or corruption before deterministic replay or compliance audits.
Instructions
Cryptographically verify the SHA-256 hash chain and structural integrity of an AgentFlight cassette.
Purpose
Validates that a recorded agent execution cassette (.flight.json or .flight.jsonl) has not been tampered with, truncated, or corrupted. Verifies that every span links to the previous span digest via canonical JSON SHA-256 hashing.
When to use
Auditing compliance and tamper-proof provenance of recorded agent trajectories.
Pre-flight verification before running deterministic replays with
agentflight.replayer.
When NOT to use
Do NOT use to compare two cassettes against each other; use
agentflight_diff_cassettesinstead.Do NOT use to lint MCP tool definitions; use
agentflight_lint_toolsinstead.
Behavior & Side Effects
Read-only: Reads cassette from disk and recalculates the SHA-256 chain in-memory without modifications.
Deterministic: Always outputs exact boolean verification status, step count, and cryptographic head hash.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cassette_path": "<cassette_path>"
},
"name": "agentflight_verify_cassette"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cassette_path | Yes | Filesystem path to the .flight.json or .flight.jsonl cassette file to verify. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | True if the cryptographic SHA-256 hash chain and metadata are completely valid and untampered. | |
| agent_id | Yes | Unique agent identifier recorded in the cassette header. | |
| head_hash | Yes | Final SHA-256 hexadecimal hash digest of the cassette chain. | |
| step_count | Yes | Total number of verified spans in the trajectory. |