memory-v2
Memory v2.1
Local-first long-term memory for AI agents and long-running projects.
Memory v2.1 stores projects, conversation branches, messages and durable facts in a single SQLite database. It is built for people who want their agent memory to stay on their own machine: no cloud account, no vendor lock-in, no telemetry.
Status:
2.1.0-alpha.2. The core API, MCP server, web UI and offline installers are working and tested. Expect rough edges; back up your database.
Why
Long agent sessions get lost when a workspace is recreated, a model is switched, or a chat is closed. Memory v2.1 keeps the whole branch, not just a summary:
one project can contain dozens of branches;
a branch can be restored with one request;
durable facts survive across sessions;
full-text search covers both facts and messages;
the database is a plain SQLite file you can copy and inspect.
Related MCP server: light-agent-memory-mcp-server
Features
Projects → branches → messages. One project, many conversations, shared logic and search.
Durable memories. Facts, decisions, constraints and preferences with importance, confidence, status and supersede links.
Message provenance. Every message keeps its original source fingerprint; edits create revisions instead of silently changing the archive. Soft-deleted messages stay recoverable and are excluded from search.
Large branches. Paginated message loading, load-earlier, in-branch search and jump-to-message; role editing and edit history are built in.
Full-text search. SQLite FTS5 plus Russian morphology (
pymorphy3); search memories and messages, optionally inside one project.Idempotent archive. Re-sending the same branch appends only new messages; duplicates are skipped.
Web UI. Projects, branches, messages, memory cards, search, triggers, settings and first-run onboarding. No Node.js build step.
MCP server. Seven tools for Claude Desktop, Claude Code, Cursor, Cline, Continue, Windsurf, Zed and other MCP clients.
Browser extension. Save selected text or the current page from Chrome/Edge/Chromium and Firefox (experimental): context menu,
mem+ Tab, or the toolbar popup.Offline installers. Windows and Linux packages with Python 3.12 and all wheels included. A visible status window/stage progress shows what is happening; no internet is needed during installation.
Local-first. SQLite file, loopback-only by default, no cloud services.
Backups and diagnostics. One-click SQLite backup API, JSON project export, log rotation and
/diagnostics.
How it compares
Memory v2 is not a vector store and not an agent framework. It is a small, inspectable archive that an agent can query over MCP.
Memory v2 | Hosted memory services (mem0, Zep Cloud) | Agent frameworks (Letta) | Markdown notes (basic-memory) | Plain files | |
Data location | one SQLite file on your disk | vendor cloud | your server | Markdown files | anywhere |
Account required | no | yes | no | no | no |
MCP server | built in (7 tools) | usually separate | yes | yes | no |
Editable history | revisions + soft delete | limited | limited | git | manual |
Search | FTS5 + morphology | embeddings | embeddings | Markdown/grep | none |
Works offline | yes, installers included | no | partial | no | yes |
License | MIT | mixed | Apache-2.0 | MIT | — |
Details for the other projects change quickly — check their docs. The point here is the trade-off: hosted services give you convenience and sync, Memory v2 gives you a file you own, no account, and no network dependency.
Install
Windows (recommended: offline installer)
Download
MemoryV2-v2.1.0-alpha.2-Windows-x64.zipfrom Releases.Extract it to any folder.
Run
windows\install-memory.bat.The app installs per user to
%LOCALAPPDATA%\MemoryV2, starts at logon and openshttp://127.0.0.1:8002/ui/.
No administrator rights and no internet connection are required. Windows may
show a SmartScreen warning because the installer is not code-signed yet.
Details: docs/installers.md.
Linux (recommended: offline installer)
Download
MemoryV2-v2.1.0-alpha.2-Linux-x64.zipfrom Releases.Extract it.
Run:
bash linux/install.shThe installer puts the app in ~/.local/share/memoryv2, creates a user systemd
service (or a nohup fallback), and starts it on
http://127.0.0.1:8002/ui/.
Python 3.12 is required. The installer can install it via the system package
manager if it is missing; the Python packages themselves are bundled offline
(cp312, x86_64).
Docker (from source)
cp .env.example .env
mkdir -p data
docker compose up -d --buildOpen http://127.0.0.1:8002/ui/.
Manual native install (development)
python3.12 -m venv .venv
. .venv/bin/activate
pip install -r api/requirements.txt
pip install -r mcp/requirements.txt
cp .env.example .env
python api/init_db.py
python start_memory.pySee README-WINDOWS.md for the Windows native path.
First run
The API listens on
127.0.0.1:8002by default.If
MEMORY_API_TOKENis empty, only loopback clients are accepted.The onboarding wizard offers language (RU/EN), an optional AI agent, and browser-extension installation.
The demo seed is optional and fictional:
MEMORY_API=http://127.0.0.1:8002 python3 examples/seed_demo.pyBrowser extension
The extension is included in both offline installers and in the app's first-run wizard. Standalone packages are attached to each release:
MemoryV2-v2.1.0-alpha.2-browser-extension.zip # Chrome/Edge/Chromium
MemoryV2-v2.1.0-alpha.2-firefox-extension.zip # FirefoxChrome/Edge/Chromium:
Open
chrome://extensions(Edge:edge://extensions).Enable Developer mode.
Choose Load unpacked and select the
memory-v2-extensionfolder.Pin the icon and check the API URL in the extension settings.
Firefox (experimental):
Unpack the Firefox ZIP.
Open
about:debugging#/runtime/this-firefox.Choose Load Temporary Add-on and select
manifest.json.For a permanent install, submit the ZIP to
addons.mozilla.org(AMO); Firefox does not install unsigned XPI permanently.If Firefox asks for access to
127.0.0.1:8002, allow it.
Usage:
select text → right click → Memory v2.1 → project;
type
mem, press Tab, thenпроект Home: textorsave this page to project Home;click the toolbar icon for a popup with selection/page capture.
A search query typed into Google/Yandex goes to the search engine, not to Memory. Use the context menu,
mem+ Tab, or the popup instead. Firefox is experimental: use the separate Firefox ZIP; permanent install requires AMO signing.
See extension/README.md.
MCP
The MCP server lives in mcp/. It speaks stdio and uses the Memory HTTP API; it
never opens the SQLite file directly.
Published on PyPI as memory-v2-mcp:
uvx memory-v2-mcp # run without installing
pip install memory-v2-mcp # or install the console scriptFrom the source tree:
python3.12 -m venv .venv-mcp
. .venv-mcp/bin/activate
pip install -r mcp/requirements.txt
python mcp/server.pyTools:
Tool | Purpose |
| Check API availability |
| List projects |
| Restore a project and its branches |
| Search memories and messages |
| Archive a branch idempotently |
| Store a fact, decision, constraint or preference |
| Retire an old memory, optionally with a replacement |
Client configs (Claude Desktop, Claude Code, Cursor, Docker-only) are in
mcp/README.md and mcp/examples/.
API at a glance
GET /health
GET /projects
POST /projects
GET /projects/{id}/context
POST /conversations/archive
GET /memories/search?q=...&include_messages=true
POST /memories/upsert
POST /memories/{id}/deprecate
POST /capture
GET /settings
PUT /settings
POST /triggers/preview
POST /triggers/apply
GET /diagnosticsInteractive API reference: http://127.0.0.1:8002/docs.
Archive requests are idempotent; use a stable external_id:
{
"project_id": 1,
"title": "Demo / FastAPI async session debugging",
"source": "demo",
"external_id": "demo:fastapi:async-session:001",
"messages": [
{"role": "user", "content": "..."},
{"role": "assistant", "content": "..."}
]
}Data model
Table | Purpose |
| Shared project container |
| A dialog branch |
| User/assistant messages |
| Durable facts, decisions, constraints, preferences |
| Reserved for future timeline events |
| Language, AI agent, onboarding, triggers, extension status |
SQLite FTS5 indexes (memories_fts_norm, messages_fts) are kept in sync by
triggers. The schema is in migrations/schema.sql.
Configuration
Variable | Default | Meaning |
|
| SQLite database path |
|
| Schema for first init |
|
| Listen address |
|
| Listen port |
| empty | Bearer token; empty means loopback-only |
| empty | Set to |
|
| Initial UI language ( |
|
| Log directory |
If you expose the API to a LAN, set MEMORY_API_TOKEN and use a reverse proxy
with HTTPS. Never expose an unauthenticated instance to the internet.
Development
python3.12 -m venv .venv
. .venv/bin/activate
pip install -r api/requirements.txt
pip install -r mcp/requirements.txt
sh scripts/ci_integration.shThe integration script creates a clean database, starts the API on
127.0.0.1:8002, seeds the fictional demo project and runs the 13-check MCP
stdio test. The GitHub Actions workflow runs the same script on Python 3.12.
Repository layout:
api/ FastAPI application, auth, search, archive, capture, settings
mcp/ MCP stdio server, HTTP client, 13-check smoke test
web/ Static UI (HTML/CSS/JS, no build step)
extension/ Chrome/Edge MV3 extension
connectors/ OpenCode sync (Windows/Linux) and generic import
migrations/ SQLite schema and notes
install/ Docker/venv developer installers
scripts/ CI, backup, search and health helpers
docs/ Architecture, testing, integrations, installers
examples/ Fictional demo seedBackup
The database is the source of truth. Use the SQLite backup API while the API is running, or copy the file while it is stopped.
python3 - <<'PY'
import sqlite3
src = sqlite3.connect("data/memory_v2.db")
dst = sqlite3.connect("data/backup.db")
src.backup(dst)
dst.close()
src.close()
PYSecurity
Loopback-only by default; empty token means non-local clients get
401.Optional bearer token for LAN/reverse-proxy deployments.
Connectors redact common token patterns before archiving, but this is not a guarantee. Do not put secrets into prompts or conversation text.
Keep backups and restrict file permissions.
Roadmap
Projects, branches, messages, durable memories.
FTS5 + Russian morphology.
Idempotent archive.
Web UI with manual CRUD, triggers, settings and onboarding.
MCP server for agent integrations.
Chrome/Edge extension.
Offline Windows and Linux installers.
Firefox extension (experimental; temporary load or AMO signing).
Importers for ChatGPT/Claude/Markdown exports.
Alembic migrations and schema version history.
Code-signed native Windows
.exe(the current installer is unsigned).
License
MIT. See LICENSE. The license can be switched to Apache-2.0 before
a stable release.
Available Tools
7 toolsmemory_archive_conversationC
Archive a dialog branch. Idempotent: repeated calls append only new messages.
Inputs: title (required), messages (required), project_id (required), external_id.
memory_deprecateB
Retire an outdated memory and optionally link its replacement.
Inputs: memory_id (required), superseded_by.
memory_healthA
Check whether the Memory API is reachable and healthy.
Inputs: no named parameters.
memory_list_projectsB
List all projects with ids and descriptions.
Inputs: no named parameters.
memory_project_contextC
Restore a project: metadata, memories, events and conversation branches.
Inputs: project_id (required).
memory_searchC
Full-text search across durable memories and conversation messages.
Inputs: query (required), limit, status, project_id, +1 more.
memory_upsertC
Store a durable fact, decision, constraint or preference.
Inputs: content (required), project_id (required), memory_type (required), confidence, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct target: health check, project listing, project context restoration, search, conversation archiving, memory upsert, and deprecation. Although project_context and search both retrieve information, their boundaries are clear because one restores a full project snapshot and the other performs targeted full-text lookup.
All tools share the memory_ prefix, and most use predictable verb-based names such as memory_search, memory_upsert, and memory_deprecate. Minor deviations are memory_health and memory_project_context, which are noun phrases rather than verb_noun forms, but the set remains readable and consistent overall.
Seven tools is well-scoped for a memory management server, with each tool covering a distinct operational need. There is no obvious filler or redundant surface area.
The set covers the core memory lifecycle: health, project listing, context restoration, search, conversation archiving, upsert, and deprecation. Minor gaps exist, such as explicit project creation/update or hard deletion/get-by-id, but these are not likely to block typical agent workflows.
Maintenance
Related MCP Connectors
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceLocal-first, auditable memory for AI agents. Provides durable context for MCP hosts with SQLite storage, CLI, and MCP tools for memory management.2Apache 2.0
- AlicenseAqualityDmaintenanceProvides persistent, searchable memory for AI agents across any MCP-compatible client, storing project context, user preferences, and session learnings locally in SQLite with tools to save, retrieve, search, and manage them.12MIT
- AlicenseCqualityCmaintenanceLocal-first, governable long-term memory for AI agents. Provides SQLite-backed storage, cross-session recall, and traceable memory corrections through a standard MCP interface.401MIT
- AlicenseAqualityCmaintenanceProvides persistent local memory for any MCP-compatible AI agent, enabling agents to store, search, recall, forget, export, and manage preferences, rules, and facts with zero dependencies, no cloud, and no API keys.8MIT