Skip to content

agentkernel receipt

Verify and replay execution receipts generated by run and exec.

Generate a signed receipt

Use --receipt on run or exec:

agentkernel run --receipt ./run-receipt.json -- python3 -c "print('ok')"
agentkernel exec my-sandbox --receipt ./exec-receipt.json -- ls -la

Receipts are signed with a local Ed25519 key stored under ~/.agentkernel/receipts/.

Verify a receipt

agentkernel receipt verify <FILE>

This validates:

  • receipt payload hash
  • Ed25519 signature
  • signer key fingerprint consistency

Legacy unsigned receipts

For older receipts generated before signing support:

agentkernel receipt verify --allow-unsigned <FILE>

Replay a receipt

agentkernel receipt replay <FILE>

Replay behavior:

  • verifies the receipt first
  • re-runs the recorded invocation (run or exec)
  • prints replay stdout/stderr
  • compares replay output hash to the receipt
  • compares replay exit code to the receipt

Important notes:

  • receipt replay does not auto-add --receipt, so replay does not create a chained receipt unless you explicitly pass --receipt yourself in a separate command.
  • exec receipts require the referenced sandbox to exist and be running.
  • run receipts with state-dependent flags (--branch, --keep) can replay differently if your local sandbox state has changed.

For legacy unsigned receipts, use:

agentkernel receipt replay --allow-unsigned <FILE>

receipt replay exits with the replay command's exit code if replay fails.