Works with Claude Code, Cursor, Codex & any MCP agent

Your agents' memory never leaves the box.

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 | bash
No account. No keys. Spins up a local SQLite file and an MCP server.
Works withClaude Code·Cursor·Codex·Claude Desktop·Cline·Windsurf·any MCP client·local models (Ollama / LM Studio)
Live · in-browser · 0 network calls

Work with an AI that never forgets.

Here'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.

Measured on LongMemEval-S

99.4% of the time, it remembers every time.

Real numbers, reproducible. See the full benchmarks for methodology and ablations.

99.4%
Session recall@10
100%
Session recall@50
~10ms
Hybrid recall (p50)
$0
Cost per recall · 0 API calls
Two layers, local

Short-term and long-term memory that never fades.

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.

Right now

The live conversation

The running transcript: messages, tool calls, intermediate facts. The agent's short-term attention, not its long-term record — nothing leaks into permanent state.

  • Lives in RAM for the session
  • Zero round-trips to read
  • Cleared on exit
The store · on-disk, durable

One SQLite file

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.

  • FTS5 + SimHash + optional on-device embeddings
  • valid_from / valid_to history — never destructive
  • Queryable with sqlite3 at 3am

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.

From conversation to memory

Six steps, zero network calls

Every step runs on-device. Drop a packet sniffer on the box and you'll watch nothing leave.

01 / Capture

Capture

The MCP server tails the live session and pulls candidate facts out of the working buffer — no copy-paste, no manual save() calls.

02 / Distill & store

Distill & store

Each fact is distilled from raw turn into a durable record and written to the local SQLite store in a single write.

03 / Index across facets

Index across facets

On write, the record is fingerprinted for SimHash, tokenized into FTS5, scored for salience and time, and optionally embedded on-device — all local.

04 / Contradiction check

Contradiction check

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.

05 / Recall

Recall

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.

06 / Inject

Inject

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.

Why local-first

Locamem vs. cloud agent memory

Same product shape. Opposite trust model. Pick local-first when proving zero egress matters more than letting someone else run the database.

 Locamem · local-firstCloud agent memory
Where your data livesOne 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 latencySingle-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-gappedWorks 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 recallEvery 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 & BAANo 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-inOpen 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 sourceMIT-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.
MCP-native

Works with your agents

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
stdio · local process

Spawned as a child

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.

streamable-HTTP · shared

One server, many clients

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.

Local-first, your way

Three ways to deploy. Cloud is never one of the defaults.

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.

Self-host · default

One line, one file

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.

Air-gapped · strict

Network physically cut

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.

Self-hosted sync · opt-in

Your hardware only

Replicate the store across your own machines, point-to-point, no third-party processor in the path. Off by default.

Built for the box that can't leak

Where a hard data boundary is the requirement

Three places where "prove the data never left" is not a nice-to-have.

Questions

What teams ask before they install

Is the data really never sent anywhere?
Yes, and you can prove it. Recall is a local SQLite query; optional embeddings run on-device. Run it air-gapped or drop a packet sniffer on the box — nothing leaves. The demo on this page runs the real ranker client-side with zero network calls.
What exactly is stored, and where?
The entire memory is a single SQLite file (default ~/.locamem). Back it up by copying it, move it by moving it, inspect it with any sqlite3 client. No service to babysit, no row in a vendor’s account.
How does recall stay this fast without a cloud?
Retrieval is SimHash (LSH) for content similarity plus FTS5 full-text, with optional on-device embeddings — a local index lookup, not a network round trip. No cold start, no region latency, no rate limit.
What does the per-facet score breakdown mean?
Every result returns the score split across facets — content similarity, keyword, salience, temporal — so you see exactly why a memory ranked where it did. Auditable, not a black-box number.
What happens when a new fact contradicts an old one?
Nothing is deleted. The old record is closed with a valid_to timestamp and the new one opens with valid_from, leaving a full temporal audit trail of what changed and when.
How do my agents connect to it?
Locamem ships an MCP server over stdio and streamable-HTTP. Point any MCP client — Claude Code, Claude Desktop, Codex, Cursor — at it and the agent captures and recalls automatically. No SDK, no glue code.
Is there a per-recall cost?
No. Recall is a local query against your file, so it’s $0 per call regardless of volume. No metering, no usage tier.
Is it actually open source?
Yes — MIT licensed, end to end. Read the ranker, fork it, run it. The repo is on GitHub at TeamWilcoe/locamem.
Can I run it fully air-gapped?
Yes. Disable the optional embedding-model download and opt-in sync and it runs with the network physically cut — same ranker, same recall. Built for SCIFs, regulated VPCs, and offline laptops.
Can I sync across machines?
Optionally, on your own hardware. Self-hosted sync is opt-in and off by default; it replicates your store point-to-point with no third-party processor in the path. Cloud is never one of the defaults.