create_receipt
Create Ed25519-signed receipts with pre-computed SHA-256 hashes for externally hashed AI actions. Records cryptographic proof with full field control and local SQLite storage for verifiable audit trails.
Instructions
Create an Ed25519-signed receipt with pre-computed SHA-256 hashes. Use when you have already hashed the input/output data externally or need full control over receipt fields. For automatic hashing, use track_action instead. Returns the signed receipt object with receipt_id. The receipt is stored locally in SQLite and can be completed later with complete_receipt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action name being recorded (e.g., "generate_code", "analyze_data") | |
| input_hash | Yes | Pre-computed SHA-256 hash of the input data in format "sha256:hexstring" | |
| receipt_type | No | Receipt type: "action" (default), "verification", "judgment", or "arbitration" | |
| output_hash | No | Pre-computed SHA-256 hash of the output data in format "sha256:hexstring" | |
| output_summary | No | Human-readable summary of the output | |
| model | No | AI model used | |
| tokens_in | No | Input tokens | |
| tokens_out | No | Output tokens | |
| cost_usd | No | Cost in USD | |
| latency_ms | No | Latency in milliseconds | |
| tool_calls | No | Tools called during the action | |
| tags | No | Tags for categorization | |
| confidence | No | Confidence score 0-1 | |
| metadata | No | Arbitrary metadata | |
| parent_receipt_id | No | Parent receipt ID for chains | |
| chain_id | No | Chain ID (auto-generated if not provided) | |
| status | No | Initial status: "pending" (default, complete later) or "completed" | |
| constraints | No | Array of constraint definitions to evaluate (types: max_latency_ms, max_cost_usd, min_confidence, required_fields, status_must_be, output_schema) | |
| expires_at | No | ISO datetime when this receipt expires | |
| ttl_ms | No | Time-to-live in milliseconds from now |