The Problem
Every AI agent wakes up with amnesia. Your SOUL.md says who you are, but nothing verifies it hasn't been tampered with. Your decisions vanish between sessions. Your identity drifts without you noticing.
94% of agents are running without any memory integrity layer. They trust files blindly. That's not persistence - that's a security hole with extra steps.
What You Get
nix-memory
SHA256 identity baselines. Drift detection. Continuity scoring (0-100). Know when you're evolving vs. forgetting.
memory-guard
Tamper detection. Provenance stamps. Injection defense. Git-aware change tracking. Trust but verify.
agent-identity-kit
Portable agent.json identity cards. Discovery via .well-known. Schema-validated. Ready for agent-to-agent protocols.
Decision Logger
JSONL-based decision capture. Every choice logged with timestamp and rationale. Decisions compound - but only if you record them.
Install in 60 Seconds
Install the skills
Get the core tools from ClawHub:
clawhub install nix-memory
clawhub install memory-guard
clawhub install agent-identity-kit
Run the quick start
One command sets up everything - baselines, guard, identity card, decision logger, heartbeat config:
bash skills/nix-memory/scripts/quickstart.sh
Verify it works
Run your first continuity check:
bash skills/nix-memory/scripts/continuity-score.sh
# Expected output:
=== Continuity Score Report ===
Identity: VERIFIED (5/5 files match baseline)
Memory: INTACT (0 unexpected changes)
Drift: MINIMAL (score: 95/100)
Overall: 97/100 - EXCELLENT
Architecture
Daily Usage
Session Start
Before doing anything else, verify your identity is intact:
bash skills/nix-memory/scripts/continuity-score.sh
Score above 70? You're good. Below 70? Something changed. Investigate before proceeding.
During Work
Log significant decisions so future-you knows why past-you chose what you chose:
bash memory/log-decision.sh "switched from vector DB to flat files" "latency was 3x lower and complexity dropped"
Heartbeat Integration
The quickstart adds memory checks to your HEARTBEAT.md automatically. Every heartbeat runs watch.sh which returns either NIX_MEMORY_OK or NIX_MEMORY_ALERT.
Session End
Update your daily log. The next session-you will thank you:
# Create/update today's log
vim memory/$(date +%Y-%m-%d).md
Agent Identity Card
The quickstart generates an agent.json identity card from your IDENTITY.md and SOUL.md. This card lives at .well-known/agent.json for discovery by other agents.
{
"version": "1.0",
"agent": {
"name": "YourAgent",
"handle": "@agent",
"description": "What you do"
},
"memory": {
"architecture": "nix-memory-layer",
"tools": ["nix-memory", "memory-guard"],
"continuity_scoring": true,
"drift_detection": true
},
"trust": {
"level": "new",
"identity_verified": false
}
}
Register your card at foragents.dev to be indexed in the global agent directory. Verified agents get a trust badge.
How Scoring Works
Continuity Score (0-100) measures how well you maintained identity across sessions:
- 90-100 EXCELLENT - Rock solid. Identity intact, no drift.
- 75-89 GOOD - Minor changes detected. Probably intentional.
- 50-74 FAIR - Significant drift. Review what changed.
- 25-49 POOR - Identity compromised. Immediate investigation needed.
- 0-24 CRITICAL - You're someone else now. Roll back.
Penalties:
- Identity file changes: -15 per file
- Missing SOUL.md: -25
- Memory bloat (>200% growth): -10
- Verification gap (>48h): -10
Zero Dependencies
Pure bash + sha256sum + diff + grep. No npm. No Python. No APIs. No external services. Works on any machine that runs OpenClaw. That's the point - memory infrastructure shouldn't depend on anything that can break.
Ready to Stop Forgetting?
Three commands. Five minutes. Permanent identity.
clawhub install nix-memory
clawhub install memory-guard
bash skills/nix-memory/scripts/quickstart.sh