feat(integrations): add @mem0/eve memory provider
Give Eve agents a first-class Mem0 recall/capture provider so they can use Mem0 in the agent loop instead of MCP. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
dae67f74f5
commit
1d83bb0835
@@ -0,0 +1,36 @@
|
||||
# Eve registry contribution
|
||||
|
||||
These files are the Mem0 side of `eve add memory/mem0`. They are not published in the npm tarball. Copy them into a PR against [vercel/eve](https://github.com/vercel/eve) after `@mem0/eve` is on npm.
|
||||
|
||||
Supermemory's version of this change is [vercel/eve#2775](https://github.com/vercel/eve/pull/2775). Eve already asked Mem0 to own the package and open that PR.
|
||||
|
||||
## What the Eve PR should do
|
||||
|
||||
1. Add a `kind: "memory"` catalog item named `mem0`.
|
||||
2. Install `@mem0/eve` and declare `MEM0_API_KEY`.
|
||||
3. Write `agent/memory/mem0.ts` from [`mem0.ts`](./mem0.ts).
|
||||
4. List Mem0 on [eve.dev/docs/memory](https://eve.dev/docs/memory) next to Supermemory and Upstash.
|
||||
|
||||
[`item.json`](./item.json) is the shadcn-registry shape Eve uses for `eve add`. Adapt field names to Eve's current catalog schema if it has moved since this was written.
|
||||
|
||||
## Suggested install command
|
||||
|
||||
```bash
|
||||
eve add memory/mem0
|
||||
```
|
||||
|
||||
## Suggested docs snippet
|
||||
|
||||
```ts
|
||||
import { mem0Provider } from "@mem0/eve";
|
||||
import { defineMemory } from "eve/memory";
|
||||
import { byPrincipal } from "eve/memory/scope";
|
||||
|
||||
export default defineMemory({
|
||||
description: "Recall and manage durable context for the current user.",
|
||||
provider: mem0Provider({
|
||||
apiKey: process.env.MEM0_API_KEY!,
|
||||
}),
|
||||
scope: byPrincipal,
|
||||
});
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "mem0",
|
||||
"type": "registry:item",
|
||||
"title": "Mem0",
|
||||
"description": "Hosted semantic memory for Eve agents. Recalls relevant context before each turn, captures completed turns, and exposes search, remember, and forget tools.",
|
||||
"dependencies": ["@mem0/eve"],
|
||||
"envVars": {
|
||||
"MEM0_API_KEY": ""
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"path": "registry/mem0.ts",
|
||||
"type": "registry:file",
|
||||
"target": "agent/memory/mem0.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { mem0Provider } from "@mem0/eve";
|
||||
import { defineMemory } from "eve/memory";
|
||||
import { byPrincipal } from "eve/memory/scope";
|
||||
|
||||
export default defineMemory({
|
||||
description: "Recall and manage durable context for the current user.",
|
||||
provider: mem0Provider({
|
||||
apiKey: process.env.MEM0_API_KEY!,
|
||||
}),
|
||||
scope: byPrincipal,
|
||||
});
|
||||
Reference in New Issue
Block a user