Skip to main content

oneMEM

One memory. Every AI. You own it.

Local, structured memory for AI agents—in one SQLite file on your machine.

PyPI License: MIT

oneMEM gives AI tools a shared local memory. It turns useful context into compact facts and surfaces the minimum amount of memory sufficient for a query. Every connected agent reads and writes the same SQLite file.

AI agents ───┐
Code editors ┼── MCP ── oneMEM ── ~/.onemem/onemem.db
Local tools ─┘

Install

oneMEM requires Python 3.11 or newer and an API key for any supported language-model provider. Embeddings run locally; there is no embedding service or API key to configure.

uv tool install "onemem[all]"
onemem init

onemem init does the rest:

  1. asks which model provider you want to use;
  2. recommends a model or lets you enter another model ID;
  3. verifies the key and model before saving them;
  4. initializes the local database and embedding model;
  5. offers background capture; and
  6. connects detected AI tools over MCP.

Nothing is uploaded to a oneMEM server. Configuration and credentials stay under ~/.onemem/; the API key is sent only to the provider you select.

Try it

Add something directly:

onemem add "Chose SQLite because it needs zero operations and one-file backups."

Ask for it later:

onemem ask "What storage did I choose, and why?"

Or ask from a connected agent. It receives two MCP tools:

  • onemem_recall retrieves relevant memory.
  • onemem_log stores something worth remembering.

MCP setup

oneMEM works with any client that can run a local stdio MCP server, including Claude Code, Codex, Cursor, and Windsurf. onemem init automatically configures clients whose command-line tools it detects; other clients only need the onemem-mcp executable path.

claude mcp add --scope user onemem -- "$(command -v onemem-mcp)"
codex mcp add onemem -- "$(command -v onemem-mcp)"

Commands

Command Purpose
onemem init Complete interactive setup
onemem add "memory" Store one note or observation
onemem ask "question" Retrieve relevant facts and answer a question
onemem watch --start Start capturing in the background
onemem doctor Check the environment
onemem status Show event, fact, entity counts

Where data lives

Path Contents
~/.onemem/onemem.db Events, facts, entities, embeddings
~/.onemem/config.toml Active provider, model, and runtime settings
~/.onemem/.env Provider API keys

How retrieval works

session or imported text
        ↓
append-only raw event
        ↓
compact facts + local embeddings + entity anchors
        ↓
deterministic fusion of semantic, keyword, and entity retrieval
        ↓
minimum relevant memory returned to the agent

oneMEM uses an LLM only to interpret and compact language and, optionally, to synthesize the final answer. Storage, indexing, and retrieval are ordinary code.

Benchmarks

Measured on a 100-instance stratified sample of LongMemEval-S:

Metric Result
Retrieval recall 0.89
Context reduction 99.1%
End-to-end answer accuracy 72%

Development

git clone https://github.com/shashank-tomar0/onemem.git
cd onemem
uv sync --all-extras
uv run pytest -q

License

MIT — Based on Meniscus by magic_bubblez.

Download files

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

Source Distribution

onemem-0.1.1.tar.gz (12.4 MB view details)

Uploaded Source

Built Distribution

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

onemem-0.1.1-py3-none-any.whl (68.9 kB view details)

Uploaded Python 3

File details

Details for the file onemem-0.1.1.tar.gz.

File metadata

  • Download URL: onemem-0.1.1.tar.gz
  • Upload date:
  • Size: 12.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.7

File hashes

Hashes for onemem-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bbfb7ef9f38cdfba1f1443e4a34cfc44b71547a13f7ed20cf3439e077cc4facb
MD5 3a7cec85f559a75f2963a6ded4175eac
BLAKE2b-256 52e67ff03f7462169a0f70d25357882cd9d7c2f3f806b922298aa60e2da41494

See more details on using hashes here.

File details

Details for the file onemem-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: onemem-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 68.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.7

File hashes

Hashes for onemem-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6e5fbb9400d2531038dd4cbe6adc21600800692e69b1f3cf7288790e17f004e
MD5 d597d49fe9535109f063c13e546fd083
BLAKE2b-256 736903b79b162e1a9578c2c7bc79a6ba221de0c72badf6c89e168a46d78ac139

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

1 file

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

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