Other memory layers hand your agent a haystack.
localmem hands it the needle.
Most "memory" just feeds your history back into the prompt and makes the model re-derive what it already worked out, on every call. Slow, expensive, and it buries the one fact that matters. localmem does the reasoning when you write, so every read is a precise slice.
Re-feed the whole history
~128K tokens of transcript per question on LongMemEval. The model re-reads everything and reasons from scratch every time: costly, and easy to miss the needle.
Hand over the exact slice
1,882 tokens of the right context: 98% fewer, and 75% answered correctly on the same benchmark. The understanding already happened at write-time, so reads stay cheap.
Your memory can't rot, and can't lock you in.
The event log is the only source of truth. Every other store is a cache you can delete and rebuild.
# Write a memory $ localmem write --kind preference --content "I prefer Rust for systems work" # Search for it $ localmem search "what language do I prefer" [1] I prefer Rust for systems work score=0.412 id=01K... # Now blow away every derived store $ rm -rf ~/.localmem/derived # Rebuild everything from the event log alone $ localmem replay # Search again, same result, fully recomputed from events.jsonl $ localmem search "what language do I prefer"
~/.localmem/events.jsonl is the single source of truth. DuckDB, LanceDB, Tantivy. All recomputable caches.
A viewer for everything localmem holds.
Coverage, your profile, project-scoped search, and a typed knowledge graph of every entity it has understood. Served by the core itself, offline.
Capture. Understand. Recall.
The reasoning happens when you write, so every read is a precise slice, not a re-derivation.
One append-only log
Every prompt, decision, and tool-use is appended to ~/.localmem/events.jsonl, never mutated. Ephemeral tool-traces auto-expire, so signal never drowns in noise.
Decomposed at write-time
An async worker turns each capture into a summary, typed facts, and entities, and weaves them into a knowledge graph you can explore. Off the hot path, so it never blocks a write.
The precise slice
Hybrid retrieval (BM25 + vector + the fact graph), reranked by a local cross-encoder, hands back only what matters: 75% on LongMemEval in ~1,882 tokens per recall.
Built for trust, not lock-in.
What you still have when the cloud, the vendor, or the project goes away.
| Trait | localmem | Local-first peers | Cloud SaaS |
|---|---|---|---|
| Where your data lives | Your machine | Your machine | Their cloud |
| Plaintext leaving your machine | Never | Varies (some default-on telemetry) | Always |
forget is auditable | Event in the log | App-level delete | Trust the vendor |
| Recoverable from a plain-text file | Yes (localmem replay) | No | No |
| Runtime | Single static Rust binary | Node + framework deps | Cloud SaaS |
| MCP tool count | 6 (narrow + auditable) | 25–50+ (wide) | varies |
| License | Apache-2.0 (non-relicensable) | Mostly Apache-2.0 | Mixed |
| If the project dies | Your memory works | Your memory works | Your memory is gone |
One memory, every tool.
Write in one client, recall in the next. Five wired by one command; any other MCP client via one config block.
--client claude--client claude-code--client cursor--client cline--client windsurfgenericgenericgenericgenericgenericConcrete patterns that solve a real pain day one.
Not just "AI memory." Specific workflows.
"Stop re-explaining things to my agents"
Two or more AI agents that lose context between sessions. Install once, wire both via MCP, anything one learns is available to the other.
SHARED_MEMORY_FOR_AGENTS →Per-project memory, no cross-leak
Personal facts in ~/.localmem, per-repo facts in <project>/.localmem. Drop a .mcp.json in any repo and that project's agents see only that project's memory.
Audit what your agent knows
localmem profile <subject> synthesizes a markdown profile. localmem audit <fact_id> walks the event log to show every event that touched a fact. No black boxes.
Time-travel your memory
Bitemporal facts mean you can ask "what did I believe last Tuesday?" with --at-time RFC3339. Facts have valid_from, valid_to, retired_at.
Apache-2.0.
The Rust core, the MCP server, the event-log schema, and every importer are Apache-2.0. Your data sits in ~/.localmem/. Storing, searching, and recalling never make a network call.
No telemetry, no cloud sync, no account. Your memory is stored and searched entirely on your machine. The optional understanding step runs on a local model, or your own LLM key if you choose.