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:
Himanshu-Sangshetti
2026-09-09 10:01:26 +08:00
co-authored by Cursor
parent dae67f74f5
commit 1d83bb0835
37 changed files with 5063 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
import { describe, expect, it } from "vitest";
import { captureCompletedTurn } from "../src/capture.js";
import { createFakeStore } from "./helpers.js";
describe("captureCompletedTurn", () => {
it("adds the current turn under the locked scope", async () => {
const store = createFakeStore();
const captured = await captureCompletedTurn({
store,
scopeKey: "scope_abc",
infer: true,
metadata: { source: "eve" },
turnInput: [{ role: "user", content: "I am vegetarian" }],
messages: [
{ role: "user", content: "I am vegetarian" },
{ role: "assistant", content: "Got it." },
],
});
expect(captured).toBe(true);
expect(store.added).toEqual([
{
userId: "scope_abc",
messages: [
{ role: "user", content: "I am vegetarian" },
{ role: "assistant", content: "Got it." },
],
},
]);
});
it("does not write when the turn has no user text", async () => {
const store = createFakeStore();
const captured = await captureCompletedTurn({
store,
scopeKey: "scope_abc",
infer: true,
metadata: {},
turnInput: [],
messages: [],
});
expect(captured).toBe(false);
expect(store.added).toEqual([]);
});
});