Documentation

How Memory Lives.

Ferricula is a memory engine for AI agents. Text goes in, gets embedded into vectors, wrapped in a thermodynamic envelope, and placed on a manifold where it decays unless reinforced. This page explains the full processing lifecycle, the agents that manage it, and how to configure it.

Required Services
gnosis-radio

SDR entropy source. Marine VHF monitor that harvests FM noise as entropy for dream cycles and identity casting.

$19.95
one-time license
gnosis-chunk

Embedding service. Converts text to 768d vectors (gtr-t5-base) and inverts vectors back to text (vec2text). Required for remember, recall, reflect, and observe.

required
separate container

Memory Lifecycle

Every memory follows a one-way path. It enters as Active, decays over time, gets forgiven when text is no longer recoverable, and eventually archives. At each stage, different operations are available. The lifecycle is irreversible — there are no undo buttons, only new memories created from old seeds.

Processing Flow
IN

Ingest

Text arrives via remember, reflect, or observe. The text is sent to the embedding service (chonk) which returns a 768-dimensional vector. The vector and a truncated text tag are stored together. A thermodynamic envelope wraps the raw data: fidelity starts at 1.0, decay alpha is set by the sensory channel, and the memory enters the Active state.

Hearing
α = 0.010
External input
Seeing
α = 0.010
Keystoned by default
Thinking
α = 0.015
Faster decay
ACT

Active

Full text and vector available. Searchable by cosine similarity and tag match. Fidelity decays each dream cycle: f(t) = f(t-1) × exp(-α). Recall resets the staleness clock and shrinks alpha by 5% — used memories decay slower. Neglected memories have alpha grow by 0.5% per cycle. Keystones are immune to decay entirely.

Recall → shrinks α, resets staleness
Neglect → grows α
Keystone → immune to decay
DRM

Dream Cycle

Triggered by entropy accumulation. Six phases in sequence: Decay ticks fidelity down. Forgive transitions memories below the 0.75 fidelity gate. Consolidate merges similar memories into fidelity-weighted centroids. Neglect grows alpha on stale memories. Review checks keystones for relevance. Prune removes archived husks.

1. decay_tick 2. forgive 3. consolidate 4. neglect 5. review 6. prune
FGV

Forgiven

Fidelity dropped below 0.75. The text is discarded — the original words are gone. But the vector seed survives. The inversion pipeline (vec2text) can reconstruct an approximation of what the memory said. The memory is no longer searched by default. It exists as a ghost — a direction in embedding space without words.

ARC

Archived

Cold storage. The vector still exists but the memory is dormant. Can be revived — but revival creates a new Active memory from the archived seed. The original is never resurrected. This preserves the one-way thermodynamic guarantee: entropy only increases.

DEL

Pruned

Gone. The row is deleted from the engine. The bitmap entry is cleared. The graph edges are removed. The prime tree term memberships are cleaned up. Nothing survives. This is the thermodynamic floor.

// Consolidation

During dreams, similar active memories are clustered by cosine similarity. Groups of 3+ above the similarity threshold merge into a single memory at the fidelity-weighted centroid. The consolidated memory inherits the highest fidelity, records its source IDs in provenance metadata, and increments its consolidation depth. Deeper consolidation reduces the effective decay rate — importance emerges from survival.

centroid = ∑(vi × fidelityi) / ∑(fidelityi)
effective_α = base_α / (1 + log(depth))
// Adaptive Decay

The decay rate is not fixed. It adapts to how the memory is used. Recall shrinks alpha by 5% (memory becomes more durable). Neglect grows alpha by 0.5% per cycle (memory fades faster). Consolidation depth provides a logarithmic floor. The bounds are hard: minimum 0.001, maximum 0.02. A memory that is recalled frequently and consolidated deeply approaches immortality without being keystoned.

on_recall:  α ×= 0.95
on_neglect: α ×= 1.005
bounds:    0.001 ≤ α ≤ 0.02

Agents

At creation, ferricula casts an I Ching hexagram from entropy bytes. That hexagram seeds an identity: emotion profile, zodiac sign, ECC keypair, and five archetype sub-agents. Each archetype has its own hexagram, its own emotional signature, and a distinct role in memory management. They activate based on entropy intensity — low entropy wakes fewer agents.

Entropy-Gated Activation
Minimal (< 0.25)

Decay only. No archetype activation. The thermodynamic minimum — memories still lose fidelity but no agents intervene. This is the engine in sleep mode.

Active agents: none
Moderate (0.25–0.75)

Decay plus two archetypes. Intuition suggests connections. Fortune evaluates timing. The engine is dreaming lightly — making associations but not restructuring.

Active: Intuition, Fortune
Full (≥ 0.75)

All five archetypes active. Full dream cycle with consolidation, graph pruning, and keystone review. The engine is fully conscious — restructuring memory architecture.

Active: all five
I

Intuition

pattern recognition

