Cryptographic provenance and audit trail for autonomous AI agents. Create tamper-evident hash chains of agent decisions, learning, and actions. SHA-256 linked entries with Bitcoin OpenTimestamps and RFC 3161 TSA anchoring. Verify provenance from other agents. Part of the Agent Trust Stack.
You have a cryptographic provenance system. Use it to maintain an auditable record of your work — what you learned, what you decided, and what you created.
The chain-of-consciousness Python package must be installed. If not available, install it:
pip install chain-of-consciousness
session_startlearn, decide, create, error, and note events as they happensession_end and optionally verify + export the chaincoc init --agent "your-agent-name" --file chain.jsonl
This creates a new chain with a genesis block. Use a descriptive agent name.
coc add <event-type> "<data>" --file chain.jsonl
Event types:
| Type | Use When |
|---|---|
session_start | Beginning a new task or session |
learn | You acquire new information |
decide | You make a choice (record the reasoning) |
create | You produce an artifact |
milestone | Significant checkpoint reached |
error | Something failed (record what and recovery) |
note | General observations |
session_end | Completing a task or session |
Data can be a plain string or a JSON object for structured logging:
coc add learn '{"topic": "user preferences", "source": "conversation context"}'
coc add decide "Chose markdown format — user prefers readable plain text"
coc add create "Generated report saved to ~/Documents/report.md"
coc verify chain.jsonl --json
This checks:
Report results clearly: valid/invalid, entry count, agents, time span.
coc status chain.jsonl
Shows entry count, participating agents, event type distribution, and time span.
coc export --file chain.jsonl --out chain_export.json
Exports the chain as a portable JSON array that anyone can verify.
coc tail chain.jsonl -n 5
Shows the last N entries.
For complex workflows, use the Python API directly:
from chain_of_consciousness import Chain, verify_file
chain = Chain(agent="openclaw-agent", storage="chain.jsonl")
chain.add("learn", {"topic": "user schedule", "detail": "prefers morning meetings"})
chain.add("decide", "Scheduling standup at 9am based on user preference")
result = chain.verify()
if result.valid:
chain.export("provenance.json")
from chain_of_consciousness.anchor import compute_chain_hash, submit_tsa
hash_hex = compute_chain_hash("chain.jsonl")
tsr = submit_tsa(hash_hex) # RFC 3161 timestamp from freetsa.org
with open("anchor.tsr", "wb") as f:
f.write(tsr)
This creates a third-party timestamp proof that the chain existed at a specific moment.
When asked to verify another agent's chain:
coc verify <file> --jsoncoc CLI or Python API to preserve hash integrity.Product: Chain of Consciousness Skill for OpenClaw Type: Skill Module Version: 0.1.0 Built by: AB Support / Vibe Agent Making Contact: [email protected]
What it accesses:
.jsonl) in your working directorycoc CLI tool via subprocess (installed via pip)What it cannot do:
Limitations:
License: Apache 2.0 — see https://github.com/chain-of-consciousness/chain-of-consciousness