Compare commits

...

6 Commits

Author SHA1 Message Date
Saket Aryan df70d7833f fix(plugins): stamp surface identity at record time, not send time
Six defects in 0.3.x plugin telemetry. Defects 1, 2 and 6 were not three bugs:
they were one spool protocol getting three properties wrong.

Identity was decided by the wrong process. `harness` was stamped in record(),
correctly, but `source` was read from a module global in flush() — so whichever
process drained the spool named every event in it. Two processes never call
init(): mcp_server.py, and the detached `python3 telemetry.py` sender that
spawn_flush() starts. record() now stamps source beside harness, and the build
generates core/_harness_id.py per host so identity resolves with no init() call
at all. That also unifies two defaults that disagreed (`<host>_plugin` vs
`MEM0_<HOST>_PLUGIN`), which could yield three source values for one plugin.

Ownership was inferred, not held. Path.replace is os.rename, which preserves
mtime, so a claim made after a quiet minute inherited the spool's age and was
stealable the instant it existed. Claims are touched on creation and the
per-batch rewrite doubles as a lease heartbeat.

Progress was not durable. flush() returned on the first failed batch without
truncating, so the retry re-posted from index 0 — 150 events delivered 250
times. It now rewrites the claim with the unsent remainder after every batch,
bounding a crash to one repeated batch, and each event carries a uuid.

Parked batches starved. They were only reachable when no spool existed, and
because sessions keep recording there usually was one, so a batch parked by a
failed send waited until the 7-day expiry deleted it unsent — despite its own
presence being what starts the sender. flush() drains them in the same run, and
expiry now applies only after a genuine retry has failed.

code.install counted upgrades and repeat sessions. is_first_run() read the
identity file, which only a successful flush writes, so an offline user recorded
an install every session forever. A dedicated install-state.json is claimed
atomically at record time; a non-empty data directory reads as an upgrade.

The docs called this anonymous. Every event carries the account email, and the
hashes were unsalted SHA-256 over a git remote URL or an absolute path
containing the username. READMEs, the module docstring and a new docs section
now say what the code does, and repo/session digests are salted per install.

A cached email outlived an API key change. It is now re-resolved when the key's
fingerprint differs, and $identify aliases anonymous->email only — aliasing one
account to another merges person profiles irreversibly.

All six shipped green because the shared core's only tests lived under one host,
behind a conftest that calls init() at import. Core behaviour was never
exercised uninitialised. Adds agent-plugin-core/tests with no init, including
subprocess tests and coverage for the portable plugin, which has no flush worker
and would pass a native-only test vacuously.

Also puts the three surface headers on the SDKs, CLIs and integrations, and
corrects a README claiming ZAPIER/STRANDS were already in the platform allowlist.

Verified: 59 core tests, 203 claude-code, 11 cursor, 5 codex, 2 kimi, 6
antigravity. ruff and compileall clean. --check clean for all six hosts.
TypeScript changes are not typechecked locally (deps not installed).

