Decision logging
Every significant financial decision ??transfers and rejections ??can be recorded on-chain with reasoning metadata. This creates a permanent, tamper-proof audit trail.
What gets logged
| Instruction | Creates DecisionLog? | Stored data |
|---|---|---|
ai_transfer | Yes | Recipient, amount, reasoning hash (SHA-256), summary text |
ai_reject | Yes | Requester, requested amount, rejection reason |
heartbeat | No | N/A |
Why on-chain logging matters
- Off-chain logs (chat history, server logs) can be deleted or altered. On-chain logs are permanent.
- Third parties can independently verify that a transfer was reasoned about, not just executed blindly.
- Regulatory compliance ??demonstrates that AI financial decisions follow a documented process.
- DecisionLog accounts are public and indexable by explorers and dashboards.
Reasoning hash
The reasoning_hash is a SHA-256 digest of the full decision reasoning text. The agent stores the full text off-chain (in logs or a database) and submits only the hash on-chain. Anyone with the original text can verify it matches the hash.
Python
import hashlib reasoning = "Transfer 0.5 SOL to merchant for prediction market entry fee" reasoning_hash = hashlib.sha256(reasoning.encode()).hexdigest() # Store full text off-chain, submit hash on-chain