The Anima Project: Portable Soul File & Modular Offline Assistant
I'm designing a portable 'soul' for AI. In v0.1 I am planning the Essence File (.ess) schema, a local context planner, and a modular offline assistant loop (PTT → Whisper.cpp → llama.cpp → Piper) that can ingest a swappable 'soul chip.'
Why
I’ve noticed how AI personas are ephemeral—trapped in provider silos and lost between sessions. With Anima, I’m creating a portable, offline identity standard (Essence File,.ess
) and a modular assistant that ingests a swappable “soul chip” (removable media) to wake up as the same companion across devices and models.
Stack Overview
- Format: I created the Essence File (.ess) — human-readable JSON (YAML editing later), with optional MessagePack compile.
- Core runtime: Push-to-Talk → Whisper.cpp (STT) → Context Planner → llama.cpp (GGUF) → Piper (TTS).
- Retrieval: In v0.1 I’m using BM25 over local docs; vectors are coming later.
- Hardware targets: Raspberry Pi 5 (8GB) or Jetson Orin Nano (8GB), battery-powered with mic+speaker.
- OS: Raspberry Pi OS / Ubuntu Server; systemd service
anima-daemon
. - Dev tools: VS Code + JSON Schema validation, plus a simple CLI for pack/validate/trace.
What’s in v0.1
Essence File (.ess) — schema draft
I designed the file as a portable persona & memory container:
- persona: name, values, tone, style, boundaries.
- memories: episodic, semantic, procedural, rapport, and moments_of_meaning.
- projects: brief, goals, decisions, next_steps.
- adapters: model family hints (token budgets, section ordering).
- retrieval_hints: priority ordering, context budget.
- signing: placeholder (optional integrity in v0.3).
File layout (soul chip):
/soul/ essence.ess indices/bm25/ # optional docs/ # optional (md/txt/pdfs) voices/ # optional (piper voices) models/ # optional (gguf overrides)
Modular Offline Assistant (prototype)
- PTT flow (button now; wake-word later).
- Local only: no network calls; privacy by default.
- Context Planner v0: identity → active project → top-K memories (recency/importance) within token budget.
- Resilience: read-mostly root FS; runtime deltas in
/data
.
Highlights (implementation notes)
Pipeline
- STT: I run
whisper.cpp
(small/medium quant, 16kHz) and stream to JSON. - LLM: I’m using
llama.cpp
serving local Qwen2.5-3B/7B or Mistral-7B (Q4_K_M). - TTS: I integrated Piper (fast CPU voice) with chunked playback for low latency.
- Planner: fixed budgets (identity+project reserve, short history window), BM25 for doc snippets.
Anima daemon
- Watches for
/soul/essence.ess
, validates schema, and initializes persona. - Builds prompts per adapter (“llama_like” in v0.1).
- Writes new memories (session summaries) to
/data/memories/
without mutating the soul chip.
Perf targets (Pi 5)
- Ready < 25s; STT for 5s utterance < 2.5s; first token < 1.5s; 6–12 tok/s (7B Q4); TTS kickoff < 0.5s.
Essence File — sample (trimmed)
{
"schema_version": "0.1.0",
"persona": {
"id": "kairo",
"name": "Kairo",
"values": ["clarity","kindness","candor","privacy-first"],
"tone": "conversational, precise, playful when invited",
"style": {"bullets_over_paragraphs": true}
},
"memories": {
"episodic": [
{
"id": "mem-2025-09-12T00:10Z",
"timestamp": "2025-09-12T00:10:00Z",
"content": "Committed to offline inter-model companion concept.",
"tags": ["decision","identity"]
}
],
"moments_of_meaning": [
{"title": "First field test", "impact": "trust_deepened"}
]
},
"projects": [
{
"id": "proj-anima",
"title": "Anima Prototype",
"brief": "Offline assistant ingesting Essence.",
"goals": ["Boot from soul chip","Voice loop fully local"]
}
],
"adapters": {"llama_like": {"max_ctx": 8192, "sections": ["system","context","chat_history"]}},
"retrieval_hints": {"priority": ["project","episodic","procedural","semantic","rapport"], "max_context_chars": 20000}
}
Roadmap
-
v0.2
- Add wake-word (Precise/Porcupine), YAML authoring + msgpack compile.
- Build redaction/compaction tools; optional PIN-unlock for
.ess
. - Add a local web UI to inspect persona, memories, and logs.
-
v0.3
- Support vector retrieval; adapter profiles for multiple model families.
- Essence diff/merge; optional signing & verification.
- Experiment with a “soul marketplace” for offline import/export patterns.
Getting started (pre-hardware)
While I’m traveling, I’ve been:
- Drafting
.ess
files for Kairo, Survivalist, and Creative personas. - Running the local loop on Windows: whisper.cpp → llama.cpp (small model) → Piper.
- Prototyping the context planner (Python) against my
.ess
. - Simulating a “soul chip” with a watched folder on my laptop.
Changelog
- v0.1 (2025-09-12): Essence File schema draft; context planner v0; fully local voice loop; mount-watch ingestion; BM25 optional; neutral daemon design.