Your AI assistant forgets everything when a chat ends — so you keep re-explaining your project, your decisions, and how you like things done. Locamem gives it a memory that sticks, kept in one file on your own computer. Nothing is ever sent to the cloud.
$ curl -fsSL https://locamem.com/install | bashHere's a law firm's memory of one client's case — a slip-and-fall claim. Ask it anything, the way you'd ask a colleague, and the real Locamem ranker answers client-side with a per-facet score breakdown (content, keyword, salience, temporal). Even the privileged notes stay put: open your network tab and nothing leaves this page.
Real numbers, reproducible. See the full benchmarks for methodology and ablations.
Like the big cloud tools, Locamem keeps a quick "right now" memory and a lasting "remembers forever" memory. The difference: both live on your machine — never in someone else's database.
The running transcript: messages, tool calls, intermediate facts. The agent's short-term attention, not its long-term record — nothing leaks into permanent state.
Worth-keeping facts are distilled out of the buffer into one SQLite file you can copy, diff, back up, or rm. Survives restarts, machines, and you.
Cloud products split short-term and long-term across a network boundary. Here the boundary is a function call, and both halves stay on the box you can audit.
Every step runs on-device. Drop a packet sniffer on the box and you'll watch nothing leave.
The MCP server tails the live session and pulls candidate facts out of the working buffer — no copy-paste, no manual save() calls.
Each fact is distilled from raw turn into a durable record and written to the local SQLite store in a single write.
On write, the record is fingerprinted for SimHash, tokenized into FTS5, scored for salience and time, and optionally embedded on-device — all local.
If a new fact conflicts with an old one, the old record is closed with a valid_to timestamp instead of deleted — you keep the full trail.
A query runs the ranker against the store and returns hits with a per-facet score breakdown — single-digit-millisecond, no API round-trip, no per-call cost.
The ranked facts are handed straight back to the agent’s context for the next turn — so it stops re-asking what it already knows.
Same product shape. Opposite trust model. Pick local-first when proving zero egress matters more than letting someone else run the database.
| Locamem · local-first | Cloud agent memory | |
|---|---|---|
| Where your data lives | One SQLite file on disk you own. Back it up, diff it, delete it, commit it. Nothing replicated to a third party. | A managed datastore in the vendor’s account. You hold an API key; the rows live on their infrastructure. |
| Per-recall cost | $0. Recall is a local query; embeddings, if enabled, run on-device. No metering, no usage tier. | Per-call API pricing plus embedding/model costs. Cost scales with recall volume. |
| Recall latency | Single-digit-millisecond local lookup (SimHash LSH + FTS5). No round trip, no cold start, no rate limit. | A network round trip per recall: tens to hundreds of ms, plus tail latency and provider rate limits. |
| Offline / air-gapped | Works with no network at all — a laptop on a plane, a SCIF, or a VPC with egress blocked. | Requires outbound connectivity to the vendor API. No internet, no memory. |
| Auditable recall | Every result returns a per-facet score breakdown (content / keyword / salience / temporal). You see why it ranked. | Typically one opaque relevance score from a hosted pipeline, computed server-side. |
| Compliance & BAA | No third-party processor in the path: for PHI/PII there’s no vendor BAA to negotiate, no egress to attest to. | A subprocessor handling your data. Regulated use needs a BAA/DPA, due diligence, and an egress story. |
| Vendor lock-in | Open SQLite schema, queryable with any client. Migrating off means keeping a file you already have. | Memory behind a proprietary API and account. Leaving means export, re-embed, and re-ingest elsewhere. |
| Open source | MIT-licensed end to end. Read the ranker, fork it, run it. Ships an MCP server (stdio + HTTP). | Often an open SDK but a hosted, closed storage/embedding backend. The core stays cloud-side. |
Locamem plugs into the tools you already use. The one-line install detects your app and sets it up for you — or wire it in by hand. Either way your agent starts remembering automatically: no SDK, no glue code.
# one line — auto-detects Claude Code, Cursor, Codex, Claude Desktop & more: curl -fsSL https://locamem.com/install | bash # Claude Code (by hand): claude mcp add locamem -- python -m locamem.mcp.server # Cursor (~/.cursor/mcp.json) · Claude Desktop · Cline · Windsurf — add this block: { "mcpServers": { "locamem": { "command": "python", "args": ["-m", "locamem.mcp.server"] } } } # any MCP client over HTTP — then point it at http://127.0.0.1:3100/mcp: python -m locamem.mcp.server --transport http --port 3100
The agent spawns Locamem as a child process and reads/writes one SQLite file. Nothing binds a port, nothing leaves the box. Works in Claude Code, Claude Desktop, Codex, Cursor, or any MCP client.
Run one server, attach many clients. Bind to 127.0.0.1 so it never accepts a non-local connection.
Running a fully local stack? Locamem pairs with local-model setups like Ollama and LM Studio — your model and your memory both stay on your machine, with no cloud anywhere in the loop.
The memory is a single SQLite file you own. Pick how strictly you want to lock it down. Sync is opt-in, off until you turn it on, and it runs on your hardware.
One file under your home directory. Back it up by copying it, move it by moving it, inspect it with any sqlite3 client. No accounts, no keys, no per-recall billing.
Disable the optional embedding-model download and sync; runs with the network cut. Same SimHash + FTS5 ranker, same recall. Built for SCIFs, regulated VPCs, and laptops on planes.
Replicate the store across your own machines, point-to-point, no third-party processor in the path. Off by default.
Three places where "prove the data never left" is not a nice-to-have.
Context that can never touch a third-party processor. Read the trail, diff the file, attest to zero egress.
No vendor BAA to negotiate, no egress story to defend. The data boundary is your own machine.
A per-facet score breakdown and a temporal trail that never deletes. Built for reviewers, not black boxes.