Skip to main content

SOTA-level agent memory at zero infrastructure cost.

Project description

Neuromem

One SQLite file. Zero cloud. Ten minutes to set up.

PyPI Python License Base Score Pro Score

🏆 91.5% on LoCoMo · 📦 One SQLite File · ☁️ Zero Cloud · 💰 Zero Infrastructure Cost

Benchmark · Highlights · Base vs Pro · Install · Claude · API


🔬 Benchmark

Tested on LoCoMo, the standard benchmark for conversational memory. 1,540 questions across 10 conversations. All 8 systems share the same answer model, judge, scoring, top-k, and byte-identical answer prompt — only retrieval differs.

LoCoMo 8-System Comparison

Neuromem achieves state-of-the-art accuracy for fully-local memory systems at zero ongoing infrastructure cost. Base runs entirely offline with no API keys. Pro adds one small LLM call per query for HyDE query expansion.

Accuracy vs Infrastructure Cost

All scores use the same evaluation pipeline: GPT-4.1-mini answer generation, GPT-4o-mini judge (3x majority vote), temperature=0. Zero errors across 12,320 total answers. Full methodology, per-question results, cost analysis, and reproduction scripts in benchmarks/.


⚡ Research Highlights

  • 30+ percentage points more accurate than Mem0 on LoCoMo (91.5% vs 61.4%)
  • 2x more cost-efficient per correct answer than Mem0
  • Runs offline on any device with Python 3.10+ and 512MB RAM
  • One SQLite file, zero API keys. The entire 6-layer system runs offline.
  • Within 3.0pp of EverMemOS, the only higher-scoring system — and EverMemOS requires cloud retrieval.

Category Breakdown

Neuromem Pro nearly matches EverMemOS across all 4 question categories. Mem0 collapses on multi-hop reasoning (37.7% vs 90.7%).


🏗️ Base vs Pro

Same features, same 6-layer pipeline. Pro upgrades the embedding model and the cross-encoder reranker for higher retrieval accuracy.

Base Pro
LoCoMo 88.2% 91.5%
Runs on Any machine (CPU only) 4GB+ RAM (CPU or GPU)
First install ~30MB ~1.5GB one-time download
Speed Ultra-fast Fast

Base works everywhere. Pro remembers better.


🚀 Quickstart

Base

pip install neuromem-core

Pro

pip install neuromem-core[gpu]

Usage

from neuromem import Memory

m = Memory()
m.add("Prefers dark mode and TypeScript", user_id="alex")
m.add("Allergic to peanuts", user_id="alex")

results = m.search("What are Alex's preferences?", user_id="alex")
print(results[0]["content"])
# → "Prefers dark mode and TypeScript"

The database is created automatically at ~/.neuromem/memories.db.


🤖 Claude Integration

Claude forgets you between sessions. Neuromem fixes that.

1. Install with MCP support

Base:

pip install neuromem-core[mcp]

Pro:

pip install neuromem-core[gpu,mcp]

2. Add to your Claude config

Claude Code: add to ~/.claude.json under "mcpServers":

{
  "mcpServers": {
    "neuromem": {
      "command": "python",
      "args": ["-m", "neuromem.mcp_server"],
      "env": {}
    }
  }
}

Claude Desktop: add to claude_desktop_config.json (Settings > Developer > Edit Config), same format.

If you installed in a virtualenv, use the full path to that Python (e.g. "/path/to/venv/bin/python") instead of "python".

Neuromem starts in Base mode by default. On your first session, Claude will ask if you'd like to upgrade to Pro. You can switch at any time. Your existing memories are automatically re-embedded.

3. Make it automatic

Copy CLAUDE.md.example to your project root or home directory as CLAUDE.md. This tells Claude to automatically store your preferences and recall them without being asked.

cp CLAUDE.md.example ~/CLAUDE.md

4. Test it

Start a new Claude session:

  • Say "I always prefer dark mode". Claude stores it automatically.
  • Open another session and ask "What are my preferences?". It remembers.

📖 API

Method What it does
m.add(content, user_id=None) Store a memory
m.search(query, user_id=None, limit=10) Search memories
m.search_deep(query, user_id=None, limit=10) Agentic multi-round search (higher latency + LLM cost; best for ambiguous queries)
m.get(memory_id) Get one memory
m.get_all(user_id=None, limit=100) List all memories
m.update(memory_id, content) Update a memory
m.delete(memory_id) Delete a memory
m.delete_all(user_id=None) Delete all

📊 Full Benchmark Details

Every benchmark script is self-contained and runs on Modal.


📝 Citation

@software{neuromem2026,
  title = {Neuromem: State-of-the-Art Local-First Agent Memory},
  author = {@Building\_Josh},
  organization = {Sauron},
  year = {2026},
  url = {https://github.com/buildingjoshbetter/neuromem},
  version = {0.2.0}
}

⚖️ License

Licensed under Apache 2.0. Free for personal and commercial use.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuromem_core-0.2.0.tar.gz (8.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuromem_core-0.2.0-py3-none-any.whl (158.0 kB view details)

Uploaded Python 3

File details

Details for the file neuromem_core-0.2.0.tar.gz.

File metadata

  • Download URL: neuromem_core-0.2.0.tar.gz
  • Upload date:
  • Size: 8.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for neuromem_core-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7e9b65639c346a30b0dd1701a242f80f508b1df6990b2bffc8270d8de0a44d8c
MD5 6dbe7a84301eb54162d1291ffb9b3805
BLAKE2b-256 2a6169c8b5feb3b68e9a0094089b407e409e5b24b93858acdcc92a82b92f86bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuromem_core-0.2.0.tar.gz:

Publisher: publish.yml on buildingjoshbetter/neuromem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file neuromem_core-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: neuromem_core-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 158.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for neuromem_core-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1246a881e30795d29ca63b9d2cd1d4d1c8da75b838c98911af91ca34ec6197e2
MD5 936a5976cdf4382d4b03e579325f6338
BLAKE2b-256 00a600114b7c6198ce50078cdfa22f6324024aa290109bdc288f5067dc99c58c

See more details on using hashes here.

Provenance

The following attestation bundles were made for neuromem_core-0.2.0-py3-none-any.whl:

Publisher: publish.yml on buildingjoshbetter/neuromem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page