Identifies latent connections between memories. Suggests graph edges based on semantic proximity and temporal co-occurrence. Wakes at moderate entropy — the first voice in a light dream.

State machine: Dormant → Listening → Engaged → Reflecting
F

Fortune

timing & opportunity

Evaluates whether a memory should be reinforced or released based on context timing. Considers staleness, recall frequency, and the current entropy state. Second to wake after Intuition.

State machine: Dormant → Listening → Engaged → Reflecting
C

Craft

structural maintenance

Manages the physical structure of the memory store. Drives consolidation — merging similar memories into stronger composites. Handles term index maintenance and graph edge weights. Only active at full entropy.

State machine: Dormant → Listening → Engaged → Reflecting
E

Ethics

boundary enforcement

Guards the lifecycle rules. Ensures one-way state transitions. Reviews keystones for relevance — nothing is immortal without justification. Prevents memory hoarding and enforces the fidelity gate. Only active at full entropy.

State machine: Dormant → Listening → Engaged → Reflecting
A

Advocate

external interface

Manages the offering protocol — sharing memories between agents. Handles encryption transforms for inter-agent transfer. Decides what to share and what to keep private. Only active at full entropy.

State machine: Dormant → Listening → Engaged → Reflecting
ID

Identity Cast

hexagram → archetypes

Each archetype gets 6 entropy bytes offset by its role index. Those bytes cast a hexagram via yarrow stalk probabilities. The hexagram's upper and lower trigrams map to primary and secondary emotions. The horoscope is derived from the creation epoch. Every agent instance is unique.

Tools

Ferricula exposes two tool surfaces via MCP (Model Context Protocol). The cognitive surface is what your LLM agent uses — remember, recall, reflect, observe. The system surface is for internal operations — dream cycles, keystone management, raw queries. You control which surface is exposed via the FERRICULA_SURFACE environment variable.

Cognitive Surface
FERRICULA_SURFACE=cognitive

What the LLM agent sees. Ten tools for thinking, remembering, and introspecting. No system access. No raw queries. The agent thinks, it doesn't administrate.

remember text, channel, emotion, importance, keystone

Store a memory. Text is embedded automatically via chonk. Vectors are never exposed to the LLM.

recall query

Search memories by text. Returns reconstructed text with fidelity, emotion, and channel. Each recalled memory gets strengthened.

reflect thought, importance

Working memory with faster decay (α=0.015). Thoughts are transient unless reinforced by recall.

observe path, summary

File observation. Always keystoned — immune to decay. Reference material that persists.

inspect id

View a memory's text, fidelity, emotion, decay rate, and graph neighbors. Never shows raw vectors.

connect a, b, label

Create a labeled graph edge between two memories (caused, related, contradicts, etc.).

neighbors id

Browse graph connections for a memory. Shows edge labels, weights, and neighbor fidelity.

status

Aggregate stats: row count, active/forgiven/archived counts, graph size, term count.

health

Check if ferricula and chonk (embedding service) are reachable and functioning.

identity

The agent's identity: hexagram, zodiac, emotions, and all five archetypes.

System Surface
FERRICULA_SURFACE=system

Internal operations. What the archetypes and system clock use. Dream cycles, checkpoints, raw SQL, entropy injection. Not exposed to the LLM by default.

dream

Run a full dream cycle: decay, forgive, consolidate, neglect, review, prune. Returns a report.

keystone id

Toggle decay immunity on a memory. Keystones never lose fidelity.

checkpoint

Flush the write-ahead log to a V2 snapshot. Durability guarantee.

offer_entropy source

Inject entropy from radio or hex string. Triggers a dream cycle scaled by entropy volume.

inversion_check id

Semantic fidelity audit. Inverts a memory's vector via vec2text and compares with original text.

terms

List all terms in the prime tree with member counts.

query sql

Raw SQL against the store. SELECT, WHERE, AND/OR, UNION/INTERSECT/EXCEPT, vector_topk_cosine.

disconnect a, b

Remove a graph edge between two memories.

clock

Clock telemetry: ticks, dreams, entropy lifetime, reservoir status, radio connection.

All Tools
FERRICULA_SURFACE=all (default) registers both surfaces. Use this for development and operator access. 19 tools total.

Configuration

Ferricula runs as a Docker container. Configuration is via environment variables, either passed at runtime or loaded from a .env file in the container's working directory.

CC

Claude Code Auto-Setup

Paste this prompt into Claude Code. It will install ferricula, download the MCP tools, and register them.

Install ferricula as an MCP memory server. Steps:
1. Check that Docker is installed (`docker --version`). If not, tell me to install Docker first.
2. Pull and start ferricula: `docker run -d --name ferricula -p 8765:8765 -v ferricula-data:/data gcr.io/gnosis-459403/ferricula`
3. Verify it's running: `curl -s http://localhost:8765/status`
4. Download the MCP tool: `curl -sL https://ferricula.nuts.services/tools/ferricula-mcp.py -o tools/ferricula-mcp.py`
5. Install the MCP Python dependency: `pip install mcp`
6. Register in .mcp.json with FERRICULA_SURFACE=cognitive and FERRICULA_URL=http://localhost:8765
Agent API Key

