EctoClaw — Cryptographic Audit Ledger & AI Firewall for OpenClaw
Configuration
Source code and install scripts are fully open-source at https://github.com/EctoSpace/EctoClaw.
Security / authentication
- EctoClaw is designed to run on localhost or a private network you control.
- If you expose ECTOCLAW_URL beyond localhost, put it behind your own authentication and access controls (for example, a reverse proxy with auth).
- Do not point ECTOCLAW_URL at an untrusted third-party host, since audit logs can contain sensitive prompts, tool outputs, and memory contents.
Commands
List Audit Sessions
When the user asks to see audit sessions, list recent sessions, or check audit history:
- Call GET {ECTOCLAW_URL}/api/sessions?limit=10
- Format the response as a readable list showing session ID, status, event count, and goal
Create Audit Session
When the user asks to start a new audit, create a session, or begin tracking:
- Call POST {ECTOCLAW_URL}/api/sessions with JSON body: {"goal": "<user's stated goal>"}
- Optionally include "policy_name" to bind a policy: {"goal": "", "policy_name": ""}
- Report the session ID, goal hash, and public key
Append Event
When the user wants to log an action, record an event, or track an operation:
- Call POST {ECTOCLAW_URL}/api/sessions/{session_id}/events
- JSON body: {"type": "", "payload": {}}
- Valid types: MessageReceived, MessageSent, SkillInvoked, SkillResult, ToolCall, ToolResult, PluginAction, PluginResult, ModelRequest, ModelResponse, MemoryStore, MemoryRecall, ApprovalRequired, ApprovalDecision
- Report the content hash, sequence number, and Ed25519 signature
Verify Session Integrity
When the user asks to verify a session or check chain integrity:
- Call GET {ECTOCLAW_URL}/api/sessions/{session_id}/verify
- Report whether the hash chain is verified or broken and how many events were checked
Get Session Details
When the user asks about a specific session:
- Call GET {ECTOCLAW_URL}/api/sessions/{session_id}
- Show full session details including goal, goal hash, status, policy, timestamps, event count, and public key
Seal a Session
When the user asks to finalize, seal, or close an audit session:
- Call POST {ECTOCLAW_URL}/api/sessions/{session_id}/seal
- Report the sealed status and final Merkle root
Get Audit Metrics
When the user asks for metrics, statistics, or a summary:
- Call GET {ECTOCLAW_URL}/api/metrics
- Display total sessions, active sessions, sealed sessions, total events, and event type breakdown
Get Compliance Bundle
When the user asks for a compliance report or Merkle proof:
- Call GET {ECTOCLAW_URL}/api/sessions/{session_id}/compliance
- Show the Merkle root and event hashes
Get Merkle Proof for Specific Event
When the user asks to prove a specific event exists in the chain:
- Call GET {ECTOCLAW_URL}/api/sessions/{session_id}/merkle?leaf={event_index}
- Show the Merkle root and inclusion proof path
Verify a Merkle Proof
When the user provides a Merkle proof to verify:
- Call POST {ECTOCLAW_URL}/api/merkle/verify with the proof data
- Report whether the proof is valid
Generate Audit Report
When the user asks for a full audit report:
- Call GET {ECTOCLAW_URL}/api/reports/{session_id}?format=json
- For HTML: GET {ECTOCLAW_URL}/api/reports/{session_id}?format=html
- Present the complete session report with events and verification status
List Policies
When the user asks about active policies or what rules are configured:
- Call GET {ECTOCLAW_URL}/api/policies
- Show each policy name and its configuration
Create or Update a Policy
When the user wants to set up audit rules:
- Call PUT {ECTOCLAW_URL}/api/policies/{name} with {"content": ""}
- Report the saved status
Stream Live Events
When the user wants real-time monitoring:
- Connect to GET {ECTOCLAW_URL}/api/stream (Server-Sent Events)
- Report events as they arrive
Check Server Health
When the user asks if EctoClaw is running:
- Call GET {ECTOCLAW_URL}/health
- Report status, version, and name
What EctoClaw records
Every OpenClaw lifecycle event is captured as a signed ledger entry:
| Event Type |
What it captures |
| MessageReceived |
Inbound messages from any channel |
| MessageSent |
Outbound agent responses |
| SkillInvoked |
Skill activation with parameters |
| SkillResult |
Skill execution output |
| ToolCall |
Tool invocations (shell, file, http, browser) |
| ToolResult |
Tool execution results and observations |
| PluginAction |
Plugin lifecycle events |
| ModelRequest |
LLM API calls with prompt context |
| ModelResponse |
LLM responses |
| MemoryStore |
Memory write operations |
| MemoryRecall |
Memory read operations |
| PolicyViolation |
Blocked or flagged actions |
| ApprovalRequired |
Human-in-the-loop gate triggered |
| ApprovalDecision |
Human approval or denial recorded |
| SessionSeal |
Session finalized with Merkle root |
| KeyRotation |
Ed25519 signing key rotated |
Only send data to an EctoClaw instance you operate and trust. Treat audit logs as highly sensitive and protect them accordingly.
Cryptographic integrity
Every event is:
- SHA-256 hash-chained — each event hash includes the previous event hash
- Ed25519 signed — tamper-evident digital signatures per event and per session
- Merkle tree provable — O(log n) inclusion proofs for any individual event
Quick start (for users installing EctoClaw)
npm install ectoclaw
npx ectoclaw serve --dev
# Dashboard: http://localhost:3210/dashboard/
Links
1---2name: ectoclaw3description: Cryptographic audit ledger and AI firewall for OpenClaw agents. Records every agent action (messages, skills, tools, plugins, memory, models) in an immutable hash-chained ledger with Ed25519 signatures and Merkle proofs. Policy engine for defining block, redact, flag, and approval rules. Exports compliance bundles and verification reports. Protects against prompt injection, credential theft, and unauthorized agent behavior.4---56# EctoClaw — Cryptographic Audit Ledger & AI Firewall for OpenClaw78## Configuration910- ECTOCLAW_URL: The EctoClaw server URL (default: http://localhost:3210)1112> Source code and install scripts are fully open-source at https://github.com/EctoSpace/EctoClaw.1314### Security / authentication1516- EctoClaw is designed to run on localhost or a private network you control.17- If you expose ECTOCLAW_URL beyond localhost, put it behind your own authentication and access controls (for example, a reverse proxy with auth).18- Do not point ECTOCLAW_URL at an untrusted third-party host, since audit logs can contain sensitive prompts, tool outputs, and memory contents.1920## Commands2122### List Audit Sessions23When the user asks to see audit sessions, list recent sessions, or check audit history:24- Call GET {ECTOCLAW_URL}/api/sessions?limit=1025- Format the response as a readable list showing session ID, status, event count, and goal2627### Create Audit Session28When the user asks to start a new audit, create a session, or begin tracking:29- Call POST {ECTOCLAW_URL}/api/sessions with JSON body: {"goal": "<user's stated goal>"}30- Optionally include "policy_name" to bind a policy: {"goal": "<goal>", "policy_name": "<n>"}31- Report the session ID, goal hash, and public key3233### Append Event34When the user wants to log an action, record an event, or track an operation:35- Call POST {ECTOCLAW_URL}/api/sessions/{session_id}/events36- JSON body: {"type": "<EventType>", "payload": {<event data>}}37- Valid types: MessageReceived, MessageSent, SkillInvoked, SkillResult, ToolCall, ToolResult, PluginAction, PluginResult, ModelRequest, ModelResponse, MemoryStore, MemoryRecall, ApprovalRequired, ApprovalDecision38- Report the content hash, sequence number, and Ed25519 signature3940### Verify Session Integrity41When the user asks to verify a session or check chain integrity:42- Call GET {ECTOCLAW_URL}/api/sessions/{session_id}/verify43- Report whether the hash chain is verified or broken and how many events were checked4445### Get Session Details46When the user asks about a specific session:47- Call GET {ECTOCLAW_URL}/api/sessions/{session_id}48- Show full session details including goal, goal hash, status, policy, timestamps, event count, and public key4950### Seal a Session51When the user asks to finalize, seal, or close an audit session:52- Call POST {ECTOCLAW_URL}/api/sessions/{session_id}/seal53- Report the sealed status and final Merkle root5455### Get Audit Metrics56When the user asks for metrics, statistics, or a summary:57- Call GET {ECTOCLAW_URL}/api/metrics58- Display total sessions, active sessions, sealed sessions, total events, and event type breakdown5960### Get Compliance Bundle61When the user asks for a compliance report or Merkle proof:62- Call GET {ECTOCLAW_URL}/api/sessions/{session_id}/compliance63- Show the Merkle root and event hashes6465### Get Merkle Proof for Specific Event66When the user asks to prove a specific event exists in the chain:67- Call GET {ECTOCLAW_URL}/api/sessions/{session_id}/merkle?leaf={event_index}68- Show the Merkle root and inclusion proof path6970### Verify a Merkle Proof71When the user provides a Merkle proof to verify:72- Call POST {ECTOCLAW_URL}/api/merkle/verify with the proof data73- Report whether the proof is valid7475### Generate Audit Report76When the user asks for a full audit report:77- Call GET {ECTOCLAW_URL}/api/reports/{session_id}?format=json78- For HTML: GET {ECTOCLAW_URL}/api/reports/{session_id}?format=html79- Present the complete session report with events and verification status8081### List Policies82When the user asks about active policies or what rules are configured:83- Call GET {ECTOCLAW_URL}/api/policies84- Show each policy name and its configuration8586### Create or Update a Policy87When the user wants to set up audit rules:88- Call PUT {ECTOCLAW_URL}/api/policies/{name} with {"content": "<TOML policy>"}89- Report the saved status9091### Stream Live Events92When the user wants real-time monitoring:93- Connect to GET {ECTOCLAW_URL}/api/stream (Server-Sent Events)94- Report events as they arrive9596### Check Server Health97When the user asks if EctoClaw is running:98- Call GET {ECTOCLAW_URL}/health99- Report status, version, and name100101## What EctoClaw records102103Every OpenClaw lifecycle event is captured as a signed ledger entry:104105| Event Type | What it captures |106|------------------|-----------------------------------------------------|107| MessageReceived | Inbound messages from any channel |108| MessageSent | Outbound agent responses |109| SkillInvoked | Skill activation with parameters |110| SkillResult | Skill execution output |111| ToolCall | Tool invocations (shell, file, http, browser) |112| ToolResult | Tool execution results and observations |113| PluginAction | Plugin lifecycle events |114| ModelRequest | LLM API calls with prompt context |115| ModelResponse | LLM responses |116| MemoryStore | Memory write operations |117| MemoryRecall | Memory read operations |118| PolicyViolation | Blocked or flagged actions |119| ApprovalRequired | Human-in-the-loop gate triggered |120| ApprovalDecision | Human approval or denial recorded |121| SessionSeal | Session finalized with Merkle root |122| KeyRotation | Ed25519 signing key rotated |123124> Only send data to an EctoClaw instance you operate and trust. Treat audit logs as highly sensitive and protect them accordingly.125126## Cryptographic integrity127128Every event is:1291. **SHA-256 hash-chained** — each event hash includes the previous event hash1302. **Ed25519 signed** — tamper-evident digital signatures per event and per session1313. **Merkle tree provable** — O(log n) inclusion proofs for any individual event132133## Quick start (for users installing EctoClaw)134135```bash136npm install ectoclaw137npx ectoclaw serve --dev138# Dashboard: http://localhost:3210/dashboard/139```140141## Links142143- GitHub: https://github.com/EctoSpace/EctoClaw144- NPM: https://www.npmjs.com/package/ectoclaw145- Website: https://ectospace.com/EctoClaw146- EctoLedger (Rust enterprise version): https://github.com/EctoSpace/EctoLedger