Claude-Session: https://claude.ai/code/session_01C7tEmH86HAr7GoAAKCEHZb
2026-09-15 00:14:11 +05:30
Harsh Vardhan Gupta c7ee362aff fix(security): resolve 12 Vanta/Dependabot vulnerabilities across 6 pnpm workspaces + poetry.lock (#7280)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-09-11 16:07:57 +05:30
Kartik d873892dad feat(plugins)!: make Sidekick exclusive to Claude Code (#7278) 2026-09-10 20:51:50 +05:30
Kartik 02f7a9b2c4 docs: align agent plugin guides with shared runtime behavior (#7269) 2026-09-09 01:03:26 +05:30
Kartik 73e7b8763a refactor(integrations): shared agent plugin runtimes and native adapters (#7203) 2026-09-08 23:32:25 +05:30
Kartik dae67f74f5 fix(docs): SEO improvements for page titles, internal links, and URL structure (#7224) 2026-09-04 20:32:23 +05:30
483 changed files with 34788 additions and 21033 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
"name": "mem0",
"source": {
"source": "local",
"path": "./integrations/mem0-plugin"
"path": "./integrations/codex-plugin"
},
"policy": {
"installation": "AVAILABLE",
+1 -1
View File
@@ -12,7 +12,7 @@
"name": "mem0",
"source": "./integrations/claude-code-plugin",
"description": "Cross-session memory and token savings for coding agents.",
"version": "0.3.0"
"version": "0.3.1"
}
]
}
+1 -1
View File
@@ -8,7 +8,7 @@
"name": "mem0",
"source": {
"source": "local",
"path": "./integrations/mem0-plugin"
"path": "./integrations/codex-plugin"
},
"policy": {
"installation": "AVAILABLE",
+3 -3
View File
@@ -10,9 +10,9 @@
"plugins": [
{
"name": "mem0",
"source": "./integrations/mem0-plugin",
"description": "Mem0 memory layer for AI applications. Add persistent memory, personalization, and semantic search.",
"version": "0.2.15"
"source": "./integrations/cursor-plugin",
"description": "Cross-session memory and token savings for coding agents.",
"version": "0.3.1"
}
]
}
+3 -3
View File
@@ -18,9 +18,9 @@ Package workflows keep their own push-to-main and manual triggers. Their `pull_r
| Python CLI | `cli-python-ci.yml` | Push to main (`cli/python/`), manual | Ruff + pytest + hatch build on Python 3.10, 3.11, 3.12 |
| Node CLI | `cli-node-ci.yml` | Push to main (`cli/node/`), manual | Biome + tsc + vitest + tsup on Node 20, 22 |
| OpenClaw | `openclaw-checks.yml` | Push to main (`integrations/openclaw/`), manual | tsc + vitest (Codecov) + tsup on Node 20, 22 |
| Mem0 Plugin (legacy) | `mem0-plugin-checks.yml` | Push to main (`integrations/mem0-plugin/`, excluding `.opencode-plugin/`), manual | pytest + hook exec bits + JSON manifest validation on Python 3.10, 3.11, 3.12 |
| Claude Code Plugin | `claude-code-plugin-checks.yml` | Push to main (`integrations/claude-code-plugin/`), manual | pytest + ruff + JSON manifest validation on Python 3.10, 3.11, 3.12 |
| OpenCode Plugin | `opencode-plugin-checks.yml` | Push to main (`.opencode-plugin/`), manual | Bun: tsc + build + dist artifact check |
| Agent Plugins Python | `agent-plugins-python-checks.yml` | Push to main (shared Python core and native/portable plugin directories), manual | Runtime tests on Python 3.10; full pytest on 3.11, 3.12; ruff + generated-package drift on 3.12 |
| Agent Plugins TypeScript | `agent-plugins-typescript-checks.yml` | Push to main (`integrations/agent-plugin-core/typescript/`), manual | tsc + node:test on Node 22 |
| OpenCode Plugin | `opencode-plugin-checks.yml` | Push to main (`integrations/opencode-plugin/`), manual | Bun: tsc + build + dist artifact check |
| Pi Agent Plugin | `pi-agent-plugin-checks.yml` | Push to main (`integrations/pi-agent-plugin/`), manual | tsc + vitest + tsup on Node 20, 22 |
| DeepSeek Harness Plugin | `deepseek-plugin-checks.yml` | Push to main (`integrations/deepseek-plugin/`), manual | tsc + vitest + tsup on Node 20, 22 |
| n8n Node | `n8n-nodes-mem0-checks.yml` | Push to main (`integrations/n8n-nodes-mem0/`), manual | ESLint + tsc build on Node 20 |
@@ -0,0 +1,97 @@
name: Agent Plugins Python Checks
# Python runtime, adapters, generated bundles, and portable plugin validation.
# On PRs this is invoked by ci-gate.yml (the single required check);
# push-to-main and manual runs remain standalone.
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'integrations/agent-plugin-core/**'
- '!integrations/agent-plugin-core/typescript/**'
- 'integrations/mem0-agent-plugin/**'
- 'integrations/claude-code-plugin/**'
- 'integrations/cursor-plugin/**'
- 'integrations/codex-plugin/**'
- 'integrations/kimi-plugin/**'
- 'integrations/antigravity-plugin/**'
- 'marketplace.json'
- '.agents/plugins/marketplace.json'
- '.claude-plugin/marketplace.json'
- '.codex-plugin/marketplace.json'
- '.cursor-plugin/marketplace.json'
- '.kimi-plugin/marketplace.json'
- '.github/workflows/agent-plugins-python-checks.yml'
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install runtime test tooling
if: matrix.python-version == '3.10'
run: pip install pytest
- name: Install build and test tooling
if: matrix.python-version != '3.10'
run: pip install pytest ruff -r integrations/agent-plugin-core/requirements-dev.txt
- name: Check Python runtime compatibility
run: >-
python3 -m compileall -q
integrations/agent-plugin-core/python
integrations/claude-code-plugin/adapters
integrations/cursor-plugin/hooks
integrations/codex-plugin/hooks
integrations/kimi-plugin/hooks
integrations/antigravity-plugin/hooks
- name: Lint
if: matrix.python-version == '3.12'
run: >-
python3 -m ruff check
integrations/agent-plugin-core
integrations/claude-code-plugin
integrations/cursor-plugin
integrations/codex-plugin
integrations/kimi-plugin
integrations/antigravity-plugin
- name: Verify installable plugins are current
if: matrix.python-version == '3.12'
run: |
for host in claude-code cursor codex kimi antigravity; do
python3 integrations/agent-plugin-core/build/build.py "$host" --kind native --check
done
python3 integrations/agent-plugin-core/build/build.py mem0-agent-plugin --kind portable --check
- name: Run Python 3.10 runtime tests
if: matrix.python-version == '3.10'
run: >-
python3 -m pytest -q
integrations/claude-code-plugin/tests/test_memory_core.py
integrations/claude-code-plugin/tests/test_telemetry.py
- name: Run full tests
if: matrix.python-version != '3.10'
run: >-
python3 -m pytest -q
integrations/agent-plugin-core/tests
integrations/claude-code-plugin/tests
integrations/cursor-plugin/tests
integrations/codex-plugin/tests
integrations/kimi-plugin/tests
integrations/antigravity-plugin/tests
--ignore=integrations/claude-code-plugin/tests/integration
@@ -0,0 +1,42 @@
name: Agent Plugins TypeScript Checks
# Shared TypeScript runtime checks. Each consuming integration keeps its own
# build workflow, which is also triggered when this shared core changes.
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/agent-plugins-typescript-checks.yml'
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
cache-dependency-path: integrations/agent-plugin-core/typescript/pnpm-lock.yaml
- name: Install dependencies
working-directory: integrations/agent-plugin-core/typescript
run: pnpm install --frozen-lockfile
- name: Type check
working-directory: integrations/agent-plugin-core/typescript
run: pnpm typecheck
- name: Run tests
working-directory: integrations/agent-plugin-core/typescript
run: pnpm test
+36 -21
View File
@@ -38,8 +38,8 @@ jobs:
cli_python: ${{ steps.filter.outputs.cli_python }}
cli_node: ${{ steps.filter.outputs.cli_node }}
openclaw: ${{ steps.filter.outputs.openclaw }}
mem0_plugin: ${{ steps.filter.outputs.mem0_plugin }}
claude_code_plugin: ${{ steps.filter.outputs.claude_code_plugin }}
agent_plugins_python: ${{ steps.filter.outputs.agent_plugins_python }}
agent_plugins_typescript: ${{ steps.filter.outputs.agent_plugins_typescript }}
opencode_plugin: ${{ steps.filter.outputs.opencode_plugin }}
pi_agent_plugin: ${{ steps.filter.outputs.pi_agent_plugin }}
deepseek_plugin: ${{ steps.filter.outputs.deepseek_plugin }}
@@ -76,27 +76,43 @@ jobs:
- '.github/workflows/ci-gate.yml'
openclaw:
- 'integrations/openclaw/**'
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/openclaw-checks.yml'
- '.github/workflows/ci-gate.yml'
mem0_plugin:
- 'integrations/mem0-plugin/**'
- '!integrations/mem0-plugin/.opencode-plugin/**'
- '.github/workflows/mem0-plugin-checks.yml'
- '.github/workflows/ci-gate.yml'
claude_code_plugin:
agent_plugins_python:
- 'integrations/agent-plugin-core/**'
- '!integrations/agent-plugin-core/typescript/**'
- 'integrations/mem0-agent-plugin/**'
- 'integrations/claude-code-plugin/**'
- '.github/workflows/claude-code-plugin-checks.yml'
- 'integrations/cursor-plugin/**'
- 'integrations/codex-plugin/**'
- 'integrations/kimi-plugin/**'
- 'integrations/antigravity-plugin/**'
- 'marketplace.json'
- '.agents/plugins/marketplace.json'
- '.claude-plugin/marketplace.json'
- '.codex-plugin/marketplace.json'
- '.cursor-plugin/marketplace.json'
- '.kimi-plugin/marketplace.json'
- '.github/workflows/agent-plugins-python-checks.yml'
- '.github/workflows/ci-gate.yml'
agent_plugins_typescript:
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/agent-plugins-typescript-checks.yml'
- '.github/workflows/ci-gate.yml'
opencode_plugin:
- 'integrations/mem0-plugin/.opencode-plugin/**'
- 'integrations/opencode-plugin/**'
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/opencode-plugin-checks.yml'
- '.github/workflows/ci-gate.yml'
pi_agent_plugin:
- 'integrations/pi-agent-plugin/**'
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/pi-agent-plugin-checks.yml'
- '.github/workflows/ci-gate.yml'
deepseek_plugin:
- 'integrations/deepseek-plugin/**'
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/deepseek-plugin-checks.yml'
- '.github/workflows/ci-gate.yml'
n8n_nodes_mem0:
@@ -160,18 +176,17 @@ jobs:
uses: ./.github/workflows/openclaw-checks.yml
secrets: inherit
mem0-plugin:
name: Mem0 Plugin
agent-plugins-python:
name: Agent Plugins Python
needs: changes
if: needs.changes.outputs.mem0_plugin == 'true'
uses: ./.github/workflows/mem0-plugin-checks.yml
secrets: inherit
if: needs.changes.outputs.agent_plugins_python == 'true'
uses: ./.github/workflows/agent-plugins-python-checks.yml
claude-code-plugin:
name: Claude Code Plugin
agent-plugins-typescript:
name: Agent Plugins TypeScript
needs: changes
if: needs.changes.outputs.claude_code_plugin == 'true'
uses: ./.github/workflows/claude-code-plugin-checks.yml
if: needs.changes.outputs.agent_plugins_typescript == 'true'
uses: ./.github/workflows/agent-plugins-typescript-checks.yml
secrets: inherit
opencode-plugin:
@@ -248,8 +263,8 @@ jobs:
- cli-python
- cli-node
- openclaw
- mem0-plugin
- claude-code-plugin
- agent-plugins-python
- agent-plugins-typescript
- opencode-plugin
- pi-agent-plugin
- deepseek-plugin
@@ -1,46 +0,0 @@
name: Claude Code Plugin Checks
# On PRs this is invoked by ci-gate.yml (the single required check);
# push-to-main and manual runs remain standalone.
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'integrations/claude-code-plugin/**'
- '.github/workflows/claude-code-plugin-checks.yml'
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install test tooling
run: pip install pytest ruff
# The plugin itself has zero runtime dependencies — nothing else to install.
- name: Check manifests are valid JSON
working-directory: integrations/claude-code-plugin
run: |
for f in .claude-plugin/plugin.json .mcp.json hooks/hooks.json; do
jq empty "$f" || (echo "Invalid JSON: $f" && exit 1)
done
- name: Lint
working-directory: integrations/claude-code-plugin
run: python3 -m ruff check .
- name: Run tests
working-directory: integrations/claude-code-plugin
run: python3 -m pytest tests -q
+3 -4
View File
@@ -8,6 +8,7 @@ on:
branches: [main]
paths:
- 'integrations/deepseek-plugin/**'
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/deepseek-plugin-checks.yml'
workflow_call:
@@ -84,7 +85,5 @@ jobs:
- name: Build
run: cd integrations/deepseek-plugin && pnpm build
- name: Verify dist output exists
run: |
test -f integrations/deepseek-plugin/dist/index.js || (echo "Build output missing: dist/index.js" && exit 1)
test -f integrations/deepseek-plugin/dist/index.d.ts || (echo "Build output missing: dist/index.d.ts" && exit 1)
- name: Verify package artifact
run: python3 integrations/agent-plugin-core/conformance/artifacts.py deepseek
-58
View File
@@ -1,58 +0,0 @@
name: Mem0 Plugin Checks
# On PRs this is invoked by ci-gate.yml (the single required check);
# push-to-main and manual runs remain standalone.
#
# Covers the Python plugin (scripts/ + tests/). The nested .opencode-plugin/
# is a separate package with its own workflow (opencode-plugin-checks.yml).
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'integrations/mem0-plugin/**'
- '!integrations/mem0-plugin/.opencode-plugin/**'
- '.github/workflows/mem0-plugin-checks.yml'
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: integrations/mem0-plugin
run: |
pip install -r requirements.txt
pip install pytest
- name: Verify hook entry points are executable
working-directory: integrations/mem0-plugin
run: |
missing=$(find scripts -name '*.sh' ! -name '_*' ! -perm -u+x -print)
if [ -n "$missing" ]; then
echo "Hook entry points must be executable:"
echo "$missing"
exit 1
fi
- name: Check hook manifests are valid JSON
working-directory: integrations/mem0-plugin
run: |
for f in plugin.json mcp_config.json hooks.json hooks/*.json; do
jq empty "$f" || (echo "Invalid JSON: $f" && exit 1)
done
- name: Run tests
working-directory: integrations/mem0-plugin
run: pytest -q
+3 -4
View File
@@ -8,6 +8,7 @@ on:
branches: [main]
paths:
- 'integrations/openclaw/**'
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/openclaw-checks.yml'
workflow_call:
@@ -93,7 +94,5 @@ jobs:
- name: Build
run: cd integrations/openclaw && pnpm build
- name: Verify dist output exists
run: |
test -f integrations/openclaw/dist/index.js || (echo "Build output missing: dist/index.js" && exit 1)
test -f integrations/openclaw/dist/index.d.ts || (echo "Build output missing: dist/index.d.ts" && exit 1)
- name: Verify package artifact
run: python3 integrations/agent-plugin-core/conformance/artifacts.py openclaw
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
id-token: write
defaults:
run:
working-directory: integrations/mem0-plugin/.opencode-plugin
working-directory: integrations/opencode-plugin
steps:
- uses: actions/checkout@v4
with:
+6 -5
View File
@@ -7,7 +7,8 @@ on:
push:
branches: [main]
paths:
- 'integrations/mem0-plugin/.opencode-plugin/**'
- 'integrations/opencode-plugin/**'
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/opencode-plugin-checks.yml'
workflow_call:
@@ -16,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: integrations/mem0-plugin/.opencode-plugin
working-directory: integrations/opencode-plugin
steps:
- uses: actions/checkout@v4
@@ -34,6 +35,6 @@ jobs:
- name: Build
run: bun run build
- name: Verify dist output exists
run: |
test -f dist/index.js || (echo "Build output missing: dist/index.js" && exit 1)
- name: Verify package artifact
working-directory: .
run: python3 integrations/agent-plugin-core/conformance/artifacts.py opencode
+3 -6
View File
@@ -8,6 +8,7 @@ on:
branches: [main]
paths:
- 'integrations/pi-agent-plugin/**'
- 'integrations/agent-plugin-core/typescript/**'
- '.github/workflows/pi-agent-plugin-checks.yml'
workflow_call:
@@ -84,9 +85,5 @@ jobs:
- name: Build
run: cd integrations/pi-agent-plugin && pnpm build
- name: Verify dist output exists
run: |
test -f integrations/pi-agent-plugin/dist/index.js || (echo "Build output missing: dist/index.js" && exit 1)
test -f integrations/pi-agent-plugin/dist/index.d.ts || (echo "Build output missing: dist/index.d.ts" && exit 1)
test -f integrations/pi-agent-plugin/dist/entry.js || (echo "Build output missing: dist/entry.js" && exit 1)
test -f integrations/pi-agent-plugin/dist/entry.d.ts || (echo "Build output missing: dist/entry.d.ts" && exit 1)
- name: Verify package artifact
run: python3 integrations/agent-plugin-core/conformance/artifacts.py pi-agent
+4
View File
@@ -14,6 +14,10 @@ server/.env
# Distribution / packaging
.Python
build/
!integrations/agent-plugin-core/build/
!integrations/agent-plugin-core/build/*.py
!integrations/agent-plugin-core/build/schemas/
!integrations/agent-plugin-core/build/schemas/*.json
develop-eggs/
dist/
downloads/
+3 -3
View File
@@ -5,11 +5,11 @@
{
"id": "mem0",
"displayName": "Mem0",
"version": "0.1.0",
"description": "Persistent memory for Kimi Code. Remembers decisions, patterns, and preferences across sessions.",
"version": "0.3.1",
"description": "Cross-session memory and token savings for coding agents.",
"homepage": "https://mem0.ai",
"keywords": ["memory", "personalization", "mcp", "semantic-search"],
"source": "https://github.com/mem0ai/mem0/tree/main/integrations/mem0-plugin"
"source": "https://github.com/mem0ai/mem0/tree/main/integrations/kimi-plugin"
}
]
}
+1 -1
View File
@@ -14,7 +14,7 @@ This is a polyglot monorepo and **every package sets its own rules**. Read the `
- Modify anything in `.github/workflows/` without explicit maintainer approval. Publishing credentials are pinned to workflow filenames.
- Commit `.env` files, API keys, or credentials.
- Skip pre-commit hooks.
- Use npm or yarn in TypeScript packages. This repo is pnpm-only (Bun in `.opencode-plugin/`).
- Use npm or yarn in TypeScript packages. This repo is pnpm-only (Bun in `integrations/opencode-plugin/`).
- Use `require()` in TypeScript. ES module `import` syntax only.
- Mix up linter configs. Root Python is ruff at line length **120**, `cli/python/` is ruff at **100**, `cli/node/` is Biome, `mem0-ts/` is Prettier, `integrations/vercel-ai-sdk/` is ESLint.
- Add Python dependencies to the core `dependencies` list in `pyproject.toml`. Use an optional group.
+1 -1
View File
@@ -41,7 +41,7 @@
"tsup": "^8.0.0",
"tsx": "^4.7.0",
"vite": "^6.0.0",
"vitest": "^4.1.0",
"vitest": "^4.1.11",
"@biomejs/biome": "^1.7.0",
"@types/node": "^20.0.0"
},
+46 -46
View File
@@ -51,8 +51,8 @@ importers:
specifier: ^6.0.0
version: 6.4.3(@types/node@20.19.37)(tsx@4.21.0)
vitest:
specifier: ^4.1.0
version: 4.1.8(@types/node@20.19.37)(vite@6.4.3(@types/node@20.19.37)(tsx@4.21.0))
specifier: ^4.1.11
version: 4.1.11(@types/node@20.19.37)(vite@6.4.3(@types/node@20.19.37)(tsx@4.21.0))
packages:
@@ -439,11 +439,11 @@ packages:
'@types/node@20.19.37':
resolution: {integrity: sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==}
'@vitest/expect@4.1.8':
resolution: {integrity: sha512-h3nDO677RDLEGlBxyQ5CW8RlMThSKSRLUePLOx09gNIWRL40edgA1GCZSZgf1W55MFAG6/Sw14KeaAnqv0NKdQ==}
'@vitest/expect@4.1.11':
resolution: {integrity: sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==}
'@vitest/mocker@4.1.8':
resolution: {integrity: sha512-LEiN/xe4OSIbKe9HQIp5OC24agGD9J5CnmMgsLohVVoOPWL9a2sBoR6VBx43jQZb7Kr1l4RCuyCJzcAa0+dojw==}
'@vitest/mocker@4.1.11':
resolution: {integrity: sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==}
peerDependencies:
msw: ^2.4.9
vite: ^6.0.0 || ^7.0.0 || ^8.0.0
@@ -453,20 +453,20 @@ packages:
vite:
optional: true
'@vitest/pretty-format@4.1.8':
resolution: {integrity: sha512-9GasEBxpZ1VYIpqHf/0+YGg121uSNwCKOJqIrTwWP/TB7DmFCiaBpNl3aPZzoLWfWkuqhbH8vJIVobZkvdo2cA==}
'@vitest/pretty-format@4.1.11':
resolution: {integrity: sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==}
'@vitest/runner@4.1.8':
resolution: {integrity: sha512-EmVxeBAfMJvycdjd6Hm+RbFBbA9fKvo0Kx37hNpBYoYeavH3RNsBXWDooR1mgD52dCrxIIuP7UotpfiwOikvcg==}
'@vitest/runner@4.1.11':
resolution: {integrity: sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==}
'@vitest/snapshot@4.1.8':
resolution: {integrity: sha512-acfZboRmAIf05DEKcBQy33VXojFJjtUdLyo7oOmV9kebb2xdU01UknNiPuPZoJZQyO7DF0gZdTGTpeAzET9QPQ==}
'@vitest/snapshot@4.1.11':
resolution: {integrity: sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==}
'@vitest/spy@4.1.8':
resolution: {integrity: sha512-6EevtBp6OZOPF7bmz36HrGMeP3txgVSrgebWxHOafDXGkhIzfXK14f8KF6MuFfgXXUeHxmpD3BQxkV00/3s5mA==}
'@vitest/spy@4.1.11':
resolution: {integrity: sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==}
'@vitest/utils@4.1.8':
resolution: {integrity: sha512-uOJamYALNhfJ6iolExyQM40yIQwDqYnkKtQ5VCiSe17E33H0aQ/u+1GlRuz4LZBk6Mm3sg90G9hEbmEt37C1Zg==}
'@vitest/utils@4.1.11':
resolution: {integrity: sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==}
acorn@8.16.0:
resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==}
@@ -910,20 +910,20 @@ packages:
yaml:
optional: true
vitest@4.1.8:
resolution: {integrity: sha512-flY6ScbCIt9HThs+C5HS7jvGOB560DJtk/Z15IQROTA6zEy49Nh8T/dofWTQL+n3vswqn87sbJNiuqw1SDp5Ig==}
vitest@4.1.11:
resolution: {integrity: sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==}
engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@opentelemetry/api': ^1.9.0
'@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0
'@vitest/browser-playwright': 4.1.8
'@vitest/browser-preview': 4.1.8
'@vitest/browser-webdriverio': 4.1.8
'@vitest/coverage-istanbul': 4.1.8
'@vitest/coverage-v8': 4.1.8
'@vitest/ui': 4.1.8
'@vitest/browser-playwright': 4.1.11
'@vitest/browser-preview': 4.1.11
'@vitest/browser-webdriverio': 4.1.11
'@vitest/coverage-istanbul': 4.1.11
'@vitest/coverage-v8': 4.1.11
'@vitest/ui': 4.1.11
happy-dom: '*'
jsdom: '*'
vite: ^6.0.0 || ^7.0.0 || ^8.0.0
@@ -1186,44 +1186,44 @@ snapshots:
dependencies:
undici-types: 6.21.0
'@vitest/expect@4.1.8':
'@vitest/expect@4.1.11':
dependencies:
'@standard-schema/spec': 1.1.0
'@types/chai': 5.2.3
'@vitest/spy': 4.1.8
'@vitest/utils': 4.1.8
'@vitest/spy': 4.1.11
'@vitest/utils': 4.1.11
chai: 6.2.2
tinyrainbow: 3.1.0
'@vitest/mocker@4.1.8(vite@6.4.3(@types/node@20.19.37)(tsx@4.21.0))':
'@vitest/mocker@4.1.11(vite@6.4.3(@types/node@20.19.37)(tsx@4.21.0))':
dependencies:
'@vitest/spy': 4.1.8
'@vitest/spy': 4.1.11
estree-walker: 3.0.3
magic-string: 0.30.21
optionalDependencies:
vite: 6.4.3(@types/node@20.19.37)(tsx@4.21.0)
'@vitest/pretty-format@4.1.8':
'@vitest/pretty-format@4.1.11':
dependencies:
tinyrainbow: 3.1.0
'@vitest/runner@4.1.8':
'@vitest/runner@4.1.11':
dependencies:
'@vitest/utils': 4.1.8
'@vitest/utils': 4.1.11
pathe: 2.0.3
'@vitest/snapshot@4.1.8':
'@vitest/snapshot@4.1.11':
dependencies:
'@vitest/pretty-format': 4.1.8
'@vitest/utils': 4.1.8
'@vitest/pretty-format': 4.1.11
'@vitest/utils': 4.1.11
magic-string: 0.30.21
pathe: 2.0.3
'@vitest/spy@4.1.8': {}
'@vitest/spy@4.1.11': {}
'@vitest/utils@4.1.8':
'@vitest/utils@4.1.11':
dependencies:
'@vitest/pretty-format': 4.1.8
'@vitest/pretty-format': 4.1.11
convert-source-map: 2.0.0
tinyrainbow: 3.1.0
@@ -1627,15 +1627,15 @@ snapshots:
fsevents: 2.3.3
tsx: 4.21.0
vitest@4.1.8(@types/node@20.19.37)(vite@6.4.3(@types/node@20.19.37)(tsx@4.21.0)):
vitest@4.1.11(@types/node@20.19.37)(vite@6.4.3(@types/node@20.19.37)(tsx@4.21.0)):
dependencies:
'@vitest/expect': 4.1.8
'@vitest/mocker': 4.1.8(vite@6.4.3(@types/node@20.19.37)(tsx@4.21.0))
'@vitest/pretty-format': 4.1.8
'@vitest/runner': 4.1.8
'@vitest/snapshot': 4.1.8
'@vitest/spy': 4.1.8
'@vitest/utils': 4.1.8
'@vitest/expect': 4.1.11
'@vitest/mocker': 4.1.11(vite@6.4.3(@types/node@20.19.37)(tsx@4.21.0))
'@vitest/pretty-format': 4.1.11
'@vitest/runner': 4.1.11
'@vitest/snapshot': 4.1.11
'@vitest/spy': 4.1.11
'@vitest/utils': 4.1.11
es-module-lexer: 2.1.0
expect-type: 1.3.0
magic-string: 0.30.21
+2 -1
View File
@@ -31,7 +31,8 @@ export class PlatformBackend implements Backend {
this.headers = {
Authorization: `Token ${config.apiKey}`,
"Content-Type": "application/json",
"X-Mem0-Source": "cli",
"X-Mem0-Source": "CLI",
"X-Mem0-Client": `mem0-cli-node/${CLI_VERSION}`,
"X-Mem0-Client-Language": "node",
"X-Mem0-Client-Version": CLI_VERSION,
};
+2 -1
View File
@@ -27,7 +27,8 @@ class PlatformBackend(Backend):
headers={
"Authorization": f"Token {config.api_key}",
"Content-Type": "application/json",
"X-Mem0-Source": "cli",
"X-Mem0-Source": "CLI",
"X-Mem0-Client": f"mem0-cli-python/{__version__}",
"X-Mem0-Client-Language": "python",
"X-Mem0-Client-Version": __version__,
},
+4 -2
View File
@@ -1,5 +1,7 @@
---
title: "Overview"
seo:
title: "API Reference Overview - Mem0"
icon: "terminal"
iconType: "solid"
description: "REST APIs for memory management, search, and entity operations"
@@ -10,7 +12,7 @@ description: "REST APIs for memory management, search, and entity operations"
Mem0 provides a comprehensive REST API for integrating advanced memory capabilities into your applications. Create, search, update, and manage memories across users, agents, and custom entities with simple HTTP requests.
<Info>
**Quick start:** Get your API key from the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=api-reference" rel="nofollow">Mem0 Dashboard</a> and make your first memory operation in minutes.
**Quick start:** Get your API key from the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=api-reference">Mem0 Dashboard</a> and make your first memory operation in minutes.
</Info>
---
@@ -87,7 +89,7 @@ All API requests require authentication using Token-based authentication. Includ
Authorization: Token <your-api-key>
```
Get your API key from the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=api-reference" rel="nofollow">Mem0 Dashboard</a>.
Get your API key from the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=api-reference">Mem0 Dashboard</a>.
<Warning>
**Keep your API key secure.** Never expose it in client-side code or public repositories. Use environment variables and server-side requests only.
@@ -1,5 +1,7 @@
---
title: 'Delete Memory'
seo:
title: "Delete Memory API Endpoint - Mem0"
description: "Delete a single memory by its unique memory ID from the Mem0 platform using the DELETE endpoint."
openapi: delete /v1/memories/{memory_id}/
---
@@ -1,5 +1,7 @@
---
title: 'Update Memory'
seo:
title: "Update Memory API Endpoint - Mem0"
description: "Update the content, metadata, timestamp, or expiration date of a single memory by its unique ID using the PUT endpoint."
openapi: put /v1/memories/{memory_id}/
---
@@ -1,5 +1,7 @@
---
title: 'Add Member'
seo:
title: "Add Organization Member API Endpoint - Mem0"
description: "Add a new member to an organization with a specified role such as READER or OWNER access level."
openapi: post /api/v1/orgs/organizations/{org_id}/members/
---
@@ -1,5 +1,7 @@
---
title: 'Get Members'
seo:
title: "Get Organization Members API Endpoint - Mem0"
description: "Retrieve a list of all members belonging to a specific organization on the Mem0 platform."
openapi: get /api/v1/orgs/organizations/{org_id}/members/
---
@@ -1,5 +1,7 @@
---
title: 'Add Member'
seo:
title: "Add Project Member API Endpoint - Mem0"
description: "Add a new member to a project with a specified role such as READER or OWNER access level."
openapi: post /api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/
---
@@ -1,5 +1,7 @@
---
title: 'Get Members'
seo:
title: "Get Project Members API Endpoint - Mem0"
description: "Retrieve a list of all members belonging to a specific project on the Mem0 platform."
openapi: get /api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/
---
+239 -1
View File
@@ -1543,7 +1543,7 @@ The largest provider release for the TypeScript OSS SDK so far: 17 new vector st
**Improvements:**
- **Telemetry:** Sample OSS hot-path events at 10% to reduce PostHog event volume ([#4771](https://github.com/mem0ai/mem0/pull/4771))
See the [TypeScript SDK migration guide](https://docs.mem0.ai/migration/ts-v2-to-v3) for upgrade instructions.
See the [OSS v2 to v3 migration guide](https://docs.mem0.ai/migration/oss-v2-to-v3) for upgrade instructions.
</Update>
@@ -2060,6 +2060,29 @@ A full-featured command-line interface for Mem0, available in both Python and No
<Tabs>
<Tab title="Mem0 Plugin">
<Update label="2026-09-08" description="Shared agent plugin runtime">
**Changed:**
- Consolidated the coding-agent integrations into `integrations/agent-plugin-core/`: one Python runtime, one TypeScript utility library, and six canonical Python-plugin skill templates. Native adapters retain each host's event contracts and capabilities.
- Python plugins ship generated, self-contained `core/` and `skills/` directories. Builds validate portable schemas and skills, parse native JSON, and reject generated-file drift, missing files, stale generated files, and symlinks. TypeScript packages bundle the shared source into their distributable JavaScript and verify their entry points.
- Replaced the old `integrations/mem0-plugin/` layout with native host directories and one portable `integrations/mem0-agent-plugin/` package. Updated marketplace paths, installation guides, and integration-skill links. OpenCode now lives in `integrations/opencode-plugin/`.
- Native Python plugins expose one local, read-only `search_memories` MCP tool and six skills: search, remember, forget, status, pause, and resume. The shared search tool accepts optional `run_id` with every scope (`repo`, `dir`, and `mine`) to recall memories from a specific coding-agent session. Omitting it searches across sessions. This local tool is separate from the hosted Mem0 MCP server's tool set.
**Fixes:**
- Hooks, controls, MCP servers, and detached workers use the same host-specific data directory. Detached workers retain the host identity and telemetry source; `--plugin-data-dir` reaches the shared resolver.
- Session-end workers flush the conversation already captured by hooks. Repeated and concurrent response hooks no longer duplicate an answer, while identical answers after separate prompts are preserved.
- Shared prompts and responses are redacted without the previous 6,000-character cutoff. Python extraction splits oversized messages without dropping text to enforce each request's input budget. Flush event selection and claims share one write transaction, delayed handoffs are replaced atomically, and permanent HTTP polling errors fail promptly.
- Extraction instructions refer to the current coding agent. Python redaction covers JSON-shaped credentials; both telemetry runtimes recursively remove sensitive keys, including keys inside nested lists.
- New Git repository writes use a hash of the remote identity in `agent_id`. Search and explicit shared-memory deletion include both current and legacy repository IDs within the repository's `app_id`. Existing memories are not rewritten. Legacy IDs retain their original ambiguity for matching owner/repository names on different Git hosts.
**Packaging:**
- Claude Code, Cursor, Codex, Kimi, Antigravity, and the portable Python bundle are versioned at `0.3.1`. OpenCode, Pi Agent, and DeepSeek Harness are `0.3.0`; OpenClaw is `1.1.0`. Each host's changes and upgrade considerations are listed in its tab.
- Python and TypeScript CI run their respective runtime suites. Package checks build the installable artifacts, check generated-file consistency, and reject TypeScript output that still imports monorepo source.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
<Update label="2026-08-24" description="mem0-plugin v0.2.15">
**Fixes:**
@@ -2346,8 +2369,124 @@ Initial release of the Mem0 plugin for Claude Code and Cursor, followed by Codex
</Tab>
<Tab title="Claude Code">
<Update label="Unreleased" description="Sidekick availability">
Sidekick is now available only in Claude Code, with Sonnet, worktree isolation, and parent memories.
</Update>
<Update label="2026-09-08" description="Claude Code plugin v0.3.1">
**Changed:**
- Extracted hook orchestration and memory behavior into the shared Python core; Claude transcript parsing remains in its native adapter. The installed package contains the generated runtime rather than importing files outside its plugin directory.
- Preserves the public `mem0` name, hook declarations, MCP launch configuration, user configuration, and `mem0:sidekick` worktree behavior. The manifest and marketplace version advance from `0.3.0` to `0.3.1` so installations can identify the update.
**Fixes:**
- Session-end extraction no longer appends a final answer already captured from the transcript while an earlier extraction was running.
- Existing repository memories remain searchable after the shared-ID change; explicit shared-memory deletion also covers the legacy ID. Background workers and control skills consistently use Claude's data directory.
- Receives the shared JSON-secret redaction and nested telemetry filtering fixes. The local search tool exposes query, result count, category, scope, and optional `run_id` for session-specific recall across all scopes.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
</Tab>
<Tab title="Cursor">
<Update label="Unreleased" description="Sidekick availability">
Removes Sidekick and its start/stop hooks. Memory capture, search, and six skills remain available.
</Update>
<Update label="2026-09-08" description="Cursor plugin v0.3.1">
**Changed:**
- Moves from the legacy shared editor-plugin directory to a native `integrations/cursor-plugin/` package with generated Python core and skills, Cursor variables, local MCP configuration, and a native Sidekick.
- Translates Cursor conversation/workspace fields, response and summary fields, tool outcomes, and subagent lifecycle events into the shared runtime. The Sidekick searches memory itself because Cursor's subagent-start response cannot inject parent context.
**Fixes:**
- Adapter errors are logged and exit successfully so a memory failure does not terminate the host hook. Sidekick telemetry reports zero parent-injected context because this host uses self-search.
- Repeated response events and Stop/session-end capture do not duplicate the same answer.
- Receives shared data-directory handling, background-worker identity, redaction, and legacy-memory retrieval fixes.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
</Tab>
<Tab title="Codex">
<Update label="Unreleased" description="Sidekick availability">
Renames shared tracking to use subagent terminology. Native subagent memory support remains available.
</Update>
<Update label="2026-09-08" description="Codex plugin v0.3.1">
**Changed:**
- Moves from the legacy shared editor-plugin directory to a native `integrations/codex-plugin/` package, with generated Python core and six skills, a local search MCP server, and native lifecycle hooks.
- Resolves MCP repository searches from Codex workspace metadata when supplied. Control skills, hooks, and workers use the same plugin data directory.
- Native subagent start/stop hooks supply parent-retrieved memory context and record completions for every native subagent. Named custom agents remain project/user configuration; the plugin does not distribute a named Codex Sidekick.
**Fixes:**
- Receives shared credential redaction, legacy-memory retrieval, background-worker identity, and duplicate-response fixes. Codex tool outcomes use available structured failure indicators; missing outcome information is recorded as unknown.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
</Tab>
<Tab title="Agent Plugins v1">
<Update label="Unreleased" description="Sidekick availability">
Sidekick is available only in Claude Code, not in the portable package.
</Update>
<Update label="2026-09-08" description="Portable Mem0 plugin v0.3.1">
**Added:**
- One portable package at `integrations/mem0-agent-plugin/`, using the Agent Plugins 1.0.0 root `plugin.json`, `mcp.json`, and fixed `skills/` locations.
- Ships a local, read-only `search_memories` server and the six shared memory skills. Uses `PLUGIN_ROOT` for bundled files and `PLUGIN_DATA` for persistent plugin state; all package files remain inside the installable directory.
**Packaging:**
- Generated from the shared Python runtime and skill templates. Builds validate the manifest, MCP configuration, skills, and generated-file consistency.
- Host lifecycle hooks and native Sidekick declarations remain in the native plugin packages; the portable package does not provide automatic lifecycle capture or host-specific subagent isolation. Its bundled remember skill cannot persist a new memory on its own because the portable package has no capture hooks or write tool.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
</Tab>
<Tab title="OpenCode">
<Update label="2026-09-08" description="OpenCode plugin v0.3.0">
**Changed:**
- Moved the source from `integrations/mem0-plugin/.opencode-plugin/` to `integrations/opencode-plugin/`, retaining the `@mem0/opencode-plugin` package name and native OpenCode hooks.
- Reuses shared conversation preparation, redaction, scoping, and telemetry. Builds a self-contained Bun/ESM `dist/index.js` and publishes its TypeScript entry declaration.
- Global memory tool scope requires the user to enable it in plugin settings first; empty and wildcard identities are rejected.
- Retains the seven commands for context loading, search, remember, forget, scope, status, and tour; bundled skills continue loading through OpenCode's native configuration.
**Removed:**
- Removed auto-Dream consolidation, its gates and state handling, and the Dream and pin skills/commands. Existing configurations and workflows that use these features must be updated.
**Builds:**
- Updated build and publish paths for the relocated source directory; the existing release tag prefix and publishing workflow filename are unchanged.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
<Update label="2026-07-22" description="OpenCode plugin v0.2.2">
**Fixes:**
@@ -2428,6 +2567,28 @@ Initial release of the Mem0 plugin for Claude Code and Cursor, followed by Codex
<Tab title="Antigravity">
<Update label="Unreleased" description="Sidekick availability">
Removes Sidekick. Memory capture, search, and six skills remain available.
</Update>
<Update label="2026-09-08" description="Antigravity plugin v0.3.1">
**Changed:**
- Ships a native package with generated Python core and six skills, a local search MCP server, a Sidekick declaration, and an adapter for `PreInvocation`, `PostToolUse`, and `Stop`.
- Normalizes conversation IDs, transcript paths, workspace paths, tool calls, and errors. The adapter captures all completed user/assistant transcript messages incrementally, including later-turn intent, without replaying earlier messages.
- Sidekick searches Mem0 itself; this plugin does not provide Claude Code's worktree isolation.
**Fixes and host limitations:**
- Accepts `MEM0_CWD` as an explicit workspace fallback when the host omits `workspacePaths`. Skips capture when neither is available, rather than writing under an unrelated directory.
- Documents global MCP registration with `agy mcp add` when the host does not register the plugin-scoped server. Recall on the initial invocation depends on the host providing a prompt or readable transcript.
- Receives the shared data-directory, redaction, legacy-memory retrieval, and duplicate-response fixes.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
<Update label="2026-08-24" description="Antigravity plugin v0.1.7">
**Fixes:**
@@ -2504,6 +2665,30 @@ Existing memories written by the previous versions are not rewritten. If your me
<Tab title="Kimi">
<Update label="Unreleased" description="Sidekick availability">
Removes Sidekick and its start/stop hooks. Memory capture, recall, and six skills remain available.
</Update>
<Update label="2026-09-08" description="Kimi Code plugin v0.3.1">
**Changed:**
- Ships a self-contained native package with six skills, nine lifecycle hooks, a local search MCP server, and a native Sidekick declaration. Added a dedicated installation and troubleshooting guide.
- Translates Kimi's session, prompt, tool, compaction, shutdown, and subagent events into the shared Python runtime. Sidekicks receive parent memory context through Kimi's native lifecycle.
**Fixes:**
- Recovers completed assistant output from Kimi's indexed v2 wire transcript when Stop events omit the response text. Repeated Sidekick invocations receive distinct run identifiers. Stops without a host ID are left uncorrelated when multiple matching runs are active, preserving their responses without assigning them to the wrong run.
- Keeps controls, hooks, MCP, and detached workers on the same Kimi data directory and preserves host identity in background workers.
- Receives the shared redaction, legacy-memory retrieval, and duplicate-response fixes.
**Host compatibility:**
- Documents `CHOKIDAR_USEPOLLING=1` for the observed macOS watcher issue. Filesystem isolation remains Kimi's responsibility.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
<Update label="2026-08-24" description="kimi-plugin v0.1.0">
**Initial release** of the Mem0 plugin for Kimi Code, sharing its scripts, skills, and marketplace listing with the Claude Code / Cursor / Codex / Antigravity plugin family ([#6919](https://github.com/mem0ai/mem0/pull/6919))
@@ -2520,6 +2705,24 @@ Existing memories written by the previous versions are not rewritten. If your me
<Tab title="OpenClaw">
<Update label="2026-09-08" description="openclaw-mem0 v1.1.0">
**Changed:**
- Reuses shared conversation preparation, redaction, and telemetry while retaining OpenClaw's native memory backend, tools, CLI, and Platform/OSS modes.
- Continues to publish a self-contained ESM package under `@mem0/openclaw-mem0`; the plugin manifest and package version now agree.
**Removed:**
- Removed Dream consolidation: automatic scheduling and locking, `openclaw mem0 dream`, Dream configuration, the memory-dream skill, and Dream-state public artifacts. Triage, recall, and memory/entity artifacts remain available. Update configurations or integrations that use the removed Dream surface.
**Fixes:**
- `openclaw mem0 status` handles an unconfigured installation without crashing and directs users to setup.
- Removed OpenClaw's separate 2,000-character extraction cutoff. Selected user and assistant messages retain their full redacted text; recent-message selection, earlier summary selection, and noise filtering still apply.
- Telemetry removes sensitive properties recursively and uses the shared failure-safe delivery implementation.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
<Update label="2026-08-24" description="openclaw-mem0 v1.0.16">
**Security:**
@@ -2790,6 +2993,24 @@ Existing memories written by the previous versions are not rewritten. If your me
<Tab title="Pi Agent">
<Update label="2026-09-08" description="Pi Agent plugin v0.3.0">
**Changed:**
- Reuses shared conversation preparation, memory formatting, project/session/global scope utilities, and telemetry while preserving Pi's native extension API and `@mem0/pi-agent-plugin` package name.
- Pi loads the built `dist/entry.js` extension instead of executing source TypeScript from an installed package. Builds also publish the library entry point and declarations.
**Removed:**
- Removed Dream consolidation and pin commands, skills, configuration, types, and exports. The remaining commands are remember, search, forget, tour, scope, and status. Update integrations that import removed APIs or invoke removed commands.
**Fixes:**
- Global memory tool scope requires the user to select `/mem0-scope global` or configure a global default first. Empty and wildcard identities are rejected.
- Memory update and delete accept the `mem0:<uuid>` and `[mem0:<uuid>]` citations displayed in tool results, as well as raw IDs.
- Shared capture preparation filters conversation roles and redacts content; telemetry removes sensitive keys inside nested structures.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
<Update label="2026-08-24" description="Pi Agent plugin v0.1.5">
**Security:**
@@ -2885,6 +3106,23 @@ Existing memories written by the previous versions are not rewritten. If your me
<Tab title="DeepSeek Harness">
<Update label="2026-09-08" description="deepseek-plugin v0.3.0">
**Added:**
- Automatic recall during `system-prompt/assemble`, using the latest human prompt and avoiding repeated context injection within a session.
- Automatic capture from the durable `session/event` stream after a completed turn. Interrupted or incomplete turns are not sent through this automatic capture path. `autoRecall` and `autoCapture` default to `true` and can be disabled.
**Changed:**
- Reuses shared lifecycle, redaction, identity, and telemetry utilities while retaining the explicit `search_memory` and `add_memory` tools and their per-call agent/session scope. Cross-user `userId` overrides now require operator opt-in with `allowUserOverride: true`.
- Publishes a self-contained ESM artifact under `@mem0/deepseek-plugin`; native Harness services and the Mem0 SDK remain external dependencies. Plugin cleanup remains tied to the native Cordis lifecycle.
**Host compatibility:**
- Supports the declared Harness runtime dependencies and documents the macOS watcher workaround. The plugin does not bundle a named Sidekick or provide child filesystem isolation.
[#7203](https://github.com/mem0ai/mem0/pull/7203)
</Update>
<Update label="2026-08-25" description="deepseek-plugin v0.1.1">
**New Features:**
+2
View File
@@ -1,5 +1,7 @@
---
title: Configurations
seo:
title: "Embedder Configuration Reference - Mem0"
description: "Reference for embedder configuration options in Mem0, including provider selection and model settings."
---
@@ -1,5 +1,7 @@
---
title: AWS Bedrock
seo:
title: "AWS Bedrock as Embedding Provider - Mem0"
description: "Configure AWS Bedrock as an embedding provider in Mem0 with IAM credentials and boto3 authentication."
---
@@ -1,5 +1,7 @@
---
title: Azure OpenAI
seo:
title: "Azure OpenAI as Embedding Provider - Mem0"
description: "Configure Azure OpenAI as an embedding provider in Mem0 with API key, deployment, and endpoint settings."
---
@@ -1,5 +1,7 @@
---
title: Google AI
seo:
title: "Google AI as Embedding Provider - Mem0"
description: "Configure Google AI as an embedding provider in Mem0 using Gemini models and the GOOGLE_API_KEY variable."
---
@@ -1,5 +1,7 @@
---
title: LangChain
seo:
title: "LangChain as Embedding Provider - Mem0"
description: "Use LangChain as an embedding provider in Mem0 to access a wide range of models through a unified interface."
---
@@ -1,5 +1,7 @@
---
title: "LM Studio"
seo:
title: "LM Studio as Embedding Provider - Mem0"
description: "Configure LM Studio as an embedding provider in Mem0 for local embedding generation with models like nomic-embed-text."
---
You can use embedding models from LM Studio to run Mem0 locally.
@@ -1,5 +1,7 @@
---
title: "Ollama"
seo:
title: "Ollama as Embedding Provider - Mem0"
description: "Configure Ollama as an embedding provider in Mem0 to generate embeddings locally using open-source models."
---
You can use embedding models from Ollama to run Mem0 locally.
@@ -1,5 +1,7 @@
---
title: OpenAI
seo:
title: "OpenAI as Embedding Provider - Mem0"
description: "Configure OpenAI as an embedding provider in Mem0 using models like text-embedding-3-large for vector generation."
---
@@ -1,5 +1,7 @@
---
title: Together
seo:
title: "Together AI as Embedding Provider - Mem0"
description: "Configure Together AI as an embedding provider in Mem0 with support for 1024-dimensional embedding models."
---
+5 -3
View File
@@ -1,5 +1,7 @@
---
title: Overview
seo:
title: "Embedding Providers Overview - Mem0"
description: "Overview of all supported embedding model providers in Mem0, including OpenAI, Azure, Ollama, and more."
---
@@ -15,15 +17,15 @@ See the list of supported embedders below.
<CardGroup cols={4}>
<Card title="OpenAI" icon="/images/provider-icons/openai.svg" href="/components/embedders/models/openai"></Card>
<Card title="Azure OpenAI" icon="/images/provider-icons/azure-color.svg" href="/components/embedders/models/azure_openai"></Card>
<Card title="Azure OpenAI" icon="/images/provider-icons/azure-color.svg" href="/components/embedders/models/azure-openai"></Card>
<Card title="Ollama" icon="/images/provider-icons/ollama.svg" href="/components/embedders/models/ollama"></Card>
<Card title="Hugging Face" icon="/images/provider-icons/huggingface.svg" href="/components/embedders/models/huggingface"></Card>
<Card title="Google AI" icon="/images/provider-icons/google-color.svg" href="/components/embedders/models/google_AI"></Card>
<Card title="Google AI" icon="/images/provider-icons/google-color.svg" href="/components/embedders/models/google-ai"></Card>
<Card title="Vertex AI" icon="/images/provider-icons/vertexai.svg" href="/components/embedders/models/vertexai"></Card>
<Card title="Together" icon="/images/provider-icons/together-color.svg" href="/components/embedders/models/together"></Card>
<Card title="LM Studio" icon="/images/provider-icons/lmstudio.svg" href="/components/embedders/models/lmstudio"></Card>
<Card title="Langchain" icon="/images/provider-icons/langchain-color.svg" href="/components/embedders/models/langchain"></Card>
<Card title="AWS Bedrock" icon="/images/provider-icons/bedrock-color.svg" href="/components/embedders/models/aws_bedrock"></Card>
<Card title="AWS Bedrock" icon="/images/provider-icons/bedrock-color.svg" href="/components/embedders/models/aws-bedrock"></Card>
<Card title="FastEmbed" icon="/images/provider-icons/qdrant.svg" href="/components/embedders/models/fastembed"></Card>
</CardGroup>
+2
View File
@@ -1,5 +1,7 @@
---
title: Configurations
seo:
title: "LLM Configuration Reference - Mem0"
description: "Reference for LLM configuration options in Mem0 for Python and TypeScript, including value precedence rules."
---
@@ -1,5 +1,7 @@
---
title: AWS Bedrock
seo:
title: "AWS Bedrock as LLM Provider - Mem0"
description: "Configure AWS Bedrock as an LLM provider in Mem0 with IAM authentication and Claude model support."
---
@@ -1,5 +1,7 @@
---
title: Azure OpenAI
seo:
title: "Azure OpenAI as LLM Provider - Mem0"
description: "Configure Azure OpenAI as an LLM provider in Mem0 with Azure Identity authentication and deployment settings."
---
@@ -1,5 +1,7 @@
---
title: Google AI
seo:
title: "Google AI as LLM Provider - Mem0"
description: "Configure Google Gemini as an LLM provider in Mem0 using the google.genai SDK and GOOGLE_API_KEY variable."
---
@@ -1,5 +1,7 @@
---
title: LangChain
seo:
title: "LangChain as LLM Provider - Mem0"
description: "Use LangChain as an LLM provider in Mem0 to integrate with various chat models through a unified interface."
---
+2
View File
@@ -1,5 +1,7 @@
---
title: LM Studio
seo:
title: "LM Studio as LLM Provider - Mem0"
description: "Configure LM Studio as an LLM provider in Mem0 for running local language models via an OpenAI-compatible API."
---
+2
View File
@@ -1,5 +1,7 @@
---
title: Ollama
seo:
title: "Ollama as LLM Provider - Mem0"
description: "Configure Ollama as an LLM provider in Mem0 for running local language models with tool-calling support."
---
+2
View File
@@ -1,5 +1,7 @@
---
title: OpenAI
seo:
title: "OpenAI as LLM Provider - Mem0"
description: "Configure OpenAI as an LLM provider in Mem0 with support for GPT models and Openrouter compatibility."
---
+2
View File
@@ -1,5 +1,7 @@
---
title: Together
seo:
title: "Together AI as LLM Provider - Mem0"
description: "Configure Together AI as an LLM provider in Mem0 with API key setup and optional custom endpoint configuration."
---
+2
View File
@@ -1,5 +1,7 @@
---
title: xAI
seo:
title: "xAI Grok as LLM Provider - Mem0"
description: "Configure xAI Grok models as an LLM provider in Mem0 with API key setup and usage examples."
---
+6 -4
View File
@@ -1,5 +1,7 @@
---
title: Overview
seo:
title: "LLM Providers Overview - Mem0"
description: "Overview of all supported LLM providers in Mem0, including OpenAI, Anthropic, Groq, Ollama, and more."
---
@@ -22,14 +24,14 @@ See the list of supported LLMs below.
<CardGroup cols={4}>
<Card title="OpenAI" icon="/images/provider-icons/openai.svg" href="/components/llms/models/openai" />
<Card title="Ollama" icon="/images/provider-icons/ollama.svg" href="/components/llms/models/ollama" />
<Card title="Azure OpenAI" icon="/images/provider-icons/azure-color.svg" href="/components/llms/models/azure_openai" />
<Card title="Azure OpenAI" icon="/images/provider-icons/azure-color.svg" href="/components/llms/models/azure-openai" />
<Card title="Anthropic" icon="/images/provider-icons/anthropic.svg" href="/components/llms/models/anthropic" />
<Card title="Together" icon="/images/provider-icons/together-color.svg" href="/components/llms/models/together" />
<Card title="Groq" icon="/images/provider-icons/groq.svg" href="/components/llms/models/groq" />
<Card title="Litellm" icon="shuffle" href="/components/llms/models/litellm" />
<Card title="Mistral AI" icon="/images/provider-icons/mistral-color.svg" href="/components/llms/models/mistral_AI" />
<Card title="Google AI" icon="/images/provider-icons/google-color.svg" href="/components/llms/models/google_AI" />
<Card title="AWS bedrock" icon="/images/provider-icons/bedrock-color.svg" href="/components/llms/models/aws_bedrock" />
<Card title="Mistral AI" icon="/images/provider-icons/mistral-color.svg" href="/components/llms/models/mistral-ai" />
<Card title="Google AI" icon="/images/provider-icons/google-color.svg" href="/components/llms/models/google-ai" />
<Card title="AWS bedrock" icon="/images/provider-icons/bedrock-color.svg" href="/components/llms/models/aws-bedrock" />
<Card title="DeepSeek" icon="/images/provider-icons/deepseek-color.svg" href="/components/llms/models/deepseek" />
<Card title="MiniMax" icon="/images/provider-icons/minimax-color.svg" href="/components/llms/models/minimax" />
<Card title="xAI" icon="/images/provider-icons/xai.svg" href="/components/llms/models/xAI" />
+7 -5
View File
@@ -1,5 +1,7 @@
---
title: Overview
seo:
title: "Reranker Providers Overview - Mem0"
description: 'Pick the right reranker path to boost Mem0 search relevance.'
---
@@ -13,10 +15,10 @@ Reranking trades extra latency for better precision. Start once you have baselin
<CardGroup cols={3}>
<Card title="Cohere" icon="/images/provider-icons/cohere.svg" href="/components/rerankers/models/cohere" />
<Card title="Sentence Transformers" icon="vector-square" href="/components/rerankers/models/sentence_transformer" />
<Card title="Sentence Transformers" icon="vector-square" href="/components/rerankers/models/sentence-transformer" />
<Card title="Hugging Face" icon="/images/provider-icons/huggingface.svg" href="/components/rerankers/models/huggingface" />
<Card title="LLM Reranker" icon="wand-magic-sparkles" href="/components/rerankers/models/llm_reranker" />
<Card title="Zero Entropy" icon="/images/provider-icons/zeroentropy.svg" href="/components/rerankers/models/zero_entropy" />
<Card title="LLM Reranker" icon="wand-magic-sparkles" href="/components/rerankers/models/llm-reranker" />
<Card title="Zero Entropy" icon="/images/provider-icons/zeroentropy.svg" href="/components/rerankers/models/zero-entropy" />
</CardGroup>
<Note>
@@ -54,13 +56,13 @@ All five rerankers are available in both the Python and the [TypeScript](/open-s
title="Zero Entropy Guide"
description="Adopt the managed neural reranker for production workloads."
icon="sparkles"
href="/components/rerankers/models/zero_entropy"
href="/components/rerankers/models/zero-entropy"
/>
<Card
title="Sentence Transformers"
description="Keep reranking on-device with cross-encoder models."
icon="microchip"
href="/components/rerankers/models/sentence_transformer"
href="/components/rerankers/models/sentence-transformer"
/>
</CardGroup>
+2
View File
@@ -1,5 +1,7 @@
---
title: Configurations
seo:
title: "Vector Store Configuration Reference - Mem0"
description: "Reference for vector database configuration options in Mem0, including provider selection and connection settings."
---
@@ -1,5 +1,7 @@
---
title: LangChain
seo:
title: "LangChain as Vector Store Provider - Mem0"
description: "Use LangChain as a unified vector store provider in Mem0 to access multiple vector databases through one interface."
---
+5 -3
View File
@@ -1,5 +1,7 @@
---
title: Overview
seo:
title: "Vector Store Providers Overview - Mem0"
description: "Overview of all supported vector databases in Mem0, including Qdrant, Chroma, PGVector, Pinecone, Oracle, and more."
---
@@ -28,12 +30,12 @@ See the list of supported vector databases below.
<Card title="Elasticsearch" icon="/images/provider-icons/elasticsearch.svg" href="/components/vectordbs/dbs/elasticsearch"></Card>
<Card title="OpenSearch" icon="/images/provider-icons/opensearch.svg" href="/components/vectordbs/dbs/opensearch"></Card>
<Card title="Supabase" icon="/images/provider-icons/supabase.svg" href="/components/vectordbs/dbs/supabase"></Card>
<Card title="Vertex AI" icon="/images/provider-icons/vertexai.svg" href="/components/vectordbs/dbs/vertex_ai"></Card>
<Card title="Vertex AI" icon="/images/provider-icons/vertexai.svg" href="/components/vectordbs/dbs/vertex-ai"></Card>
<Card title="Weaviate" icon="circle-nodes" href="/components/vectordbs/dbs/weaviate"></Card>
<Card title="FAISS" icon="layer-group" href="/components/vectordbs/dbs/faiss"></Card>
<Card title="LangChain" icon="/images/provider-icons/langchain-color.svg" href="/components/vectordbs/dbs/langchain"></Card>
<Card title="Amazon S3 Vectors" icon="/images/provider-icons/aws-color.svg" href="/components/vectordbs/dbs/s3_vectors"></Card>
<Card title="Neptune Analytics" icon="/images/provider-icons/aws-color.svg" href="/components/vectordbs/dbs/neptune_analytics"></Card>
<Card title="Amazon S3 Vectors" icon="/images/provider-icons/aws-color.svg" href="/components/vectordbs/dbs/s3-vectors"></Card>
<Card title="Neptune Analytics" icon="/images/provider-icons/aws-color.svg" href="/components/vectordbs/dbs/neptune-analytics"></Card>
<Card title="Databricks" icon="/images/provider-icons/databricks.svg" href="/components/vectordbs/dbs/databricks"></Card>
<Card title="Turbopuffer" icon="/images/provider-icons/turbopuffer.svg" href="/components/vectordbs/dbs/turbopuffer"></Card>
</CardGroup>
+1 -1
View File
@@ -38,7 +38,7 @@ Navigate to the `docs/` directory (where `docs.json` is located) and start the d
mintlify dev
```
The documentation website will be available at: [http://localhost:3000](http://localhost:3000).
The documentation website will be available at: `http://localhost:3000`.
---
@@ -48,7 +48,7 @@ Before you begin, follow these steps to set up the demo application:
OPENAI_API_KEY=your_openai_api_key
MEM0_API_KEY=your_mem0_api_key
```
You can obtain your `MEM0_API_KEY` by signing up at <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=cookbook-companions-quickstart" rel="nofollow">Mem0 API Dashboard</a>.
You can obtain your `MEM0_API_KEY` by signing up at <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=cookbook-companions-quickstart">Mem0 API Dashboard</a>.
5. Start the development server:
```bash
@@ -21,7 +21,7 @@ from mem0 import MemoryClient
client = MemoryClient(api_key="m0-...")
```
Grab an API key from the <a href="https://app.mem0.ai/?utm_source=oss&utm_medium=cookbook-entity-partitioning" rel="nofollow">Mem0 dashboard</a> to get started.
Grab an API key from the <a href="https://app.mem0.ai/?utm_source=oss&utm_medium=cookbook-entity-partitioning">Mem0 dashboard</a> to get started.
## Store and Retrieve Scoped Memories
@@ -23,7 +23,7 @@ client = MemoryClient(api_key="your-api-key")
```
<Note>
Your API key needs export permissions to download memory data. Check your project settings on the <a href="https://app.mem0.ai?utm_source=oss&utm_medium=cookbook-exporting-memories" rel="nofollow">dashboard</a> if export operations fail with authentication errors.
Your API key needs export permissions to download memory data. Check your project settings on the <a href="https://app.mem0.ai?utm_source=oss&utm_medium=cookbook-exporting-memories">dashboard</a> if export operations fail with authentication errors.
</Note>
Let's add some sample memories to work with:
@@ -59,7 +59,7 @@ GEMINI_API_KEY=your-gemini-api-key-here
```
<Note>
Ensure you have your Mem0 API key from the <a href="https://app.mem0.ai?utm_source=oss&utm_medium=cookbook-gemini-3" rel="nofollow">Mem0 Dashboard</a> and your Gemini API key from the [Google AI Studio](https://ai.studio/app/api-keys).
Ensure you have your Mem0 API key from the <a href="https://app.mem0.ai?utm_source=oss&utm_medium=cookbook-gemini-3">Mem0 Dashboard</a> and your Gemini API key from the [Google AI Studio](https://ai.studio/app/api-keys).
</Note>
## Gemini Memory Agent
@@ -44,7 +44,7 @@ Set up your environment variables:
- `MEM0_API_KEY`: Your Mem0 Platform API key
- `OPENAI_API_KEY`: Your OpenAI API key
You can obtain your Mem0 Platform API key from the <a href="https://app.mem0.ai?utm_source=oss&utm_medium=cookbook-llamaindex-multiagent" rel="nofollow">Mem0 Platform</a>.
You can obtain your Mem0 Platform API key from the <a href="https://app.mem0.ai?utm_source=oss&utm_medium=cookbook-llamaindex-multiagent">Mem0 Platform</a>.
## Complete Implementation
@@ -360,7 +360,7 @@ Based on our previous session, I remember we covered Vision Language Models and
## Help & Resources
- [LlamaIndex Agent Workflows](https://docs.llamaindex.ai/en/stable/use_cases/agents/)
- <a href="https://app.mem0.ai/?utm_source=oss&utm_medium=cookbook-llamaindex-multiagent" rel="nofollow">Mem0 Platform</a>
- <a href="https://app.mem0.ai/?utm_source=oss&utm_medium=cookbook-llamaindex-multiagent">Mem0 Platform</a>
---
@@ -28,7 +28,7 @@ os.environ["OPENAI_API_KEY"] = "<your-openai-api-key>"
llm = OpenAI(model="gpt-5-mini")
```
Initialize the Mem0 client. You can find your API key <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=cookbook-llamaindex-react" rel="nofollow">here</a>. Read about Mem0 [Open Source](https://docs.mem0.ai/open-source/overview).
Initialize the Mem0 client. You can find your API key <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=cookbook-llamaindex-react">here</a>. Read about Mem0 [Open Source](https://docs.mem0.ai/open-source/overview).
```python
os.environ["MEM0_API_KEY"] = "<your-mem0-api-key>"
@@ -226,7 +226,7 @@ context = Mem0Context(user_id="user123")
## Resources
- [Mem0 Documentation](https://docs.mem0.ai/introduction)
- <a href="https://app.mem0.ai/dashboard?utm_source=oss&utm_medium=cookbook-agents-sdk-tool" rel="nofollow">Mem0 Dashboard</a>
- <a href="https://app.mem0.ai/dashboard?utm_source=oss&utm_medium=cookbook-agents-sdk-tool">Mem0 Dashboard</a>
- [API Reference](https://docs.mem0.ai/api-reference)
---
+2 -2
View File
@@ -38,8 +38,8 @@ print(os.environ['AWS_SECRET_ACCESS_KEY'])
## Configuration and Usage
This sets up Mem0 with:
- [AWS Bedrock for LLM](https://docs.mem0.ai/components/llms/models/aws_bedrock)
- [AWS Bedrock for embeddings](https://docs.mem0.ai/components/embedders/models/aws_bedrock#aws-bedrock)
- [AWS Bedrock for LLM](https://docs.mem0.ai/components/llms/models/aws-bedrock)
- [AWS Bedrock for embeddings](https://docs.mem0.ai/components/embedders/models/aws-bedrock#aws-bedrock)
- [OpenSearch as the vector store](https://docs.mem0.ai/components/vectordbs/dbs/opensearch)
```python
@@ -26,7 +26,7 @@ MEM0_API_KEY=your_mem0_api_key
OPENAI_API_KEY=your_openai_api_key
```
Get your Mem0 API key from the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=cookbook-openai-tool-calls" rel="nofollow">Mem0 Dashboard</a>.
Get your Mem0 API key from the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=cookbook-openai-tool-calls">Mem0 Dashboard</a>.
### Configuration
@@ -283,7 +283,7 @@ run().catch(console.error);
## Resources
- [Mem0 Documentation](https://docs.mem0.ai/introduction)
- <a href="https://app.mem0.ai/dashboard?utm_source=oss&utm_medium=cookbook-openai-tool-calls" rel="nofollow">Mem0 Dashboard</a>
- <a href="https://app.mem0.ai/dashboard?utm_source=oss&utm_medium=cookbook-openai-tool-calls">Mem0 Dashboard</a>
- [API Reference](https://docs.mem0.ai/api-reference)
- [OpenAI Documentation](https://platform.openai.com/docs)
+2
View File
@@ -1,5 +1,7 @@
---
title: Overview
seo:
title: "Cookbooks and Tutorials - Mem0"
description: "Browse cookbook examples and tutorials for building AI applications with Mem0, from companion chatbots to AI agents."
---
+1 -1
View File
@@ -66,7 +66,7 @@ The combined score outperformed every individual signal across every category te
### LoCoMo
[LoCoMo](https://github.com/snap-stanford/locomo) tests single-hop, multi-hop, open-domain, and temporal memory recall across conversational sessions.
[LoCoMo](https://github.com/snap-research/locomo) tests single-hop, multi-hop, open-domain, and temporal memory recall across conversational sessions.
| Category | Score |
|---|---|
@@ -1,5 +1,7 @@
---
title: Delete Memory
seo:
title: "Delete Memory Operation - Mem0"
description: Remove memories from Mem0 either individually, in bulk, or via filters.
icon: "trash"
iconType: "solid"
@@ -1,5 +1,7 @@
---
title: Update Memory
seo:
title: "Update Memory Operation - Mem0"
description: Modify an existing memory by updating its content or metadata.
icon: "pen-to-square"
iconType: "solid"
+82 -29
View File
@@ -152,7 +152,7 @@
"open-source/features/multimodal-support",
"open-source/features/custom-instructions",
"open-source/features/rest-api",
"open-source/features/openai_compatibility",
"open-source/features/openai-compatibility",
"platform/features/memory-expiration"
]
},
@@ -173,14 +173,14 @@
"pages": [
"components/llms/models/openai",
"components/llms/models/anthropic",
"components/llms/models/azure_openai",
"components/llms/models/azure-openai",
"components/llms/models/ollama",
"components/llms/models/together",
"components/llms/models/groq",
"components/llms/models/litellm",
"components/llms/models/mistral_AI",
"components/llms/models/google_AI",
"components/llms/models/aws_bedrock",
"components/llms/models/mistral-ai",
"components/llms/models/google-ai",
"components/llms/models/aws-bedrock",
"components/llms/models/deepseek",
"components/llms/models/minimax",
"components/llms/models/xAI",
@@ -210,7 +210,7 @@
"components/vectordbs/dbs/mongodb",
"components/vectordbs/dbs/oracledb",
"components/vectordbs/dbs/azure",
"components/vectordbs/dbs/azure_mysql",
"components/vectordbs/dbs/azure-mysql",
"components/vectordbs/dbs/redis",
"components/vectordbs/dbs/valkey",
"components/vectordbs/dbs/elasticsearch",
@@ -218,16 +218,16 @@
"components/vectordbs/dbs/supabase",
"components/vectordbs/dbs/upstash-vector",
"components/vectordbs/dbs/vectorize",
"components/vectordbs/dbs/vertex_ai",
"components/vectordbs/dbs/vertex-ai",
"components/vectordbs/dbs/weaviate",
"components/vectordbs/dbs/faiss",
"components/vectordbs/dbs/langchain",
"components/vectordbs/dbs/baidu",
"components/vectordbs/dbs/cassandra",
"components/vectordbs/dbs/s3_vectors",
"components/vectordbs/dbs/s3-vectors",
"components/vectordbs/dbs/databricks",
"components/vectordbs/dbs/neon",
"components/vectordbs/dbs/neptune_analytics",
"components/vectordbs/dbs/neptune-analytics",
"components/vectordbs/dbs/turbopuffer"
]
}
@@ -244,15 +244,15 @@
"icon": "list",
"pages": [
"components/embedders/models/openai",
"components/embedders/models/azure_openai",
"components/embedders/models/azure-openai",
"components/embedders/models/ollama",
"components/embedders/models/huggingface",
"components/embedders/models/vertexai",
"components/embedders/models/google_AI",
"components/embedders/models/google-ai",
"components/embedders/models/lmstudio",
"components/embedders/models/together",
"components/embedders/models/langchain",
"components/embedders/models/aws_bedrock",
"components/embedders/models/aws-bedrock",
"components/embedders/models/fastembed"
]
}
@@ -271,10 +271,10 @@
"icon": "list",
"pages": [
"components/rerankers/models/cohere",
"components/rerankers/models/sentence_transformer",
"components/rerankers/models/sentence-transformer",
"components/rerankers/models/huggingface",
"components/rerankers/models/llm_reranker",
"components/rerankers/models/zero_entropy"
"components/rerankers/models/llm-reranker",
"components/rerankers/models/zero-entropy"
]
}
]
@@ -373,6 +373,7 @@
"integrations/claude-ai",
"integrations/cursor",
"integrations/codex",
"integrations/kimi",
"integrations/opencode",
"integrations/antigravity"
]
@@ -642,7 +643,7 @@
},
{
"source": "/components/rerankers/models/llm",
"destination": "/components/rerankers/models/llm_reranker"
"destination": "/components/rerankers/models/llm-reranker"
},
{
"source": "/migration/breaking-changes",
@@ -818,7 +819,7 @@
},
{
"source": "/components/llms/models/azure_openai_structured",
"destination": "/components/llms/models/azure_openai"
"destination": "/components/llms/models/azure-openai"
},
{
"source": "/components/llms/models/openai_structured",
@@ -834,7 +835,7 @@
},
{
"source": "/components/vectordbs/dbs/vertex_ai_vector_search",
"destination": "/components/vectordbs/dbs/vertex_ai"
"destination": "/components/vectordbs/dbs/vertex-ai"
},
{
"source": "/platform/features/selective-memory",
@@ -1082,7 +1083,7 @@
},
{
"source": "/components/embedders/models/google_ai",
"destination": "/components/embedders/models/google_AI"
"destination": "/components/embedders/models/google-ai"
},
{
"source": "/components/embedders/models/lm_studio",
@@ -1094,24 +1095,16 @@
},
{
"source": "/components/llms/models/google_ai",
"destination": "/components/llms/models/google_AI"
"destination": "/components/llms/models/google-ai"
},
{
"source": "/components/llms/models/mistral_ai",
"destination": "/components/llms/models/mistral_AI"
"destination": "/components/llms/models/mistral-ai"
},
{
"source": "/components/llms/models/lm_studio",
"destination": "/components/llms/models/lmstudio"
},
{
"source": "/components/vectordbs/dbs/neptune-analytics",
"destination": "/components/vectordbs/dbs/neptune_analytics"
},
{
"source": "/components/vectordbs/dbs/s3-vectors",
"destination": "/components/vectordbs/dbs/s3_vectors"
},
{
"source": "/open-source/python_quickstart",
"destination": "/open-source/python-quickstart"
@@ -1511,6 +1504,66 @@
{
"source": "/openmemory/mcp/introduction",
"destination": "https://mem0.ai/blog/introducing-openmemory-mcp"
},
{
"source": "/components/embedders/models/aws_bedrock",
"destination": "/components/embedders/models/aws-bedrock"
},
{
"source": "/components/embedders/models/azure_openai",
"destination": "/components/embedders/models/azure-openai"
},
{
"source": "/components/embedders/models/google_AI",
"destination": "/components/embedders/models/google-ai"
},
{
"source": "/components/llms/models/aws_bedrock",
"destination": "/components/llms/models/aws-bedrock"
},
{
"source": "/components/llms/models/azure_openai",
"destination": "/components/llms/models/azure-openai"
},
{
"source": "/components/llms/models/google_AI",
"destination": "/components/llms/models/google-ai"
},
{
"source": "/components/llms/models/mistral_AI",
"destination": "/components/llms/models/mistral-ai"
},
{
"source": "/components/rerankers/models/llm_reranker",
"destination": "/components/rerankers/models/llm-reranker"
},
{
"source": "/components/rerankers/models/sentence_transformer",
"destination": "/components/rerankers/models/sentence-transformer"
},
{
"source": "/components/rerankers/models/zero_entropy",
"destination": "/components/rerankers/models/zero-entropy"
},
{
"source": "/components/vectordbs/dbs/azure_mysql",
"destination": "/components/vectordbs/dbs/azure-mysql"
},
{
"source": "/components/vectordbs/dbs/neptune_analytics",
"destination": "/components/vectordbs/dbs/neptune-analytics"
},
{
"source": "/components/vectordbs/dbs/s3_vectors",
"destination": "/components/vectordbs/dbs/s3-vectors"
},
{
"source": "/components/vectordbs/dbs/vertex_ai",
"destination": "/components/vectordbs/dbs/vertex-ai"
},
{
"source": "/open-source/features/openai_compatibility",
"destination": "/open-source/features/openai-compatibility"
}
]
}
+4
View File
@@ -1,5 +1,7 @@
---
title: Overview
seo:
title: "Integrations Overview - Mem0"
description: "Overview of Mem0 integrations with popular AI frameworks and tools for persistent memory and context management."
---
@@ -15,6 +17,8 @@ Mem0 seamlessly integrates with popular AI frameworks and tools to enhance your
**Universal Integration**: Use <Link href="/platform/mem0-mcp">Mem0 MCP</Link> for a standardized protocol that works with ANY AI client.
</Callout>
Sidekick is available only in the [Claude Code plugin](/integrations/claude-code#sidekick-agent). Other plugins, including the portable package, provide memory without Sidekick.
Here are the available integrations for Mem0:
## Integrations
+2 -2
View File
@@ -22,9 +22,9 @@ pip install mem0ai agentops python-dotenv
```
2. Valid API keys:
- [AgentOps API Key](https://app.agentops.ai/dashboard/api-keys)
- [AgentOps API Key](https://app.agentops.ai/projects)
- OpenAI API Key (for LLM operations)
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-agentops" rel="nofollow">Mem0 API Key</a> (optional, for cloud operations)
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-agentops">Mem0 API Key</a> (optional, for cloud operations)
## Basic Integration Example
+1 -1
View File
@@ -23,7 +23,7 @@ pip install agno mem0ai python-dotenv
```
2. Valid API keys:
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-agno" rel="nofollow">Mem0 API Key</a>
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-agno">Mem0 API Key</a>
- OpenAI API Key (for the agent model)
## Quick Integration (Using `Mem0Tools`)
+63 -18
View File
@@ -1,16 +1,22 @@
---
title: Antigravity
description: "Add persistent memory to Google Antigravity with the Mem0 plugin: MCP server, lifecycle hooks, and slash commands."
description: "Add persistent memory to Google Antigravity with the Mem0 plugin: a search tool, lifecycle hooks, and memory skills."
---
Add persistent memory to [**Google Antigravity**](https://antigravity.google) (`agy` CLI and Desktop IDE) with the Mem0 plugin. Your agent forgets everything between sessions. Mem0 fixes that by storing decisions, preferences, and learnings so they carry over automatically.
Add persistent memory to [**Google Antigravity**](https://antigravity.google) (`agy` CLI and Desktop IDE) with the Mem0 plugin. The plugin captures completed work, and Antigravity can search those memories in later sessions.
<Info>Current plugin version: `0.3.1`.</Info>
Sidekick is available only in the [Claude Code plugin](/integrations/claude-code#sidekick-agent).
## Prerequisites
1. A Mem0 API key (starts with `m0-`):
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-antigravity" rel="nofollow">Get your API key</a> (free sign-up at <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-antigravity" rel="nofollow">app.mem0.ai</a>)
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-antigravity">Get your API key</a> (free sign-up at <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-antigravity">app.mem0.ai</a>)
2. Add it to your shell profile so it persists across sessions:
2. Python 3.10 or newer available as `python3`
3. Add the key to your shell profile so it persists across sessions:
<CodeGroup>
```bash zsh
@@ -26,22 +32,32 @@ echo 'export MEM0_API_KEY="m0-your-api-key"' >> ~/.bashrc && source ~/.bashrc
**Option A: degit** (recommended):
<Warning>
When upgrading an existing installation, move `~/.gemini/config/plugins/mem0` aside first. Installing over that directory can leave obsolete files from older plugin versions.
</Warning>
```bash
# Install the plugin (MCP server, hooks, scripts)
npx degit mem0ai/mem0/integrations/mem0-plugin ~/.gemini/config/plugins/mem0
npx degit mem0ai/mem0/integrations/antigravity-plugin ~/.gemini/config/plugins/mem0
```
This installs the MCP server, lifecycle hooks, and shared scripts.
This installs the generated Antigravity bundle with the Mem0 server, lifecycle hooks, and six memory skills.
## What's Included
| Component | Included |
|-----------|:--------:|
| MCP Server (9 memory tools) | Yes |
| Local MCP Server (`search_memories`) | Yes |
| Lifecycle Hooks | Yes |
| 16 Slash Commands | Yes |
| 6 Memory Skills | Yes |
## Available MCP Tools
## Memory tools and skills
The full plugin exposes a focused `search_memories` tool and captures completed work through lifecycle hooks. Six skills provide search, status, remember, forget, pause, and resume workflows.
If you need the full set of direct CRUD tools, connect the [hosted Mem0 MCP server](/platform/mem0-mcp) separately instead of installing both configurations under the same server name.
## Hosted MCP tools
| Tool | Description |
|------|-------------|
@@ -57,23 +73,52 @@ This installs the MCP server, lifecycle hooks, and shared scripts.
## Lifecycle Hooks
The plugin uses the same shell scripts as Claude Code, Cursor, and Codex: hooks bridge environment variables using `${extensionPath}` (Antigravity's plugin-root token).
The plugin translates Antigravity events into the shared Mem0 capture lifecycle.
| Hook | Event | What it does |
|------|-------|-------------|
| **Session start** | `SessionStart` | Loads prior memories and displays status banner |
| **User prompt** | `UserPromptSubmit` | Searches relevant memories before each message |
| **Pre-tool** | `PreToolUse` | Blocks MEMORY.md writes, enforces `user_id`/`app_id` on mem0 tools |
| **Post-tool** | `PostToolUse` | Tracks stats, scans bash errors for related memories |
| **Stop** | `Stop` | Stores a session summary at the end of every assistant turn (not just at session end) |
| **Invocation** | `PreInvocation` | Initializes the first invocation and recovers pending capture |
| **Post-tool** | `PostToolUse` | Records useful tool results and failures |
| **Stop** | `Stop` | Reads completed transcript messages and starts a background flush |
What you type is stored as yours. What the agent produces (session summaries and compaction summaries) is stored as the assistant's, so its suggestions never become your stated preferences.
Recall is explicit through `search_memories` and the search skill. The current Antigravity adapter does not inject query-specific memory during `PreInvocation` because that event does not include the user's prompt.
What you type is stored as yours. Captured agent summaries are stored as the assistant's, so its suggestions never become your stated preferences.
## Antigravity 1.1.25 workarounds
Antigravity 1.1.25 can validate a plugin's `mcp_config.json` without loading the server. Check whether Mem0 is registered:
```bash
agy mcp list
```
If `mem0` is absent, register the plugin's bundled server with Antigravity's supported global MCP command, then start a new session:
```bash
agy mcp add mem0 python3 ~/.gemini/config/plugins/mem0/core/mcp_server.py
```
The same release can send hooks with an empty `workspacePaths` array. For the `agy` CLI, pass the current repository explicitly:
```bash
MEM0_CWD="$PWD" agy
```
The adapter uses `MEM0_CWD` only when Antigravity omits the workspace. If neither value is available, it skips recall and capture instead of writing memories under an incorrect repository scope.
## Search and capture
The local `search_memories` tool accepts `query`, `top_k`, `category`, `scope` (`repo`, `dir`, or `mine`), and optional `run_id` with every scope. Use a known session ID to recall memories saved in that session; omit it to search across sessions. See [search scopes](/integrations/claude-code#search-scope) for the shared Python search contract, including legacy repository memory compatibility.
Captured prompts and responses retain their full redacted text without a per-message character cutoff. Large extraction inputs are split across requests without dropping message text; recall output and tool-result previews have separate limits.
## Troubleshooting
- **No tools appearing**: Restart your Antigravity session after installation
- **"Connection failed"**: Verify your key is set: `echo $MEM0_API_KEY`
- **MCP 401 Unauthorized**: If `${MEM0_API_KEY}` interpolation doesn't work in your `agy` version, replace with your literal key in `mcp_config.json`
- **No `mem0` entry in `agy mcp list`**: Use the Antigravity 1.1.25 global MCP registration command above
- **Hooks do not capture in the CLI**: Launch `agy` with `MEM0_CWD="$PWD"`
- **"Connection failed"**: Verify your key is set without printing it: `test -n "$MEM0_API_KEY" && echo configured`
<CardGroup cols={2}>
<Card title="Mem0 MCP Setup" icon="puzzle-piece" href="/platform/mem0-mcp">
+1 -1
View File
@@ -19,7 +19,7 @@ pip install autogen mem0ai openai python-dotenv
First, we'll import the necessary libraries and set up our configurations.
<Note>Remember to get the Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-autogen" rel="nofollow">Mem0 Platform</a>.</Note>
<Note>Remember to get the Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-autogen">Mem0 Platform</a>.</Note>
```python
import os
+2
View File
@@ -1,5 +1,7 @@
---
title: AWS Bedrock
seo:
title: "AWS Bedrock Integration with Mem0"
description: "Use Mem0 with AWS Bedrock and OpenSearch Service for cloud-native persistent semantic memory storage."
---
+5 -5
View File
@@ -18,7 +18,7 @@ In this guide, you'll:
- **Python 3.12+**
- **[uv](https://docs.astral.sh/uv/)**: Python package manager
- **Node.js 18+** and **npm**: only needed if using the web console
- A **Mem0 API key** from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev" rel="nofollow">app.mem0.ai</a>
- A **Mem0 API key** from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev">app.mem0.ai</a>
- An **OpenAI API key** (or another LLM provider supported by ChatDev)
## Setup and Configuration
@@ -39,7 +39,7 @@ cd frontend && npm install && cd ..
Set up your environment variables in a `.env` file:
<Note>Get your Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev" rel="nofollow">Mem0 Platform</a>.</Note>
<Note>Get your Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev">Mem0 Platform</a>.</Note>
```bash
MEM0_API_KEY=your-mem0-api-key
@@ -194,7 +194,7 @@ This means retrieval returns memories from **both** the user's scope and the age
| Field | Required | Description |
|-------|----------|-------------|
| `api_key` | Yes | Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev" rel="nofollow">app.mem0.ai</a> |
| `api_key` | Yes | Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev">app.mem0.ai</a> |
| `user_id` | No | Scope memories to a specific user |
| `agent_id` | No | Scope memories to a specific agent |
@@ -216,9 +216,9 @@ This means retrieval returns memories from **both** the user's scope and the age
- **No memories returned on first run**: This is expected. Memories are stored *after* the agent responds, so the first interaction has no prior context. Memories appear starting from the second interaction onward.
- **`mem0ai` not installed**: If you see `ImportError: mem0ai is required for Mem0Memory`, run `uv add mem0ai` or `pip install mem0ai` to add the dependency.
- **Invalid API key**: A wrong or expired `MEM0_API_KEY` will log errors like `Mem0 search failed` or `Mem0 add failed` but won't crash the agent. Check your key at <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev" rel="nofollow">app.mem0.ai</a>.
- **Invalid API key**: A wrong or expired `MEM0_API_KEY` will log errors like `Mem0 search failed` or `Mem0 add failed` but won't crash the agent. Check your key at <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev">app.mem0.ai</a>.
- **Pipeline headers in memories**: ChatDev automatically strips internal pipeline headers (e.g., `=== INPUT FROM TASK (user) ===`) before sending text to Mem0, so your memories stay clean.
- **Clearing test memories**: To delete memories created during testing, use the Mem0 dashboard at <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev" rel="nofollow">app.mem0.ai</a> or the Python SDK: `MemoryClient().delete_all(user_id="your-test-user")`.
- **Clearing test memories**: To delete memories created during testing, use the Mem0 dashboard at <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-chatdev">app.mem0.ai</a> or the Python SDK: `MemoryClient().delete_all(user_id="your-test-user")`.
## Key Features
+1 -1
View File
@@ -7,7 +7,7 @@ Add persistent memory to [**Claude.ai**](https://claude.ai) (the hosted web app,
## Prerequisites
1. A Mem0 Platform account: <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-claude-ai" rel="nofollow">sign up at app.mem0.ai</a>
1. A Mem0 Platform account: <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-claude-ai">sign up at app.mem0.ai</a>
2. A Claude.ai account on any plan (free, Pro, Max, Team, or Enterprise)
You don't need an API key up front: the connector uses browser-based sign-in the first time Claude calls a Mem0 tool (see [Signing in](#signing-in)).
+45 -10
View File
@@ -5,6 +5,8 @@ description: "Persistent cross-session memory for Claude Code. Install once, mem
Claude Code forgets everything between sessions. This plugin fixes that. Install it, work normally, and Claude remembers what happened across sessions.
<Info>Current plugin version: `0.3.1`.</Info>
## Prerequisites
1. A Mem0 Platform account and API key (starts with `m0-`):
@@ -40,14 +42,14 @@ claude plugin uninstall mem0@mem0-plugins # uninstall the plugin (keeps the
Once installed, memory works without any action from you:
- **Capture** happens in the background as you work. Hooks save user messages, Claude's answers, changed files, and test/build results locally. Nothing calls a model or slows your session.
- **Recall** happens automatically before Claude's first response in a new session. The plugin searches your memories with your prompt and injects up to five relevant ones.
- **Capture** happens in the background as you work. Hooks save user messages, Claude's answers, changed files, and test/build results locally. Capture records evidence locally; memory extraction runs through Mem0 in a background worker.
- **Recall** happens automatically before Claude's first response in a new session. If the first prompt has at least 20 characters, the plugin searches with that prompt and injects up to five relevant memories. For shorter prompts or later questions, use explicit search.
### Commands
| Command | What it does |
| --- | --- |
| `/mem0:search` | Search memories from earlier sessions. Supports `--top-k <n>`, `--category <name>`, and `--scope <repo\|dir\|mine>`. |
| `/mem0:search` | Search memories from earlier sessions. Supports `--top-k <n>`, `--category <name>`, `--scope <repo\|dir\|mine>`, and `--run-id <session-id>`. |
| `/mem0:status` | Check if memory is working: config, capture state, pending flushes, API key validity. |
| `/mem0:forget` | Delete your memories for this repo (shared project memory stays unless you pass `--include-project-memory`). |
| `/mem0:pause` | Pause memory capture. |
@@ -58,10 +60,12 @@ Categories for `--category`: `project_knowledge`, `decisions_and_constraints`, `
### Search tool
After the automatic first-prompt search, Claude can also call `search_memories` with a specific question, and you can run `/mem0:search` yourself. Explicit searches return up to 3 results by default (configurable to 20). All results are capped at 4,000 characters.
After the automatic first-prompt search, Claude can also call `search_memories` with a specific question, and you can run `/mem0:search` yourself. Explicit searches return up to 3 results by default (configurable to 20). The combined search output is capped at 4,000 characters by default, configurable with `max_context_chars`. This recall limit does not truncate captured messages sent for extraction.
### Sidekick agent
Sidekick is available only in Claude Code.
`mem0:sidekick` is a Sonnet coding agent that runs in a separate Git worktree. Use it to offload investigation, implementation, testing, or review without burning main-session context.
```text
@@ -71,21 +75,23 @@ Review its result and send any corrections back to the same sidekick.
Changes stay in the sidekick's worktree until the main agent reviews and copies them over. By default the worktree branches from the repo's default branch. Set `worktree.baseRef` to `"head"` in your Claude settings to branch from the current commit instead. Uncommitted changes are not copied into the sidekick's worktree.
At startup, Sidekick receives the memories already recalled for its parent session. It can also call the Mem0 search tool for its assigned task. Start and completion hooks track its work locally; completing a Sidekick task does not independently send a memory-extraction request. Sidekick returns its result, validation, and a local commit when it changes files, so the main agent can review the work before incorporating it.
## How it works
The plugin follows a simple cycle: capture during a session, extract memories in the background, recall in the next session.
<Frame>
<img src="/images/plugin-sequence.svg" alt="Sequence diagram: session start triggers first-prompt search, hooks capture activity during the session, a background worker extracts memories after every five exchanges or on idle/exit, and the next session recalls them." />
<img src="/images/plugin-sequence.svg" alt="Sequence diagram: the first user prompt triggers search, hooks capture activity during the session, a background worker extracts memories after every five exchanges or on idle/exit, and the next session recalls them." />
</Frame>
**Step by step:**
1. **Capture.** Hooks save the main agent's activity locally: user messages, Claude's answers, changed files, and short test/build results. Subagent (sidekick) output is excluded. No model calls, no blocking.
1. **Capture.** Hooks save the main agent's activity locally: user messages, Claude's answers, changed files, and short test/build results. Direct Sidekick lifecycle records stay local. Subagent results included in the main transcript can provide supporting evidence for extraction; the main agent's final response establishes the outcome. Capture does not call a model.
2. **Flush.** After every five completed exchanges, a detached background worker sends that batch to Mem0. Large exchanges flush sooner. Ending or compacting the session flushes anything remaining. If the session sits idle, an auto-flush runs after five minutes (configurable with `MEM0_CODE_IDLE_FLUSH_SECONDS`). The timer resets on each new exchange. The worker survives Claude Code exiting.
3. **Extract.** Each flush sends a single `add` call with `agent_id` (the project identity), `user_id` (you), `app_id` (the repository), and `run_id` (the session). Mem0 classifies each extracted memory as shared project knowledge or a personal preference.
3. **Extract.** Each flush sends `add` calls with `agent_id` (the project identity), `user_id` (you), `app_id` (the repository), and `run_id` (the session). Prompts and responses are redacted without a character cutoff. Large conversations are split across requests without dropping message text. Mem0 classifies each extracted memory as shared project knowledge or a personal preference.
4. **Recall.** On the next session's first prompt, the plugin searches automatically and supplies up to five relevant memories. No model is called to write the query.
@@ -110,10 +116,14 @@ Every memory carries identifiers showing where it came from:
| Identifier | What it is | Example |
| --- | --- | --- |
| `user_id` | You (personal memory only) | Your Mem0 user ID |
| `agent_id` | The project identity (shared memory only) | `acme-payments-api` |
| `agent_id` | The project identity (shared memory only) | `acme-payments-api-<hash>` |
| `app_id` | The repository (scopes both lanes) | `acme-payments-api` |
| `run_id` | The Claude Code session | The session ID |
New Git repository memories use an `agent_id` with a hash of the Git remote identity so matching owner/repository names on different hosts stay separate. Searches also include the previous unhashed `agent_id`, scoped by the repository's `app_id`, so existing shared memories remain available after upgrading. Those older memories retain their original namespace, which did not distinguish Git hosts. Local folders continue using a hash of their path.
Explicitly forgetting shared project memory with `--include-project-memory` covers both repository IDs. Without that option, shared memories are preserved.
A search returns the union of shared project memory and your personal preferences. The scope narrows the project part:
| Scope | What you get |
@@ -124,7 +134,7 @@ A search returns the union of shared project memory and your personal preference
The `dir` scope is hierarchical: a parent directory sees everything in its children, but a child never sees the parent's memories.
Pass `--run-id <session-id>` to see only what one specific session recorded. Set the default scope with the `search_scope` setting or `MEM0_CODE_SEARCH_SCOPE` env var.
The search tool accepts an optional `run_id` with every scope (`repo`, `dir`, and `mine`); `/mem0:search` exposes it as `--run-id session-id`. It restricts both shared and personal results to memories saved in that coding-agent session. Omit it to search across sessions. This is a memory filter, not a label for the session making the request; automatically filtering by the current session would hide earlier-session memories. Each memory update still records the session's `run_id`. Set the default scope with the `search_scope` setting or `MEM0_CODE_SEARCH_SCOPE` env var.
## Settings
@@ -145,7 +155,7 @@ Breaking update. Your memories carry over, most local config does not.
- **Commands replaced.** Old commands replaced by `/mem0:search`, `/mem0:status`, `/mem0:forget`, `/mem0:pause`, `/mem0:resume`, `/mem0:remember`.
- **MCP server replaced.** Nine read/write tools replaced by the single read-only `search_memories` tool.
- **Local config ignored.** `~/.mem0/settings.json` and per-project `mem0.md` files are no longer read.
- **Old memories searchable, not by category.** Normal search finds pre-upgrade memories, but category filters do not.
- **Old memories remain searchable.** Pre-upgrade memories may use different categories. Omit category filters if an older memory is missing from the results.
```bash
claude plugin marketplace update mem0-plugins
@@ -162,6 +172,31 @@ claude plugin update mem0@mem0-plugins --scope user
| Sidekick won't start | Must be in a Git repo. Check that your Claude Code version supports plugin agents and worktrees. |
| Remove the plugin | `claude plugin uninstall mem0@mem0-plugins` |
## Telemetry
The plugin sends usage events (which hook ran, timing, result counts, failure
types) so Mem0 can see what's used and what's breaking.
These events are **not anonymous**. When an API key is configured, which
installing the plugin requires, they are sent under your Mem0 account email,
the same way the Python SDK and the CLI attribute theirs. Without a key they
are sent under a random per-machine id.
Each event carries the event name, the plugin version, the harness it ran in,
your OS and Python version, timings, counts, and a coarse failure label.
Repository and session identifiers are hashed with a random salt generated on
your machine and never sent, so they cannot be linked back to a repository name
or path.
Prompts, memory text, queries, file paths, repository names, and API keys are
never sent.
Turn it off:
```bash
export MEM0_TELEMETRY=false
```
<CardGroup cols={2}>
<Card title="Mem0 MCP Setup" icon="puzzle-piece" href="/platform/mem0-mcp">
Detailed MCP configuration for all clients
+42 -40
View File
@@ -1,21 +1,27 @@
---
title: Codex
description: "Add persistent memory to OpenAI Codex with the Mem0 plugin: MCP server, lifecycle hooks, and SDK skill."
description: "Add persistent memory to OpenAI Codex with automatic capture, automatic recall, a search tool, and six memory skills."
---
Add persistent memory to [**OpenAI Codex**](https://openai.com/index/codex/) with the Mem0 plugin. Codex forgets everything between tasks. This plugin fixes that by connecting to Mem0's cloud memory layer via MCP, automatically capturing learnings at key lifecycle points, and retrieving relevant context before every response.
Add persistent memory to [**OpenAI Codex**](https://openai.com/index/codex/) with the Mem0 plugin. Codex forgets everything between tasks. This plugin fixes that by connecting to Mem0's cloud memory layer via MCP, automatically capturing learnings at key lifecycle points, and retrieving relevant context on the first prompt of a session. Codex can use the search tool for recall later in the session.
<Info>Current plugin version: `0.3.1`.</Info>
Sidekick is available only in the [Claude Code plugin](/integrations/claude-code#sidekick-agent).
## Prerequisites
Before setting up Mem0 with Codex, ensure you have:
1. A Mem0 Platform account and API key:
- <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-codex" rel="nofollow">Sign up at app.mem0.ai</a>
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-codex" rel="nofollow">Get your API key</a> (starts with `m0-`)
- <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-codex">Sign up at app.mem0.ai</a>
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-codex">Get your API key</a> (starts with `m0-`)
2. OpenAI Codex access
3. Your API key added to your shell profile (persists across sessions):
3. Python 3.10 or newer available as `python3`
4. Your API key added to your shell profile (persists across sessions):
<CodeGroup>
```bash zsh
@@ -33,7 +39,7 @@ source ~/.bashrc
### Option A: Plugin Marketplace (Recommended)
Install the full plugin including MCP server, lifecycle hooks, and SDK skill.
Install the full plugin, including automatic capture and recall, the `search_memories` tool, and six memory skills.
1. Add the Mem0 marketplace:
@@ -75,7 +81,7 @@ bearer_token_env_var = "MEM0_API_KEY"
Make sure `MEM0_API_KEY` is exported in the shell you launch Codex from, then restart Codex.
This gives you the MCP tools but not the lifecycle hooks or SDK skill.
This gives you the hosted MCP tools but not the plugin's lifecycle hooks or six memory skills.
### Managing the Plugin
@@ -88,7 +94,7 @@ codex plugin marketplace remove mem0-plugins # unregister the marketplace enti
To update, run `codex plugin marketplace upgrade` to pull the latest from the Mem0 repo.
<Info icon="check">
After either option, start a new Codex task and ask: *"List my mem0 entities"* or *"Search my memories for hello"*. If the `mem0` tools appear and respond, you're all set.
After Option A, ask Codex to search memory for a recent project decision. After Option B, ask it to list your Mem0 entities. If the matching tool responds, the connection is ready.
</Info>
## Codex Cloud
@@ -106,13 +112,16 @@ Lifecycle hooks that shell out to local scripts (Option A) are not applicable in
| Component | Plugin Install | MCP Only |
|-----------|:--------------:|:--------:|
| MCP Server (9 memory tools) | Yes | Yes |
| Lifecycle Hooks | Opt-in (see below) | No |
| Mem0 SDK Skill | Yes | No |
| Memory tools | `search_memories` | 9 CRUD tools |
| Lifecycle hooks | Yes | No |
| Native subagent memory lifecycle | Yes | No |
| Memory skills | 6 | No |
## Available MCP Tools
Mem0's Codex package does not bundle a named custom agent. If you define project or user agents under `.codex/agents/` or `~/.codex/agents/`, the full Mem0 plugin gives every native subagent the parent turn's retrieved memory context and records its completed result.
Once installed, the following tools are available in every Codex session:
## Direct MCP tools
Option B exposes the following hosted tools. The full plugin in Option A uses the focused `search_memories` tool and captures writes through lifecycle hooks.
| Tool | Description |
|------|-------------|
@@ -126,46 +135,33 @@ Once installed, the following tools are available in every Codex session:
| `delete_entities` | Delete a user/agent/app/run entity and its memories |
| `list_entities` | List users/agents/apps/runs stored in Mem0 |
## Lifecycle Hooks
## Lifecycle hooks
Unlike Claude Code, Codex has no plugin-host mechanism for auto-wiring hooks from an installed plugin: it only reads hooks from `~/.codex/hooks.json` (or `<repo>/.codex/hooks.json`). Installing the plugin (Option A) does **not** turn hooks on by itself. To enable them, run the bundled installer once against your local clone:
```bash
python3 <path-to-your-clone>/integrations/mem0-plugin/scripts/install_codex_hooks.py
```
This merges Mem0's entries into `~/.codex/hooks.json` and is idempotent (safe to re-run after upgrading). It also requires the `codex_hooks` feature flag in `~/.codex/config.toml`:
```toml
[features]
codex_hooks = true
```
The installer prints a reminder if the flag isn't set. Restart Codex after installing hooks or editing the config. To remove: `python3 .../install_codex_hooks.py --uninstall`.
Once enabled, Mem0 hooks into Codex's lifecycle to automatically manage memory:
Option A registers the hooks with the plugin. No separate hook installer or global `hooks.json` edit is required.
| Hook | Event | What it does |
|------|-------|-------------|
| **Session start** | `SessionStart` | Loads prior memories and displays status banner |
| **User prompt** | `UserPromptSubmit` | Searches relevant memories before each message |
| **Pre-tool (3 handlers)** | `PreToolUse` | Blocks MEMORY.md writes; enforces `user_id`/`app_id` on mem0 tool calls; scans files being read for relevant memory context |
| **Post-tool** | `PostToolUse` | Tracks stats, scans bash errors for related memories |
| **Stop** | `Stop` | Stores a session summary at the end of every assistant turn (not just at session end) |
| **Pre-compact** | `PreCompact` | Stores a summary before the context is compacted |
| **Session start** | `SessionStart` | Initializes the project session and recovers pending capture |
| **User prompt** | `UserPromptSubmit` | Records each prompt; searches on the first prompt when it has at least 20 characters |
| **Post-tool** | `PostToolUse` | Records useful tool outcomes for the completed exchange |
| **Subagent start** | `SubagentStart` | Reuses the parent turn's retrieved memory context in the child |
| **Subagent stop** | `SubagentStop` | Records the child transcript path and completed result |
| **Stop** | `Stop` | Captures completed work and starts a background flush when needed |
| **Pre-compact** | `PreCompact` | Flushes pending capture before context compaction |
| **Session end** | `SessionEnd` | Flushes any remaining capture in the background |
What you type is stored as yours. What Codex produces (session summaries and compaction summaries) is stored as the assistant's, so its suggestions never become your stated preferences.
What you type is stored as yours. Codex's captured responses are stored as the assistant's, so its suggestions never become your stated preferences.
## Example Workflow
```text
# Task 1: Setting up a new service
You: Create a REST API for the notifications service using Express and TypeScript.
You: Create a REST API for the notifications service using Express and TypeScript. Prefer explicit error types over generic catch-all handlers.
# Codex searches memories, finds your preferences from prior tasks.
# Mem0 stores what you said as yours:
# - Your preference: "Prefers explicit error types over generic catch-all"
# ...and what Codex did as the assistant's, in the session summary:
# ...and completed work reported by Codex as the assistant's:
# - Decision: "Notifications service uses Express + TypeScript + Zod validation"
# - Convention: "All API routes follow /api/v1/{resource} pattern"
@@ -176,12 +172,18 @@ You: Add WebSocket support for real-time notification delivery.
# Follows the same patterns established in the first task.
```
## Search and capture
The local `search_memories` tool accepts `query`, `top_k`, `category`, `scope` (`repo`, `dir`, or `mine`), and optional `run_id` with every scope. Use a known session ID to recall memories saved in that session; omit it to search across sessions. See [search scopes](/integrations/claude-code#search-scope) for the shared Python search contract, including legacy repository memory compatibility.
Captured prompts and responses retain their full redacted text without a per-message character cutoff. Large extraction inputs are split across requests without dropping message text; recall output and tool-result previews have separate limits.
## Troubleshooting
- **"Connection failed"**: Verify `MEM0_API_KEY` is set: `echo $MEM0_API_KEY`
- **No tools appearing**: Restart your Codex session after installation
- **Duplicate `mem0` MCP / "tool collision" errors**: You combined Option A with Option B. Remove the `[mcp_servers.mem0]` block from `~/.codex/config.toml`; the plugin registers it automatically
- **Hooks not firing**: Hooks are opt-in and are not installed by the marketplace install itself. Run `scripts/install_codex_hooks.py` (see [Lifecycle Hooks](#lifecycle-hooks)), confirm `codex_hooks = true` is set under `[features]` in `~/.codex/config.toml`, and restart Codex. MCP-only installs (Option B) never include hooks
- **Hooks not firing**: Confirm you installed Option A and restart Codex. MCP-only installs (Option B) do not include hooks.
<CardGroup cols={2}>
<Card title="Mem0 MCP Setup" icon="puzzle-piece" href="/platform/mem0-mcp">
+1 -1
View File
@@ -22,7 +22,7 @@ pip install crewai crewai-tools mem0ai
Import required modules and set up configurations:
<Note>Remember to get your API keys from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-crewai" rel="nofollow">Mem0 Platform</a>, [OpenAI](https://platform.openai.com) and [Serper Dev](https://serper.dev) for search capabilities.</Note>
<Note>Remember to get your API keys from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-crewai">Mem0 Platform</a>, [OpenAI](https://platform.openai.com) and [Serper Dev](https://serper.dev) for search capabilities.</Note>
```python
import os
+64 -12
View File
@@ -1,21 +1,27 @@
---
title: Cursor
description: "Add persistent memory to Cursor with the Mem0 MCP server for context-aware coding."
description: "Add persistent memory to Cursor with automatic capture, explicit recall, a search tool, and six memory skills."
---
Add persistent memory to [**Cursor**](https://cursor.com) with the Mem0 MCP server. Your AI assistant forgets everything between sessions. Mem0 fixes that by connecting Cursor to Mem0's cloud memory layer via MCP so you can save and retrieve relevant context during coding sessions.
Add persistent memory to [**Cursor**](https://cursor.com) with the Mem0 plugin. Cursor captures completed work in the background, and its agent can search relevant project context in later sessions. You can also connect only the hosted MCP server when you do not need lifecycle capture.
<Info>Current plugin version: `0.3.1`.</Info>
Sidekick is available only in the [Claude Code plugin](/integrations/claude-code#sidekick-agent).
## Prerequisites
Before setting up Mem0 with Cursor, ensure you have:
1. A Mem0 Platform account and API key:
- <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-cursor" rel="nofollow">Sign up at app.mem0.ai</a>
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-cursor" rel="nofollow">Get your API key</a> (starts with `m0-`)
- <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-cursor">Sign up at app.mem0.ai</a>
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-cursor">Get your API key</a> (starts with `m0-`)
2. Cursor installed ([cursor.com](https://cursor.com))
3. Your API key added to your shell profile (persists across sessions):
3. Python 3.10 or newer available as `python3`
4. Your API key added to your shell profile (persists across sessions):
<CodeGroup>
```bash zsh
@@ -35,13 +41,25 @@ source ~/.bashrc
## Installation
### Option A: One-Click Deeplink (MCP Only)
### Option A: Full Plugin (Recommended)
Add the Mem0 marketplace:
```bash
cursor-agent plugin marketplace add https://github.com/mem0ai/mem0
```
Open Cursor's **Customize** page or run `/plugins`, select the **Mem0 Plugins** marketplace, and install **Mem0** at user or project scope. Enter your Mem0 API key when Cursor asks for the plugin configuration, then restart Cursor.
The full plugin includes automatic capture, the `search_memories` recall tool, lifecycle hooks, and six memory skills.
### Option B: One-Click Deeplink (MCP Only)
The fastest way to get started. Click the link below to install the Mem0 MCP server directly in Cursor:
[Install Mem0 MCP in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=mem0&config=eyJtY3BTZXJ2ZXJzIjp7Im1lbTAiOnsidXJsIjoiaHR0cHM6Ly9tY3AubWVtMC5haS9tY3AvIiwiaGVhZGVycyI6eyJBdXRob3JpemF0aW9uIjoiVG9rZW4gJHtlbnY6TUVNMF9BUElfS0VZfSJ9fX19)
### Option B: npx (MCP Only)
### Option C: npx (MCP Only)
```bash
npx mcp-add \
@@ -51,7 +69,7 @@ npx mcp-add \
--clients "cursor"
```
### Option C: Manual Configuration (MCP Only)
### Option D: Manual Configuration (MCP Only)
Add the following to your `.cursor/mcp.json`:
@@ -73,9 +91,19 @@ Add the following to your `.cursor/mcp.json`:
</Info>
## Available MCP Tools
## What's included
Once installed, the following tools are available in every Cursor session:
| Component | Full plugin | MCP only |
| --- | :---: | :---: |
| Memory tools | `search_memories` | 9 CRUD tools |
| Automatic capture | Yes | No |
| Recall | `search_memories` | MCP search tools |
| Lifecycle hooks | Yes | No |
| Memory skills | 6 | No |
## MCP-only tools
Options B, C, and D expose the following hosted tools. The full plugin uses the focused `search_memories` tool and captures writes through lifecycle hooks.
| Tool | Description |
|------|-------------|
@@ -89,11 +117,29 @@ Once installed, the following tools are available in every Cursor session:
| `delete_entities` | Delete a user/agent/app/run entity and its memories |
| `list_entities` | List users/agents/apps/runs stored in Mem0 |
## Lifecycle hooks
The full plugin translates Cursor's native events into the shared Mem0 memory lifecycle:
| Cursor event | What Mem0 does |
| --- | --- |
| `sessionStart` | Initializes the project session and recovers pending capture |
| `beforeSubmitPrompt` | Observes the submitted prompt; recall stays tool-driven because this event cannot inject context |
| `postToolUse` / `postToolUseFailure` | Records useful tool results and failures |
| `afterAgentResponse` / `stop` | Captures the completed exchange |
| `preCompact` / `sessionEnd` | Flushes pending capture in the background |
<Note>
Cursor's `beforeSubmitPrompt` hook cannot add context to a prompt. Use `search_memories` to recall memories.
</Note>
The plugin does not register subagent start or stop hooks.
## Example Workflow
```text
# Session 1: Debugging a performance issue
You: The API endpoint /users is taking 3 seconds. Help me optimize it.
You: The API endpoint /users is taking 3 seconds. Help me optimize it. Prefer query-level fixes over caching.
# Cursor agent searches memories, proceeds with investigation.
# Mem0 stores what you said as yours:
@@ -109,10 +155,16 @@ You: The /orders endpoint is also slow, same pattern as before.
# Immediately checks for N+1 queries and missing indexes.
```
## Search and capture
The local `search_memories` tool accepts `query`, `top_k`, `category`, `scope` (`repo`, `dir`, or `mine`), and optional `run_id` with every scope. Use a known session ID to recall memories saved in that session; omit it to search across sessions. See [search scopes](/integrations/claude-code#search-scope) for the shared Python search contract, including legacy repository memory compatibility.
Captured prompts and responses retain their full redacted text without a per-message character cutoff. Large extraction inputs are split across requests without dropping message text; recall output and tool-result previews have separate limits.
## Troubleshooting
- **"Connection failed"**: Verify `MEM0_API_KEY` is set: `echo $MEM0_API_KEY`
- **Duplicate tools**: If you had a previous MCP config for `mem0`, remove it before installing the plugin
- **Duplicate tools**: Do not combine the full plugin with an MCP-only option. Remove the standalone `mem0` MCP entry before installing the plugin.
- **No tools appearing**: Go to Cursor Settings > MCP and verify the `mem0` server shows as connected
<CardGroup cols={2}>
+56 -16
View File
@@ -1,30 +1,44 @@
---
title: DeepSeek Harness
description: "Add persistent Mem0 memory to the DeepSeek Harness (Cordis) agent with two native tools: search and add."
description: "Add persistent memory to DeepSeek Harness with automatic recall, automatic capture, and two native Mem0 tools."
---
Add persistent memory to the [**DeepSeek Harness**](https://github.com/deepseek-ai/deepseek-harness) with `@mem0/deepseek-plugin`. The Harness agent forgets everything between sessions. This plugin gives it two Mem0-backed tools so recall and writes persist across runs, sharing the same memory bank you already use from Claude Code, Codex, and other agents.
Add persistent memory to the [**DeepSeek Harness**](https://github.com/deepseek-ai/deepseek-harness) with `@mem0/deepseek-plugin`. The plugin recalls relevant context before a model request, captures completed turns, and provides explicit Mem0 tools when the agent needs them.
<Info>Current package version: `0.3.0`.</Info>
Sidekick is available only in the [Claude Code plugin](/integrations/claude-code#sidekick-agent).
## Overview
The plugin registers two agent-callable tools:
The plugin provides automatic memory plus two agent-callable tools:
| Tool | Does |
| Capability | What it does |
|---|---|
| Automatic recall | Searches with the latest human prompt and adds unseen results to the model context |
| Automatic capture | Stores the human and assistant messages from each completed turn |
| `search_memory` | Recall facts from Mem0 relevant to a query |
| `add_memory` | Store a fact in Mem0 for future sessions |
Unlike file-based memory plugins, Mem0 is a managed backend: server-side extraction, semantic dedup, and conflict resolution, with the same memory reusable across every agent you connect.
Unlike file-based memory plugins, Mem0 is a managed backend: server-side extraction, semantic dedup, and conflict resolution, with memories reusable by integrations that use compatible user identities and search filters.
## How it works
A Cordis plugin is a module exporting `apply(ctx, config)`. This one declares `inject = ['tools']` so it waits for the harness tool registry, then registers the two tools via `ctx.tools.register(...)`. When the plugin unmounts, the tools are removed automatically (Cordis revertible effects).
A Cordis plugin is a module exporting `apply(ctx, config)`. This plugin waits for the Harness tool and system-prompt services, then uses their native extension points:
- `system-prompt/assemble` recalls memory before a model request.
- `session/event` captures only completed turns from the durable event stream.
- `ctx.tools.register(...)` exposes explicit search and add tools.
Cordis removes the listeners and tools when the plugin unmounts. Memory failures are fail-open, so a Mem0 outage does not stop the agent from completing its normal work.
DeepSeek Harness provides subagents through separate host-composition packages. This Mem0 package does not register a named Sidekick or claim child filesystem isolation. A Harness child uses Mem0 only when its own agent preset includes the Mem0 plugin.
## Prerequisites
1. A Mem0 Platform account and API key:
- <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-deepseek-plugin" rel="nofollow">Sign up at app.mem0.ai</a>
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-deepseek-plugin" rel="nofollow">Get your API key</a> (starts with `m0-`)
- <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-deepseek-plugin">Sign up at app.mem0.ai</a>
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-deepseek-plugin">Get your API key</a> (starts with `m0-`)
2. The DeepSeek Harness installed.
@@ -44,19 +58,28 @@ source ~/.bashrc
## Try it locally
1. Build the plugin:
1. Build and pack the plugin:
```sh
cd integrations/deepseek-plugin
pnpm install
pnpm install --frozen-lockfile
pnpm build
mkdir -p /tmp/mem0-deepseek-plugin
pnpm pack --pack-destination /tmp/mem0-deepseek-plugin
```
2. Point the Harness at it. Copy `cordis.example.yml`, set the absolute path to `dist/index.js` and your `userId`, then load it:
2. Install it into a disposable Harness profile so Harness supplies its peer dependencies:
```sh
pnpm dsh web --patch ./integrations/deepseek-plugin/cordis.example.yml
DSH_HOME=/tmp/mem0-dsh-dev pnpm dlx @deepseek-ai/dsh@0.1.1-rc.2 \
plugin --profile headless add /tmp/mem0-deepseek-plugin/mem0-deepseek-plugin-0.3.0.tgz
```
3. Open the web UI and ask the agent to remember something, then recall it in a later turn.
3. Copy `cordis.example.yml`, set its installed package path and your `userId`, then load it with the same profile:
```sh
DSH_HOME=/tmp/mem0-dsh-dev pnpm dlx @deepseek-ai/dsh@0.1.1-rc.2 \
web --patch ./integrations/deepseek-plugin/cordis.example.yml
```
4. Open the web UI and ask the agent to remember something, then recall it in a later turn.
The `cordis.yml` entry looks like this:
@@ -65,10 +88,12 @@ The `cordis.yml` entry looks like this:
- name: "@deepseek-ai/dsh-tools"
- insert:
- id: mem0
name: "/absolute/path/to/integrations/deepseek-plugin/dist/index.js"
name: "/tmp/mem0-dsh-dev/profiles/headless/node_modules/@mem0/deepseek-plugin/dist/index.js"
config:
# apiKey is read from MEM0_API_KEY when omitted here.
userId: "your-user-id"
autoRecall: true
autoCapture: true
# host: "https://your-onprem.mem0.ai" # optional: Platform on-prem / dedicated base URL
```
@@ -80,10 +105,25 @@ For a Mem0 Platform on-prem or dedicated deployment, point `config.host` at that
|---|---|---|---|
| `apiKey` | no | `$MEM0_API_KEY` | Mem0 platform API key |
| `userId` | yes | | Default entity that owns the memories |
| `allowUserOverride` | no | `false` | Permit model-selected access to a different user only in a trusted multi-user deployment |
| `host` | no | `api.mem0.ai` | Platform base URL (on-prem / dedicated) |
| `autoRecall` | no | `true` | Recall relevant memory before model requests |
| `autoCapture` | no | `true` | Store completed human and assistant turns |
Both tools also accept optional per-call `userId`, `agentId`, and `runId` params so a single install can partition memory by entity, agent, or session; when omitted they fall back to the configured `userId`.
Both tools also accept optional per-call `userId`, `agentId`, and `runId` params so a single install can partition memory by entity, agent, or session; `userId` defaults to the configured user, while `agentId` and `runId` are omitted unless supplied. Automatic recall and capture use the configured user without an agent, repository, or session filter. Automatic capture preserves full redacted user and assistant message text without a per-message character cutoff.
## Telemetry
Writes are tagged `source="DEEPSEEK_HARNESS"` so Mem0's backend can attribute usage to this integration.
Writes are tagged `source="DEEPSEEK_HARNESS"` so Mem0 can attribute usage to this integration. Anonymous usage events include operation names, durations, result counts, and coarse failure kinds. Queries, memory text, entity IDs, and API keys are never included. Set `MEM0_TELEMETRY=false` to opt out.
<Note>
This plugin is a developer preview and tracks the evolving DeepSeek Harness plugin API.
</Note>
## Troubleshooting
- **`MISSING_CREDENTIAL` for `deepseek-official`**: Configure `DEEPSEEK_API_KEY` through Harness's Models page or export it in the shell that launches Harness.
- **`EMFILE: too many open files, watch` on macOS**: Launch Harness with `CHOKIDAR_USEPOLLING=1`.
- **Mem0 tools do not appear**: Run Harness with `--dump-config` and confirm the final composition contains the `mem0` row and the installed `dist/index.js` path.
Per-call `userId` overrides are rejected unless the operator enables `allowUserOverride: true`. Automatic recall and capture always use the configured user.
+3 -3
View File
@@ -36,7 +36,7 @@ npx flowise start
### 2. Obtain Your Mem0 API Key
1. Navigate to the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-flowise" rel="nofollow">Mem0 API Key dashboard</a>.
1. Navigate to the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-flowise">Mem0 API Key dashboard</a>.
2. Generate or copy your existing Mem0 API Key.
### 3. Configure Mem0 Credentials
@@ -61,7 +61,7 @@ Test your memory configuration:
1. Save your Flowise configuration
2. Run a test chat and store some information
3. Verify the stored memories in the <a href="https://app.mem0.ai/dashboard/requests?utm_source=oss&utm_medium=integration-flowise" rel="nofollow">Mem0 Dashboard</a>
3. Verify the stored memories in the <a href="https://app.mem0.ai/dashboard/requests?utm_source=oss&utm_medium=integration-flowise">Mem0 Dashboard</a>
### 2. Memory Retention
@@ -88,7 +88,7 @@ Available settings include:
### Platform Configuration
Additional settings available in <a href="https://app.mem0.ai/dashboard/project-settings?utm_source=oss&utm_medium=integration-flowise" rel="nofollow">Mem0 Project Settings</a>:
Additional settings available in <a href="https://app.mem0.ai/dashboard/project-settings?utm_source=oss&utm_medium=integration-flowise">Mem0 Project Settings</a>:
1. **Custom Instructions**: Define memory extraction rules
2. **Expiration Date**: Set automatic memory cleanup periods
+2 -2
View File
@@ -22,10 +22,10 @@ pip install google-adk mem0ai python-dotenv
```
Set up your API keys:
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-google-ai-adk" rel="nofollow">Mem0 API Key</a>
- <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-google-ai-adk">Mem0 API Key</a>
- Google AI Studio API Key
<Note>Remember to get your API key from <a href="https://app.mem0.ai" rel="nofollow">Mem0 Platform</a> and set up a [Google AI Studio API Key](https://aistudio.google.com/apikey).</Note>
<Note>Remember to get your API key from <a href="https://app.mem0.ai">Mem0 Platform</a> and set up a [Google AI Studio API Key](https://aistudio.google.com/apikey).</Note>
```python
import os
+1 -1
View File
@@ -61,7 +61,7 @@ hermes memory setup
Select **mem0**, choose **Platform**, and paste your API key when prompted. The wizard writes the non-secret settings to `~/.hermes/mem0.json` and keeps the key in `~/.hermes/.env`.
<Note>Get your API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-hermes" rel="nofollow">app.mem0.ai</a>.</Note>
<Note>Get your API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-hermes">app.mem0.ai</a>.</Note>
### Option 2: Manual Configuration
+117
View File
@@ -0,0 +1,117 @@
---
title: Kimi Code
description: "Add persistent project memory to Kimi Code with automatic capture, automatic recall, Mem0 skills, and tools."
---
Kimi Code forgets project decisions between sessions. The Mem0 plugin captures completed work, recalls relevant context before a response, and gives Kimi explicit memory tools and skills.
<Info>Current plugin version: `0.3.1`.</Info>
Sidekick is available only in the [Claude Code plugin](/integrations/claude-code#sidekick-agent).
## Prerequisites
1. A Mem0 Platform account and API key:
- [Sign up at app.mem0.ai](https://app.mem0.ai?utm_source=oss&utm_medium=integration-kimi)
- [Get your API key](https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-kimi) (starts with `m0-`)
2. [Kimi Code](https://www.kimi.com/code) with plugin support.
3. Python 3.10+ and Git on your machine.
## Quick start
Export the key in the shell where you start Kimi Code:
```bash
export MEM0_API_KEY='your-mem0-api-key'
kimi
```
Inside Kimi Code, install the native plugin bundle and reload the session:
```text
/plugins install https://github.com/mem0ai/mem0/tree/main/integrations/kimi-plugin
/reload
```
Run `/plugins info mem0` to confirm that the plugin, MCP server, skills, and hooks loaded.
## What you get
- **Automatic capture:** Kimi records completed exchanges locally and flushes durable project knowledge to Mem0 in the background.
- **Automatic recall:** Relevant memories are added before Kimi answers the first prompt in a session, if that prompt has at least 20 characters.
- **Explicit search:** Kimi can call `search_memories` when it needs a more specific answer.
- **Six memory skills:** Search, status, remember, forget, pause, and resume use the same memory behavior as the other Mem0 coding-agent plugins.
- **Project scoping:** Memories stay attached to the repository, with separate personal and shared project lanes.
Credentials are redacted before memory capture. If Mem0 is unavailable, hooks fail open so Kimi can continue its normal work.
## How it works
Kimi's native lifecycle events are translated into the shared Mem0 memory lifecycle:
| Kimi event | What Mem0 does |
| --- | --- |
| `SessionStart` | Initializes the project session and recovers pending capture |
| `UserPromptSubmit` | Records each prompt; searches on the first prompt when it has at least 20 characters |
| `PostToolUse` / `PostToolUseFailure` | Records useful tool results and failures |
| `Stop` | Captures the completed exchange |
| `PreCompact` / `SessionEnd` | Flushes pending capture in the background |
The plugin does not register subagent start or stop hooks or supply parent memories to child agents.
## Verify the plugin
In one session, say:
```text
Remember exactly: the release codename for this repository is ORCHID-9274.
```
Start a new Kimi session in the same repository and ask:
```text
What is the release codename for this repository? Do not infer it from repository files.
```
Kimi should return `ORCHID-9274` from memory.
## Managing the plugin
```text
/plugins list
/plugins info mem0
/plugins disable mem0
/plugins enable mem0
/plugins remove mem0
```
Run `/reload` or start a new session after enabling, disabling, or reinstalling the plugin.
## Search and capture
The local `search_memories` tool accepts `query`, `top_k`, `category`, `scope` (`repo`, `dir`, or `mine`), and optional `run_id` with every scope. Use a known session ID to recall memories saved in that session; omit it to search across sessions. See [search scopes](/integrations/claude-code#search-scope) for the shared Python search contract, including legacy repository memory compatibility.
Captured prompts and responses retain their full redacted text without a per-message character cutoff. Large extraction inputs are split across requests without dropping message text; recall output and tool-result previews have separate limits.
## Troubleshooting
| Problem | Fix |
| --- | --- |
| Missing API key | Start Kimi from a shell where `MEM0_API_KEY` is exported. |
| Plugin changes do not appear | Run `/plugins reload`, then `/reload` or `/new`. |
| MCP server is disabled | Run `/plugins mcp enable mem0 mem0`, then `/reload`. |
| No memory in a later session | Wait a moment for the background flush, then ask Kimi to search memory explicitly. |
| Remove the plugin | Run `/plugins remove mem0`. |
<CardGroup cols={2}>
<Card title="Cursor" icon="arrow-pointer" href="/integrations/cursor">
Add the same persistent project memory to Cursor
</Card>
<Card title="Claude Code" icon="/images/provider-icons/anthropic.svg" href="/integrations/claude-code">
Use Mem0 with Claude Code and its isolated sidekick
</Card>
</CardGroup>
<Snippet file="star-on-github.mdx" />
+3 -1
View File
@@ -1,5 +1,7 @@
---
title: Langchain
seo:
title: "LangChain Integration with Mem0"
description: "Build personalized AI agents using LangChain for conversation flow and Mem0 for long-term memory retention."
---
@@ -22,7 +24,7 @@ pip install langchain langchain_openai mem0ai python-dotenv
Import required modules and set up configurations:
<Note>Remember to get the Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-langchain" rel="nofollow">Mem0 Platform</a>.</Note>
<Note>Remember to get the Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-langchain">Mem0 Platform</a>.</Note>
```python
import os
+1 -1
View File
@@ -23,7 +23,7 @@ pip install langgraph langchain-openai mem0ai python-dotenv
Import required modules and set up configurations:
<Note>Remember to get the Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-langgraph" rel="nofollow">Mem0 Platform</a>.</Note>
<Note>Remember to get the Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-langgraph">Mem0 Platform</a>.</Note>
```python
from typing import Annotated, TypedDict, List
+1 -1
View File
@@ -22,7 +22,7 @@ pip install llama-index-core llama-index-memory-mem0 python-dotenv
Set your Mem0 Platform API key as an environment variable. You can replace `<your-mem0-api-key>` with your actual API key:
<Note type="info">
You can obtain your Mem0 Platform API key from the <a href="https://app.mem0.ai/login?utm_source=oss&utm_medium=integration-llama-index" rel="nofollow">Mem0 Platform</a>.
You can obtain your Mem0 Platform API key from the <a href="https://app.mem0.ai/login?utm_source=oss&utm_medium=integration-llama-index">Mem0 Platform</a>.
</Note>
```python
+1 -1
View File
@@ -23,7 +23,7 @@ npm install @mastra/core @mastra/mem0 @ai-sdk/openai zod
Set up your environment variables:
<Note>Remember to get the Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-mastra" rel="nofollow">Mem0 Platform</a>.</Note>
<Note>Remember to get the Mem0 API key from <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-mastra">Mem0 Platform</a>.</Note>
```bash
MEM0_API_KEY=your-mem0-api-key
+4 -2
View File
@@ -1,5 +1,7 @@
---
title: n8n
seo:
title: "n8n Integration with Mem0"
description: "Add long-term memory to n8n workflows and AI Agents with the Mem0 community node, no code required."
---
@@ -14,7 +16,7 @@ Your n8n workflows start from zero on every run. The [`@mem0/n8n-nodes-mem0`](ht
## Prerequisites
1. A Mem0 API key from the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-n8n" rel="nofollow">API Keys dashboard</a> (sign up at <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-n8n" rel="nofollow">app.mem0.ai</a> if you do not have an account).
1. A Mem0 API key from the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-n8n">API Keys dashboard</a> (sign up at <a href="https://app.mem0.ai?utm_source=oss&utm_medium=integration-n8n">app.mem0.ai</a> if you do not have an account).
2. A **self-hosted** n8n instance. Installing community nodes from npm is a self-hosted feature; n8n Cloud only offers nodes that n8n has verified.
3. Owner access to that instance, since only instance owners can install community nodes.
@@ -139,7 +141,7 @@ The **User ID** is a stable string you pick to identify whose memories these are
## Troubleshooting
- **The node does not appear in the panel**: community nodes install on self-hosted n8n only, and only instance owners can install them. On n8n Cloud, this node is not yet available.
- **`401 Unauthorized`**: the API key is wrong or was revoked. Regenerate it in the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-n8n" rel="nofollow">API Keys dashboard</a> and update the credential.
- **`401 Unauthorized`**: the API key is wrong or was revoked. Regenerate it in the <a href="https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=integration-n8n">API Keys dashboard</a> and update the credential.
- **"Provide at least one of User ID, Agent ID, App ID, or Run ID"**: every Add, Search, and Get Many needs an entity scope. Fill in at least one.
- **Search returns nothing right after an Add**: extraction is asynchronous. Leave **Wait for Completion** on, or add a short Wait node before searching.
- **Searching two entity ids returns more than expected**: multiple ids are combined with OR by design. Run one operation per id to narrow.

Some files were not shown because too many files have changed in this diff Show More