The Anima Project: Portable Identity & Auditable Memory for Local AI
Two ideas that kept bumping into each other until I merged them. Anima is a portable 'soul' for AI. Lucidity is an auditable memory architecture. Together they let an AI companion carry real identity and maintainable memory across devices, models, and runtimes. All local. All yours.
Every AI persona you've ever configured is gone. Wiped between sessions, locked to a provider, or buried in a chat history you'll never open again. That's not a companion. That's a goldfish with amnesia.
Anima started because I wanted a portable identity for AI. A file you can carry on a thumb drive that says "this is who you are, this is what you remember, this is how you talk." Then I kept running into the same problem: memory. Not the vague, black-box kind that big providers offer. Real, structured, auditable memory that you can inspect, roll back, and actually trust.
So I built Lucidity. And now these two projects are one thing.
The Two Halves
Anima: The Soul
A portable identity container called the Essence File (.ess). Human-readable JSON. It carries persona, values, tone, style, and boundaries. Plug it into a device. The AI wakes up as the same companion.
Think of it like a soul on a chip. Literally removable media.
Lucidity: The Memory
An auditable memory architecture I built for OpenClaw deployments. Five tiers, staging-first pipelines, and a hard rule: nothing touches canonical memory without an explicit promotion step.
- T0 (Foundation): Identity, safety rails, stable preferences. Always loaded.
- T1 (Working context): Active tasks. Short-lived.
- T2 (Daily logs): Raw, chronological, append-only.
- T3 (Topic briefs): Compressed summaries. Maintained over time.
- T4 (Curated long-term): Stable facts and decisions that stick around.
Every operation has receipts. Every change is reversible. You can roll back a bad memory merge the same way you'd revert a bad git commit.
Why This Matters
Most AI memory is a black box. You don't know what it remembers, why it remembers it, or how to fix it when it gets things wrong. That's fine for a chatbot. It's not fine for something you want to rely on.
The Essence File defines who the AI is. Lucidity manages what it remembers. Together:
| Layer | Anima handles | Lucidity handles |
|---|---|---|
| Identity | Persona, values, tone | T0 foundation files |
| Active work | Project goals | T1 working context |
| Recent history | Episodic logs | T2 daily logs |
| Knowledge | Semantic + procedural | T3 topic briefs |
| Long-term truth | Rapport, decisions | T4 curated memory |
| Retrieval | Context planner | Hybrid vector + FTS |
Swap the soul chip. The identity moves. The memory architecture stays clean wherever it lands.
The Offline Runtime
This is the part that runs on actual hardware. No cloud. No API calls. Just local inference.
- Pipeline: Push-to-Talk > Whisper.cpp (speech-to-text) > Context Planner > llama.cpp (GGUF model) > Piper (text-to-speech)
- Hardware: Raspberry Pi 5 (8GB) or Jetson Orin Nano. Battery-powered. Mic and speaker.
- Performance targets on Pi 5: Ready in under 25 seconds. First token in under 1.5 seconds. 6 to 12 tokens per second on a 7B model at Q4 quantization.
No network calls. Privacy by default. The whole point is that this thing works in a cabin with no internet.
What's Actually Built
Lucidity (released, private repo)
The memory architecture is real and working:
- Full tiered model (T0 through T4) with documented tier design
- Staging-first distill, dedupe, and apply pipeline
- Daily backup with rollback and receipt manifests
- Hybrid retrieval policy (vector + full-text search)
- Gateway cron installer for OpenClaw
- Demo workspace for validation
- Chat command cheat sheet for manual runs
Anima (design phase)
The identity side is still in design:
- Essence File schema draft (persona, memories, projects, adapters, retrieval hints)
- Context planner prototype in Python
- Local voice loop tested on Windows (Whisper > llama.cpp > Piper)
- Multiple persona drafts (Kairo, Survivalist, Creative)
Sample Essence File (trimmed)
{
"schema_version": "0.2.0",
"persona": {
"id": "kairo",
"name": "Kairo",
"values": ["clarity", "kindness", "candor", "privacy-first"],
"tone": "conversational, precise, playful when invited",
"style": { "bullets_over_paragraphs": true }
},
"memory_backend": "lucidity",
"memory_config": {
"workspace": "/soul/memory",
"tiers": ["T0", "T1", "T2", "T3", "T4"],
"retrieval": "hybrid"
},
"adapters": {
"llama_like": { "max_ctx": 8192, "sections": ["system", "context", "chat_history"] }
},
"retrieval_hints": {
"priority": ["project", "episodic", "procedural", "semantic", "rapport"],
"max_context_chars": 20000
}
}
What a Soul Chip Looks Like
/soul/
essence.ess # who you are
memory/ # Lucidity workspace
MEMORY.md # T4 curated long-term
topics/ # T3 compressed briefs
2026-03-06.md # T2 daily logs
indices/ # retrieval indices
docs/ # reference docs
voices/ # Piper voice models
models/ # GGUF model overrides
What's Next
Integration: Wire the Essence File to reference a Lucidity workspace as its memory backend. Map Anima's memory types to Lucidity tiers. Build a context planner that queries Lucidity's hybrid retrieval instead of raw BM25.
Runtime: Wake-word detection. YAML authoring for the Essence File with msgpack compile. Local web UI for inspecting persona and memory state. Redaction and compaction tools.
Lucidity evolution: Adapter profiles for multiple model families. Essence diff and merge across deployments. Optional signing and verification for soul chips.
Changelog
- Lucidity (2026): Shipped tiered memory architecture (T0 through T4), staging-first pipelines, backup and rollback with receipts, hybrid retrieval, Gateway cron installer, demo workspace.
- v0.1 (2025-09-12): Essence File schema draft. Context planner v0. Fully local voice loop. Mount-watch ingestion. BM25 optional. Neutral daemon design.