Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
molt-life-kernel is a Node.js module that gives AI agents persistent identity across sessions using an append-only ledger, crash recovery snapshots, and heartbeat monitoring. It also provides coherence checks to detect behavioral drift and a witness gate for human approval of high-risk actions.
It bundles memory persistence, crash recovery, coherence monitoring, and human-in-the-loop approval into one module rather than requiring each piece to be built and wired separately.
When to use it
- Preserving agent context across session restarts
- Gating destructive agent operations with human approval
- Generating immutable audit logs for agent actions
- Detecting behavioral drift in long-running agents
- Recovering agent state after a crash or context reset
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: keep my agent's memory intact across restarts and require approval before it deletes any data
- 1Initialize MoltLifeKernel with a heartbeat interval and a witnessCallback pointing to a human approval function
- 2Append each significant agent action to the ledger using kernel.append()
- 3Call kernel.enforceCoherence() at the start of each session to detect drift from recent ledger entries
- 4Route any destructive operation through kernel.witness() and wait for human approval before executing
- 5Call kernel.getSnapshot() periodically so the agent can recover via kernel.rehydrate() after a crash
Agent retains full action history across restarts, destructive actions are gated behind human approval, and coherence anomalies are caught before they cause damage