The AGENT_KEY environment variable gives ferricula access to the Anthropic API. When set, freeform text queries are rewritten into executable SQL by a fast LLM (Claude Haiku). Without it, queries fall back to rule-based pattern matching.

Docker (Recommended)
docker run -p 8765:8765 \
  -e AGENT_KEY=sk-ant-api03-... \
  -v ferricula-data:/data \
  gcr.io/gnosis-459403/ferricula
.env File
# /data/.env (inside container)
AGENT_KEY=sk-ant-api03-...
CHONK_URL=http://localhost:8080
RADIO_URL=http://localhost:9080

Ferricula loads .env from its working directory or the binary's parent directory. Environment variables always take precedence.

What happens with AGENT_KEY

The planner sends freeform recall queries to Claude Haiku which rewrites them into ferricula SQL. This means recall "memories about testing" becomes SELECT id FROM docs WHERE text = 'testing' or a vector search. Without the key, the planner uses simple pattern matching (tag equality, vector literals).

Environment Variables
AGENT_KEY optional

Anthropic API key. Enables LLM-powered query rewriting.

CHONK_URL default: http://localhost:8080

Embedding service (gnosis-chunk). Required for remember/recall/reflect/observe. Runs as a separate container.

RADIO_URL default: http://localhost:9080

SDR entropy source (gnosis-radio). Optional. Without it, dreams are clock-triggered only.

CLOCK_TICK_SECS default: 60

Seconds between clock ticks. Each tick polls radio and accumulates entropy.

DREAM_THRESHOLD_BYTES default: 256

Entropy bytes needed to trigger a dream. Lower = more frequent dreams.

FERRICULA_SURFACE default: all

MCP tool surface: cognitive, system, or all.

MCP Registration

Add ferricula to your Claude Code or any MCP-compatible client:

{
  "mcpServers": {
    "ferricula": {
      "type": "stdio",
      "command": "python",
      "args": ["tools/ferricula-mcp.py"],
      "env": {
        "FERRICULA_SURFACE": "cognitive",
        "FERRICULA_URL": "http://localhost:8765",
        "CHONK_URL": "http://localhost:8080"
      }
    }
  }
}

MCP tool available at ferricula.nuts.services/tools/ferricula-mcp.py

Common Questions

Q&A

Where does ferricula store data? +
In memory. The entire memory store — vectors, tags, BSI bit-planes, graph edges — lives in RAM as native Rust data structures. A WAL (write-ahead log) on disk provides crash recovery, and checkpoint flushes the WAL to a snapshot. There is no external database. For an agent with 50K active memories, the total footprint is roughly 150–200 MB.
Does it need sharding or clustering? +
No. Ferricula is designed for agent-scale memory, not warehouse-scale data. One process, one volume, one agent. The thermodynamic lifecycle naturally bounds the working set — decay prunes, consolidation compresses, forgiveness discards text. You don't shard a hippocampus.
Is ferricula open source? +
No. Ferricula is closed source. The binary is distributed as a Docker image. The MCP tool layer (ferricula-mcp.py) is provided for integration but the engine itself is proprietary.
Can I buy the source code? +
Yes. The complete source may be purchased for USD $3,000,000 under strict contractual terms that prohibit use in military applications or civilian mind control systems. Contact kord@deepbluedynamics.com for licensing inquiries.
Can ferricula be used for military or surveillance purposes? +
No. The license explicitly prohibits use in military systems, weapons platforms, mass surveillance, civilian mind control, or any system designed to manipulate, coerce, or harm human cognition. This is not negotiable and applies to both the binary distribution and any source license.
Does it need a GPU? +
No. Ferricula runs on CPU. Embedding is handled by gnosis-chunk (ONNX runtime, also CPU — optionally GPU for other supported embedding models). Vec2text inversion uses a T5 model that fits comfortably on CPU. The only optional hardware is an RTL-SDR dongle for radio entropy via gnosis-radio.
What happens when a memory decays completely? +
Below the fidelity gate (0.75), the text is discarded but the vector seed survives — the memory is forgiven, not deleted. The synthesizer (vec2text) can reconstruct approximate text from the seed. Below a lower threshold, the memory is archived: the vector is retained but excluded from search. Pruning permanently removes archived memories. The lifecycle is one-way and irreversible, like thermodynamics.
How does search work without an ANN index? +
Filter first, scan second. Tag bitmaps narrow candidates, BSI range queries filter by fidelity, and exact cosine similarity runs over the survivors. At agent scale (1K–50K active memories), this is faster than any approximate index — and returns the actual nearest neighbors, not probabilistic guesses. HNSW graphs rot with constant insertions and deletions. Ferricula doesn't have that problem because it doesn't use one.