v0.1.0 — open source · MIT license

Your AI finally
remembers you.

MemX is a local-first long-term memory system for AI assistants. All data lives in a single file on your machine. Zero cloud. Zero tracking. Built with Rust.

↓  Get started on GitHub
memx — zsh
$ memx add "I prefer 4-space indentation in Rust"
✓ Memory stored · id: a3f9c2 · importance: 0.72

$ memx search "what is my code style?"
✓ Hit@1 · score: 0.91 · retrieved in 412ms
  "I prefer 4-space indentation in Rust"

$ memx search "what is my pet's name?"
∅ No confident match found · vmax: 0.43 < τ 0.50 · won't hallucinate

# Your entire memory is one file. Copy it anywhere.
$ cp ~/.memx/memory.db /new-machine/

Built for people who
care about privacy.

No subscription. No sync server. No account. Just a file on your disk.

◈

Single-file storage

Everything lives in one libSQL file. Backup by copying. Migrate by pasting. No config, no daemon, no database server.

⊘

Honest when it doesn't know

Low-confidence queries return empty results instead of hallucinated answers. The rejection gate suppresses spurious recall at τ = 0.50.

⊕

Hybrid retrieval

Vector search + keyword search, fused via Reciprocal Rank Fusion. Gets the best of both semantic understanding and exact matching.

◎

Smart re-ranking

Four factors: semantic similarity, recency (half-life decay), retrieval frequency, and explicit importance. Memories stay relevant over time.

◻

Explainable

Every result is traceable. Retrieval stats are written back to the database so you can inspect exactly why a memory was returned.

⟳

Any embedding model

Works with any OpenAI-compatible API — Ollama, LM Studio, or hosted providers. Swap models without changing your data.

Numbers that
hold up.

Evaluated on two Chinese-language benchmark suites, 43 queries total, using real embeddings.

91%
Hit@1
default scenario · 1,014 records
100%
Hit@1
high-confusion scenario
0.94
MRR
mean reciprocal rank
<3ms
Keyword search
per query, all scenarios

Five stages.
One answer.

A deterministic pipeline with no magic — every step is inspectable.

01

Embed

Query is sent to your local embedding model to produce a dense vector.

02

Dual Recall

Vector search (cosine) and keyword search run in parallel against the memory store.

03

RRF Fusion

Reciprocal Rank Fusion merges both candidate lists into a single ranked set.

04

Re-rank

Four-factor scoring: semantic · recency · frequency · importance, then z-score normalized.

05

Reject Gate

If both signals are weak, return ∅. Never return a bad answer.

Your memory.
Your machine.

Open source.

View on GitHub →