The bedrock primitive. One process. One consumer. Zero network. SQLite + WAL, FTS5 keyword recall, in-process HNSW vector index, no replication, no peers.
This is what runs on every developer's laptop, every Claude Code session, every solo agent that needs to remember things between turns. SQLite under the hood, WAL-mode for atomic writes, FTS5 for keyword recall, an in-process HNSW vector index for semantic recall. No replication, no peers, no governance to coordinate.
memory_storememory_store over MCP (or POST /api/v1/memory over HTTP, or ai-memory store ... from the CLI).src/validate.rs), then acquires the connection mutex.src/db.rs → governance::check()). For T1 with a single agent, the default policy returns Allow immediately. With a stricter policy, the write may be queued as a PendingAction (see Tier 2 for that flow).INSERTed (or UPDATEd on (title, namespace) collision). FTS5 is kept in sync via triggers. The scope_idx generated column gets recomputed automatically.semantic or above, the embedding is generated and added to the in-memory HNSW index.memory_recallmemory_recall with a context string.fts.rank + priority*0.5 + access_count*0.1 + confidence*2.0 + tier_bonus + recency_factor.semantic_weight * cosine + (1 - semantic_weight) * norm_fts.access_count incremented, TTL extended, and (for mid-tier memories) auto-promoted to long-tier on the 5th access. Priority bumps every 10 accesses.toon_compact (40-60% smaller than JSON), toon, or json.That's it. No network, no peers, no consensus.
# install
cargo install ai-memory --version 0.6.3
# run as MCP server (for Claude Code, etc.)
ai-memory --db ~/.claude/ai-memory.db mcp --tier semantic
# OR run as HTTP daemon
ai-memory --db ~/.claude/ai-memory.db serve --bind 127.0.0.1:9077 --tier semantic
# verify
ai-memory --db ~/.claude/ai-memory.db stats
A single config file at ~/.config/ai-memory/config.toml covers tier selection, embedding model, Ollama URL (for the smart/autonomous tiers), and DB path.
write: any, promote: any, delete: owner. Override per-namespace via memory_namespace_set_standard if you want pending-approval behavior for sensitive memories. The same governance machinery as T2+ is present; you just rarely use it with one agent.memory_auto_tag) and contradiction detection (memory_detect_contradiction) require the smart or autonomous feature tier (Ollama backend). Capabilities introspection v2 (v0.6.3) lets the agent ask the server which skills are available before invoking them.signature column on memory_links (added schema v15 / v0.6.3) is reserved for v0.7 attested identity.| Dimension | T1 ceiling | When it bites |
|---|---|---|
| Concurrent writers | 1 (mutex-serialized) | If a second writer joins, you've graduated to T2 |
| Total memories | ~10⁶ before HNSW RAM pinches (~1.5 GB at 384-dim) | Vector index lives in-process |
| FTS5 query latency | sub-millisecond at 10⁵ rows | Stays fast through 10⁶ |
| Crash recovery | WAL replay on next open | Atomic — never lose committed writes |
| Network exposure | none unless you bind HTTP to non-loopback | Default is 127.0.0.1 |
When you hit any of these, walk to Tier 2 (more agents on this same node) or Tier 3 (more nodes).
src/main.rs — daemon setup, command dispatch (26 CLI commands)src/mcp.rs — MCP tool handlers wired to the same DB layersrc/handlers.rs — HTTP route handlers (the Axum router in main.rs registers 48 /api/v1/* routes)src/db.rs — schema, recall scoring, GC, migrations (current schema v15 per v0.6.3 release notes)src/reranker.rs — adaptive blend semantic + keywordsrc/hnsw.rs — in-memory ANNdocs/ARCHITECTURE.md — full module map