Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 01f9f07cac | |||
| 921052d641 |
@@ -0,0 +1,212 @@
|
|||||||
|
---
|
||||||
|
title: "Shared Project Memory for a Team Repo"
|
||||||
|
description: "Give everyone on a repository one shared project memory across Claude Code, Codex, Cursor, Kimi Code and Antigravity, while personal preferences stay private."
|
||||||
|
icon: "users"
|
||||||
|
---
|
||||||
|
|
||||||
|
<Info icon="cloud">
|
||||||
|
**Works with:** Mem0 Platform · Claude Code, Codex, Cursor, Kimi Code and Antigravity plugins
|
||||||
|
</Info>
|
||||||
|
|
||||||
|
<Info icon="clock">
|
||||||
|
**Time to complete:** ~15 minutes · **Tools:** two coding agents, one Git repository
|
||||||
|
</Info>
|
||||||
|
|
||||||
|
Maya and Dev both work on `payments-api`. Maya uses Claude Code, Dev uses Codex. On Monday Maya learns the hard way that the payments service must never call the ledger API directly, and that unit tests only run with `pnpm test:unit`. On Tuesday Dev's agent has no idea, and he hits the same wall.
|
||||||
|
|
||||||
|
With the Mem0 plugins, what Maya's agent learns about the repository becomes shared project memory. Dev's agent recalls it in his next session, in a different tool, while Maya's personal preferences stay hers.
|
||||||
|
|
||||||
|
## How shared memory works
|
||||||
|
|
||||||
|
Every memory the plugin saves goes into one of two lanes:
|
||||||
|
|
||||||
|
| Lane | What goes in it | Who can read it |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| **Shared project memory** | Facts about the repository: conventions, decisions, constraints, commands and fixes that work | Everyone working on the same repository |
|
||||||
|
| **Personal memory** | Facts about you: preferred tools, style, and anything you asked to be remembered about yourself | Only you |
|
||||||
|
|
||||||
|
Mem0 picks the lane from what a fact is about. A fact about the repository goes to shared memory, a fact about you goes to personal memory.
|
||||||
|
|
||||||
|
The repository is identified by its Git remote (`origin`), so every clone of the same repo lands in the same shared lane. Claude Code, Codex, Cursor, Kimi Code and Antigravity share the same memory core, so a teammate on any of these tools reads the same project memory.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
### 1. Put the team in one Mem0 project
|
||||||
|
|
||||||
|
Memories live inside a Mem0 project. Everyone's API key must come from the **same project**, or their agents will not see each other's memories.
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
<Step title="Invite teammates to the organization">
|
||||||
|
In the [Mem0 dashboard](https://app.mem0.ai/dashboard?utm_source=oss&utm_medium=cookbook-team-memory), the team lead opens **Settings**, goes to the organization members, and uses **Invite Member**. Teammates without a Mem0 account get an email to sign up.
|
||||||
|
</Step>
|
||||||
|
<Step title="Add them to the project">
|
||||||
|
Once they have joined the organization, open the project's settings and use **Invite Member** again to add each teammate to the project. A teammate has to be in the organization before they can be added to a project.
|
||||||
|
</Step>
|
||||||
|
<Step title="Each teammate creates a key in that project">
|
||||||
|
Each teammate selects the project in the dashboard and creates their own key under [API Keys](https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=cookbook-team-memory). The default Reader role can create keys and save memories.
|
||||||
|
</Step>
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
### 2. Install the plugin with a unique user ID
|
||||||
|
|
||||||
|
Each person needs a stable user ID. Without one, the plugin uses your computer's account name, and two teammates who are both `dev` on their laptops would share a personal lane.
|
||||||
|
|
||||||
|
<Tabs>
|
||||||
|
<Tab title="Maya: Claude Code">
|
||||||
|
```bash
|
||||||
|
export MEM0_API_KEY='m0-maya-key'
|
||||||
|
claude plugin marketplace add mem0ai/mem0
|
||||||
|
claude plugin install mem0@mem0-plugins --scope user \
|
||||||
|
--config api_key="$MEM0_API_KEY" \
|
||||||
|
--config user_id="maya"
|
||||||
|
unset MEM0_API_KEY
|
||||||
|
```
|
||||||
|
|
||||||
|
Restart Claude Code, or run `/reload-plugins`. Full details: [Claude Code plugin](/integrations/claude-code).
|
||||||
|
</Tab>
|
||||||
|
<Tab title="Dev: Codex">
|
||||||
|
Add the key and a user ID to your shell profile, so Codex sees them in every session:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
echo 'export MEM0_API_KEY="m0-dev-key"' >> ~/.zshrc
|
||||||
|
echo 'export MEM0_USER_ID="dev"' >> ~/.zshrc
|
||||||
|
source ~/.zshrc
|
||||||
|
```
|
||||||
|
|
||||||
|
Then install the plugin:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
codex plugin marketplace add mem0ai/mem0
|
||||||
|
codex plugin add mem0@mem0-plugins
|
||||||
|
```
|
||||||
|
|
||||||
|
Restart Codex from a terminal that has the variables set. Full details: [Codex plugin](/integrations/codex).
|
||||||
|
</Tab>
|
||||||
|
<Tab title="Cursor">
|
||||||
|
Install the full plugin as described on the [Cursor plugin](/integrations/cursor) page. When Cursor asks for the plugin configuration, enter your API key and your name in **Memory user ID**, then restart Cursor.
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
For [Kimi Code](/integrations/kimi) and [Antigravity](/integrations/antigravity), export `MEM0_USER_ID` next to `MEM0_API_KEY` in your shell profile before starting the tool.
|
||||||
|
|
||||||
|
## Maya's session: memory gets captured
|
||||||
|
|
||||||
|
Maya opens `payments-api` in Claude Code and works normally:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Set up the unit tests for the payments service. In this repo we use pnpm, never npm,
|
||||||
|
and the payments service must never call the ledger API directly; it always goes
|
||||||
|
through the events queue.
|
||||||
|
```
|
||||||
|
|
||||||
|
Claude runs `pnpm test:unit`, the tests pass, and Maya adds one personal note:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Thanks. Personally I like very short answers with no summary at the end.
|
||||||
|
```
|
||||||
|
|
||||||
|
She does not have to save anything. The plugin flushes the session to Mem0 after every five exchanges, when the session ends or compacts, or after five idle minutes. Extraction then takes under a minute. Mem0 splits what it heard into the two lanes:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Shared project memory:
|
||||||
|
Unit tests for the payments service have been set up and pass (148 tests) using pnpm,
|
||||||
|
and the service communicates with the ledger through the events queue rather than directly
|
||||||
|
|
||||||
|
Personal memory (maya):
|
||||||
|
User prefers very short answers with no summary at the end
|
||||||
|
User prefers pnpm over npm as the package manager
|
||||||
|
```
|
||||||
|
|
||||||
|
An LLM writes each memory, so your wording will differ from these examples.
|
||||||
|
|
||||||
|
Maya can check that capture is working with `/mem0:status`.
|
||||||
|
|
||||||
|
## Dev's session: memory gets recalled
|
||||||
|
|
||||||
|
The next morning Dev opens his own clone of `payments-api` in Codex and starts with:
|
||||||
|
|
||||||
|
```text
|
||||||
|
I need to add a refund flow to the payments service. How do we run the tests here,
|
||||||
|
and how should payments talk to the ledger?
|
||||||
|
```
|
||||||
|
|
||||||
|
Before Codex answers, the plugin searches with this first prompt and adds the relevant memories to its context:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Mem0 found these relevant memories from earlier work in this repository:
|
||||||
|
1. Unit tests for the payments service have been set up and pass (148 tests) using pnpm,
|
||||||
|
and the service communicates with the ledger through the events queue rather than directly
|
||||||
|
```
|
||||||
|
|
||||||
|
Codex now uses `pnpm`, runs `pnpm test:unit`, and routes the refund through the events queue, without Dev explaining any of it. Maya's preference for short answers is not in his context: personal memory never crosses to another user.
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
Automatic recall runs on the first prompt of a session when it has at least 20 characters. Later in the session, the agent can still call `search_memories`, or you can ask it to search Mem0.
|
||||||
|
</Note>
|
||||||
|
|
||||||
|
## What else your team gets
|
||||||
|
|
||||||
|
### A fix one person finds, everyone keeps
|
||||||
|
|
||||||
|
Later that week Maya works on refunds on a feature branch. Her unit tests fail with `STRIPE_WEBHOOK_SECRET is not set`, she copies `.env.example` to `.env.test`, and the tests pass. She also mentions that refunds over $500 always need manual approval. Nobody writes any of this down.
|
||||||
|
|
||||||
|
When Dev's tests fail the same way, his agent searches Mem0 and gets:
|
||||||
|
|
||||||
|
```text
|
||||||
|
1. All unit tests now pass (152 tests) after copying .env.example to .env.test and setting
|
||||||
|
STRIPE_WEBHOOK_SECRET [learnt on branch feature/refunds]
|
||||||
|
2. Unit tests for the payments service have been set up and pass (148 tests) using pnpm, ...
|
||||||
|
3. POST /refunds endpoint added to the payments service [learnt on branch feature/refunds]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Branch-aware recall
|
||||||
|
|
||||||
|
Memories learned on a branch other than `main` or `master` come back labeled with that branch, as in `[learnt on branch feature/refunds]` above. Dev's agent knows the knowledge may not have reached `main` yet.
|
||||||
|
|
||||||
|
### Look up decisions only
|
||||||
|
|
||||||
|
Every memory gets a category: `project_knowledge`, `decisions_and_constraints`, `workflows`, `problems_and_fixes`, or `results`. To see what the team has decided about refunds:
|
||||||
|
|
||||||
|
```text
|
||||||
|
/mem0:search refunds --category decisions_and_constraints
|
||||||
|
```
|
||||||
|
|
||||||
|
```text
|
||||||
|
1. Refunds over $500 are routed to manual approval [learnt on branch feature/refunds]
|
||||||
|
2. User prefers very short answers with no summary at the end
|
||||||
|
3. User prefers pnpm over npm as the package manager
|
||||||
|
```
|
||||||
|
|
||||||
|
The team's decision comes first. Maya also sees her own preferences, because every search covers your personal memory too. Teammates never see them.
|
||||||
|
|
||||||
|
In Codex, Cursor, Kimi Code and Antigravity, the `search_memories` tool takes the same `category` argument.
|
||||||
|
|
||||||
|
## Production patterns
|
||||||
|
|
||||||
|
**Narrow recall in a monorepo.** Searches default to the whole repository. Use the `dir` scope to get project memory for the directory you are in. See [Search scope](/integrations/claude-code#search-scope).
|
||||||
|
|
||||||
|
**Forgetting stays personal by default.** `/mem0:forget` deletes your memories for the repository. Shared project memory is kept unless you pass `--include-project-memory`, so one teammate cannot wipe the team's knowledge by accident.
|
||||||
|
|
||||||
|
**Same remote, same memory.** Clones are matched by their Git `origin` URL. A repository with no remote gets a memory lane tied to its local path, which teammates cannot share.
|
||||||
|
|
||||||
|
<Warning>
|
||||||
|
OpenCode and Pi Agent keep memory per user and repository. They do not read or write the shared project lane, so use one of the five plugins above for team memory.
|
||||||
|
</Warning>
|
||||||
|
|
||||||
|
## What you built
|
||||||
|
|
||||||
|
- **One project memory per repository**, written by whoever learns something and read by everyone on the team.
|
||||||
|
- **Cross-tool recall**: knowledge captured in Claude Code reaches a teammate in Codex.
|
||||||
|
- **Fixes, decisions and branch context** that travel with the repository.
|
||||||
|
- **Private personal memory** that stays with each developer.
|
||||||
|
|
||||||
|
<CardGroup cols={2}>
|
||||||
|
<Card title="Agent Plugins Overview" icon="puzzle-piece" href="/integrations/agent-plugins">
|
||||||
|
Compare every Mem0 plugin and what each one captures and recalls.
|
||||||
|
</Card>
|
||||||
|
<Card title="Company Brain with Supabase" icon="database" href="/cookbooks/integrations/supabase">
|
||||||
|
Turn company data into shared memory that any agent can query.
|
||||||
|
</Card>
|
||||||
|
</CardGroup>
|
||||||
|
|
||||||
|
<Snippet file="star-on-github.mdx" />
|
||||||
@@ -36,7 +36,7 @@ Every cookbook opens with a **Works with** badge naming the SDK surface it uses.
|
|||||||
| [Memory-Powered Support Agent](/cookbooks/operations/support-inbox) | Operations | OSS only |
|
| [Memory-Powered Support Agent](/cookbooks/operations/support-inbox) | Operations | OSS only |
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab title="Hosted Platform">
|
<Tab title="Hosted Platform">
|
||||||
Twenty cookbooks run on the hosted Platform, using `MemoryClient` or the Mem0 MCP server with a `MEM0_API_KEY`.
|
Twenty-one cookbooks run on the hosted Platform, using `MemoryClient` or the Mem0 MCP server with a `MEM0_API_KEY`.
|
||||||
|
|
||||||
| Cookbook | Category | Works with |
|
| Cookbook | Category | Works with |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
@@ -57,6 +57,7 @@ Every cookbook opens with a **Works with** badge naming the SDK surface it uses.
|
|||||||
| [Memory-Powered Agent SDK](/cookbooks/integrations/agents-sdk-tool) | Integrations | Platform only |
|
| [Memory-Powered Agent SDK](/cookbooks/integrations/agents-sdk-tool) | Integrations | Platform only |
|
||||||
| [Persistent Mastra Agents](/cookbooks/integrations/mastra-agent) | Integrations | Platform only |
|
| [Persistent Mastra Agents](/cookbooks/integrations/mastra-agent) | Integrations | Platform only |
|
||||||
| [Search with Personal Context](/cookbooks/integrations/tavily-search) | Integrations | Platform only |
|
| [Search with Personal Context](/cookbooks/integrations/tavily-search) | Integrations | Platform only |
|
||||||
|
| [Shared Project Memory for a Team Repo](/cookbooks/integrations/team-project-memory) | Integrations | Platform only |
|
||||||
| [Automated Email Intelligence](/cookbooks/operations/email-automation) | Operations | OSS and Platform |
|
| [Automated Email Intelligence](/cookbooks/operations/email-automation) | Operations | OSS and Platform |
|
||||||
| [Content Creation Workflow](/cookbooks/operations/content-writing) | Operations | OSS and Platform |
|
| [Content Creation Workflow](/cookbooks/operations/content-writing) | Operations | OSS and Platform |
|
||||||
| [Multi-Session Research Agent](/cookbooks/operations/deep-research) | Operations | Platform only |
|
| [Multi-Session Research Agent](/cookbooks/operations/deep-research) | Operations | Platform only |
|
||||||
|
|||||||
@@ -366,6 +366,13 @@
|
|||||||
{
|
{
|
||||||
"tab": "Agent Plugins",
|
"tab": "Agent Plugins",
|
||||||
"groups": [
|
"groups": [
|
||||||
|
{
|
||||||
|
"group": "Overview",
|
||||||
|
"icon": "puzzle-piece",
|
||||||
|
"pages": [
|
||||||
|
"integrations/agent-plugins"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"group": "Coding Agents",
|
"group": "Coding Agents",
|
||||||
"icon": "terminal",
|
"icon": "terminal",
|
||||||
@@ -445,7 +452,8 @@
|
|||||||
"cookbooks/integrations/healthcare-google-adk",
|
"cookbooks/integrations/healthcare-google-adk",
|
||||||
"cookbooks/integrations/aws-bedrock",
|
"cookbooks/integrations/aws-bedrock",
|
||||||
"cookbooks/integrations/tavily-search",
|
"cookbooks/integrations/tavily-search",
|
||||||
"cookbooks/integrations/supabase"
|
"cookbooks/integrations/supabase",
|
||||||
|
"cookbooks/integrations/team-project-memory"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
|
After Width: | Height: | Size: 7.5 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Claude</title><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z" fill="#D97757" fill-rule="nonzero"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Claude Code</title><path clip-rule="evenodd" d="M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z" fill="#D97757" fill-rule="evenodd"></path></svg>
|
||||||
|
After Width: | Height: | Size: 424 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Codex</title><path d="M19.503 0H4.496A4.496 4.496 0 000 4.496v15.007A4.496 4.496 0 004.496 24h15.007A4.496 4.496 0 0024 19.503V4.496A4.496 4.496 0 0019.503 0z" fill="#fff"></path><path d="M9.064 3.344a4.578 4.578 0 012.285-.312c1 .115 1.891.54 2.673 1.275.01.01.024.017.037.021a.09.09 0 00.043 0 4.55 4.55 0 013.046.275l.047.022.116.057a4.581 4.581 0 012.188 2.399c.209.51.313 1.041.315 1.595a4.24 4.24 0 01-.134 1.223.123.123 0 00.03.115c.594.607.988 1.33 1.183 2.17.289 1.425-.007 2.71-.887 3.854l-.136.166a4.548 4.548 0 01-2.201 1.388.123.123 0 00-.081.076c-.191.551-.383 1.023-.74 1.494-.9 1.187-2.222 1.846-3.711 1.838-1.187-.006-2.239-.44-3.157-1.302a.107.107 0 00-.105-.024c-.388.125-.78.143-1.204.138a4.441 4.441 0 01-1.945-.466 4.544 4.544 0 01-1.61-1.335c-.152-.202-.303-.392-.414-.617a5.81 5.81 0 01-.37-.961 4.582 4.582 0 01-.014-2.298.124.124 0 00.006-.056.085.085 0 00-.027-.048 4.467 4.467 0 01-1.034-1.651 3.896 3.896 0 01-.251-1.192 5.189 5.189 0 01.141-1.6c.337-1.112.982-1.985 1.933-2.618.212-.141.413-.251.601-.33.215-.089.43-.164.646-.227a.098.098 0 00.065-.066 4.51 4.51 0 01.829-1.615 4.535 4.535 0 011.837-1.388zm3.482 10.565a.637.637 0 000 1.272h3.636a.637.637 0 100-1.272h-3.636zM8.462 9.23a.637.637 0 00-1.106.631l1.272 2.224-1.266 2.136a.636.636 0 101.095.649l1.454-2.455a.636.636 0 00.005-.64L8.462 9.23z" fill="url(#lobe-icons-codex-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-codex-_R_0_" x1="12" x2="12" y1="3" y2="21"><stop stop-color="#B1A7FF"></stop><stop offset=".5" stop-color="#7A9DFF"></stop><stop offset="1" stop-color="#3941FF"></stop></linearGradient></defs></svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><title>Cursor</title><rect x="0.25" y="0.25" width="23.5" height="23.5" rx="5.5" fill="#161616" stroke="#3a3a3a" stroke-width="0.5"/><g transform="translate(4.000 4.000) scale(0.66667)" fill="#ffffff" fill-rule="evenodd"><path d="M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 671 B |
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><title>Kimi</title><rect x="0.25" y="0.25" width="23.5" height="23.5" rx="5.5" fill="#161616" stroke="#3a3a3a" stroke-width="0.5"/><g transform="translate(4 4) scale(0.66667)"><path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z" fill="#1783FF"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z" fill="#fff"></path></g></svg>
|
||||||
|
After Width: | Height: | Size: 900 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><title>opencode</title><rect x="0.25" y="0.25" width="23.5" height="23.5" rx="5.5" fill="#161616" stroke="#3a3a3a" stroke-width="0.5"/><g transform="translate(4.000 4.000) scale(0.66667)" fill="#ffffff" fill-rule="evenodd"><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 359 B |
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><title>Pi</title><rect x="0.25" y="0.25" width="23.5" height="23.5" rx="5.5" fill="#161616" stroke="#3a3a3a" stroke-width="0.5"/><g transform="translate(4.000 4.000) scale(0.02857)" fill="#ffffff" fill-rule="evenodd"><path d="M420 280H280V140H0V0H420V280Z"/><path d="M560 560H420V280H560V560Z"/><path d="M140 560H0V140H140V280H280V420H140V560Z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 439 B |
@@ -0,0 +1,111 @@
|
|||||||
|
---
|
||||||
|
title: "Agent Plugins Overview"
|
||||||
|
sidebarTitle: "Overview"
|
||||||
|
description: "Add persistent memory to the coding agent or agent harness you already use. Compare the Mem0 plugins and pick yours."
|
||||||
|
---
|
||||||
|
|
||||||
|
Coding agents forget everything when a session ends: your conventions, the bug you fixed yesterday, the command that finally worked. A Mem0 plugin fixes that inside the tool you already use. It captures what matters while you work and brings it back in the next session.
|
||||||
|
|
||||||
|
<Info>
|
||||||
|
Plugins use a [Mem0 Platform](https://app.mem0.ai?utm_source=oss&utm_medium=agent-plugins-overview) account. OpenClaw and Hermes can also run fully self-hosted.
|
||||||
|
</Info>
|
||||||
|
|
||||||
|
## How a plugin works
|
||||||
|
|
||||||
|
<Steps>
|
||||||
|
<Step title="Capture">
|
||||||
|
While you work, the plugin records your prompts, the agent's answers and useful tool results. Credentials are redacted before anything leaves your machine.
|
||||||
|
</Step>
|
||||||
|
<Step title="Extract">
|
||||||
|
Mem0 turns each session into short, durable memories: project conventions, decisions, fixes that worked, and your personal preferences.
|
||||||
|
</Step>
|
||||||
|
<Step title="Recall">
|
||||||
|
In the next session, relevant memories are added to the agent's context automatically or found with a search tool, depending on the plugin.
|
||||||
|
</Step>
|
||||||
|
</Steps>
|
||||||
|
|
||||||
|
## Coding agents
|
||||||
|
|
||||||
|
<CardGroup cols={3}>
|
||||||
|
<Card title="Claude Code" icon="/images/provider-icons/claudecode-color.svg" href="/integrations/claude-code">
|
||||||
|
Automatic capture and recall, six commands, and the Sidekick agent.
|
||||||
|
</Card>
|
||||||
|
<Card title="Codex" icon="/images/provider-icons/codex-color.svg" href="/integrations/codex">
|
||||||
|
Automatic capture and recall in the Codex CLI and app.
|
||||||
|
</Card>
|
||||||
|
<Card title="Cursor" icon="/images/provider-icons/cursor.svg" href="/integrations/cursor">
|
||||||
|
Automatic capture, with recall through a search tool.
|
||||||
|
</Card>
|
||||||
|
<Card title="OpenCode" icon="/images/provider-icons/opencode.svg" href="/integrations/opencode">
|
||||||
|
Recall before every prompt and ten native memory tools.
|
||||||
|
</Card>
|
||||||
|
<Card title="Kimi Code" icon="/images/provider-icons/kimi-color.svg" href="/integrations/kimi">
|
||||||
|
Automatic capture and recall in the Kimi Code CLI.
|
||||||
|
</Card>
|
||||||
|
<Card title="Antigravity" icon="/images/provider-icons/antigravity-color.svg" href="/integrations/antigravity">
|
||||||
|
Automatic capture, with recall through a search tool.
|
||||||
|
</Card>
|
||||||
|
</CardGroup>
|
||||||
|
|
||||||
|
## Agent harnesses and chat apps
|
||||||
|
|
||||||
|
<CardGroup cols={3}>
|
||||||
|
<Card title="OpenClaw" icon="/images/provider-icons/openclaw.svg" href="/integrations/openclaw">
|
||||||
|
Recall and capture on every turn. Platform or self-hosted.
|
||||||
|
</Card>
|
||||||
|
<Card title="Hermes Agent" icon="/images/provider-icons/hermes-tile.svg" href="/integrations/hermes">
|
||||||
|
Mem0 as Hermes' memory provider. Platform or self-hosted.
|
||||||
|
</Card>
|
||||||
|
<Card title="Pi Agent" icon="/images/provider-icons/pi.svg" href="/integrations/pi-agent">
|
||||||
|
Recall before every turn and automatic capture.
|
||||||
|
</Card>
|
||||||
|
<Card title="DeepSeek Harness" icon="/images/provider-icons/deepseek-color.svg" href="/integrations/deepseek-plugin">
|
||||||
|
Automatic recall and capture with two native tools.
|
||||||
|
</Card>
|
||||||
|
<Card title="Claude.ai" icon="/images/provider-icons/claude-color.svg" href="/integrations/claude-ai">
|
||||||
|
Add the verified Mem0 connector from Claude's directory and sign in. No API key needed.
|
||||||
|
</Card>
|
||||||
|
<Card title="Any MCP client" icon="plug" href="/platform/mem0-mcp">
|
||||||
|
Your tool is not listed? Connect it to the hosted Mem0 MCP server.
|
||||||
|
</Card>
|
||||||
|
</CardGroup>
|
||||||
|
|
||||||
|
## Compare plugins
|
||||||
|
|
||||||
|
<Tabs>
|
||||||
|
<Tab title="Coding agents">
|
||||||
|
| Plugin | Auto capture | Auto recall | Skills | Team |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| [Claude Code](/integrations/claude-code) | Yes | First prompt | 6, plus Sidekick | Shared |
|
||||||
|
| [Codex](/integrations/codex) | Yes | First prompt | 6 | Shared |
|
||||||
|
| [Cursor](/integrations/cursor) | Yes | Search tool | 6 | Shared |
|
||||||
|
| [Kimi Code](/integrations/kimi) | Yes | First prompt | 6 | Shared |
|
||||||
|
| [Antigravity](/integrations/antigravity) | Yes | Search tool | 6 | Shared |
|
||||||
|
| [OpenCode](/integrations/opencode) | Yes | Every prompt | 7 | Per user |
|
||||||
|
|
||||||
|
**First prompt:** relevant memories are added before the agent answers the first prompt of a session. **Search tool:** the agent calls `search_memories` when it needs context. **Shared:** teammates on the same repo share project memory.
|
||||||
|
</Tab>
|
||||||
|
<Tab title="Harnesses and chat apps">
|
||||||
|
| Plugin | Auto capture | Auto recall | Tools | Self-hosted |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| [OpenClaw](/integrations/openclaw) | Yes | Every turn | Tools and skills | Yes |
|
||||||
|
| [Hermes Agent](/integrations/hermes) | Yes | Every turn | 4 | Yes |
|
||||||
|
| [Pi Agent](/integrations/pi-agent) | Yes | Every turn | 1 | No |
|
||||||
|
| [DeepSeek Harness](/integrations/deepseek-plugin) | Yes | Every prompt | 2 | No |
|
||||||
|
| [Claude.ai](/integrations/claude-ai) | When asked | When relevant | 9 | No |
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
Claude Code, Codex, Cursor, Kimi Code and Antigravity share the same memory core. Teammates working in the same repository, in any of these tools, read and write one shared project memory while their personal preferences stay private. See [Shared project memory for a team repo](/cookbooks/integrations/team-project-memory).
|
||||||
|
</Note>
|
||||||
|
|
||||||
|
## Which plugin should I use?
|
||||||
|
|
||||||
|
- **You code in a terminal or IDE agent:** install the plugin for that tool from the cards above. Each page has its own install steps.
|
||||||
|
- **Your team uses different agents on the same repo:** pick any of Claude Code, Codex, Cursor, Kimi Code or Antigravity. They share project memory across tools.
|
||||||
|
- **You chat in Claude:** add the [Mem0 connector](https://claude.com/connectors/mem0) from Claude's directory.
|
||||||
|
- **Your tool has no plugin:** connect it to the [hosted Mem0 MCP server](/platform/mem0-mcp).
|
||||||
|
- **You need to keep data on your own infrastructure:** use OpenClaw or Hermes in self-hosted mode.
|
||||||
|
|
||||||
|
<Snippet file="star-on-github.mdx" />
|
||||||
@@ -268,6 +268,7 @@ If the user is on a pre-current major (Python < 2, TS < 3, or a Platform call st
|
|||||||
- [Strands Agents](https://docs.mem0.ai/integrations/strands) [Both]: Use when the user is on AWS Strands and wants a native MemoryStore.
|
- [Strands Agents](https://docs.mem0.ai/integrations/strands) [Both]: Use when the user is on AWS Strands and wants a native MemoryStore.
|
||||||
|
|
||||||
### AI Coding Tools
|
### AI Coding Tools
|
||||||
|
- [Agent Plugins Overview](https://docs.mem0.ai/integrations/agent-plugins) [Platform]: Use when choosing a Mem0 plugin for a coding agent or agent harness, or comparing what each plugin captures and recalls.
|
||||||
- [Claude Code](https://docs.mem0.ai/integrations/claude-code) [Platform]: Use when wiring memory into Claude Code.
|
- [Claude Code](https://docs.mem0.ai/integrations/claude-code) [Platform]: Use when wiring memory into Claude Code.
|
||||||
- [Claude.ai](https://docs.mem0.ai/integrations/claude-ai) [Platform]: Use when connecting Mem0 to Claude.ai (the hosted web app) via a custom remote MCP connector, or when Claude's native memory seems to be crowding out mem0 tool calls.
|
- [Claude.ai](https://docs.mem0.ai/integrations/claude-ai) [Platform]: Use when connecting Mem0 to Claude.ai (the hosted web app) via a custom remote MCP connector, or when Claude's native memory seems to be crowding out mem0 tool calls.
|
||||||
- [Cursor](https://docs.mem0.ai/integrations/cursor) [Platform]: Use when adding lifecycle capture, explicit memory recall, and six memory skills to Cursor.
|
- [Cursor](https://docs.mem0.ai/integrations/cursor) [Platform]: Use when adding lifecycle capture, explicit memory recall, and six memory skills to Cursor.
|
||||||
@@ -327,6 +328,7 @@ If the user is on a pre-current major (Python < 2, TS < 3, or a Platform call st
|
|||||||
- [AWS Bedrock](https://docs.mem0.ai/cookbooks/integrations/aws-bedrock) [OSS]: Use when deploying with AWS managed model services.
|
- [AWS Bedrock](https://docs.mem0.ai/cookbooks/integrations/aws-bedrock) [OSS]: Use when deploying with AWS managed model services.
|
||||||
- [Tavily Search](https://docs.mem0.ai/cookbooks/integrations/tavily-search) [Platform]: Use when the agent layers web search on memory.
|
- [Tavily Search](https://docs.mem0.ai/cookbooks/integrations/tavily-search) [Platform]: Use when the agent layers web search on memory.
|
||||||
- [Company Brain (Mem0 Platform + Supabase)](https://docs.mem0.ai/cookbooks/integrations/supabase) [Platform]: Use to build a shared org brain on Mem0 Platform with Supabase as system of record and the MCP server as the access layer (with a new-hire onboarding demo).
|
- [Company Brain (Mem0 Platform + Supabase)](https://docs.mem0.ai/cookbooks/integrations/supabase) [Platform]: Use to build a shared org brain on Mem0 Platform with Supabase as system of record and the MCP server as the access layer (with a new-hire onboarding demo).
|
||||||
|
- [Shared Project Memory for a Team Repo](https://docs.mem0.ai/cookbooks/integrations/team-project-memory) [Platform]: Use when a team on one repository wants coding agents (Claude Code, Codex, Cursor, Kimi Code, Antigravity) to share project memory while keeping personal preferences private.
|
||||||
|
|
||||||
### Framework Examples
|
### Framework Examples
|
||||||
- [LlamaIndex React](https://docs.mem0.ai/cookbooks/frameworks/llamaindex-react) [Both]: Use when building a React UI with LlamaIndex and memory.
|
- [LlamaIndex React](https://docs.mem0.ai/cookbooks/frameworks/llamaindex-react) [Both]: Use when building a React UI with LlamaIndex and memory.
|
||||||
|
|||||||