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/YOUR_USERNAME/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.0.tar.gz (12.6 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.0-py3-none-any.whl (68.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onemem-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 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.0.tar.gz
Algorithm Hash digest
SHA256 47afbf95ee6a84873325b60eb176140cc45e12dd088f13bb6ff0052ad4dc7dbc
MD5 001c142380366ff0e79bc05cdc910994
BLAKE2b-256 d9f4a3a00730f577640b7eee0500e1e2377de359d4fdd1c3f1d3035043bdb87a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: onemem-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4dd8d2316a34e2417e3737465fefe24f69de7c4319f19cefa17b9aa5801acd6
MD5 add87a99cae6d1e88c300740c9ea8174
BLAKE2b-256 f02addfd271984defa4c652fc639d194f49267babf17023edb9b8fa3720bf575

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

0.1.1

2 files

This release

0.1.0 This release

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