Mem0 joins Vercel Marketplace

Mem0 joins Vercel Marketplace

Mem0 joins Vercel Marketplace

Updated on

Updated on

AI Agent Memory: Build vs. Buy

AI apps ship fast on Vercel, but most of them forget everything the moment a session ends. Every conversation starts from zero, the agent asks for the same context again, and it never gets more useful the more you use it.

Today Mem0 is available as a native integration on the Vercel Marketplace. You can give your agents durable, per-user memory in one click, with billing on your Vercel invoice and no separate account to set up.

What Mem0 is

Mem0 is a memory layer for AI agents and assistants. Instead of storing raw chat logs, it extracts the durable facts from a conversation (a user's name, preferences, goals, and constraints), resolves contradictions as things change, and recalls the memories that matter for a given query. Memory is scoped per user, agent, or app, so every user gets their own.

Install it in one click

Install Mem0 from the Vercel Marketplace. Vercel provisions a scoped Mem0 project and a fresh API key, then injects four environment variables into your project:

  • MEM0_API_KEY, the scoped key for your project

  • MEM0_ORG_ID, your Mem0 organization

  • MEM0_PROJECT_ID, the provisioned project

  • MEM0_BASE_URL, the Mem0 API base URL

No separate Mem0 signup, no copying keys between dashboards, and billing rolls up onto your Vercel invoice. Your app just reads process.env.MEM0_API_KEY.

Use it in your app

Install the SDK:

npm
npm
npm

Create a client from the injected key:

import MemoryClient from "mem0ai";

const mem0 = new MemoryClient({ apiKey: process.env.MEM0_API_KEY! });
import MemoryClient from "mem0ai";

const mem0 = new MemoryClient({ apiKey: process.env.MEM0_API_KEY! });
import MemoryClient from "mem0ai";

const mem0 = new MemoryClient({ apiKey: process.env.MEM0_API_KEY! });

Save a memory. Pass the actual conversation turns rather than raw text, so Mem0's extraction can pull out the durable facts and tie them to the user:

await mem0.add(
  [{ role: "user", content: "I'm vegetarian and allergic to peanuts." }],
  { userId: "alice" }
);
await mem0.add(
  [{ role: "user", content: "I'm vegetarian and allergic to peanuts." }],
  { userId: "alice" }
);
await mem0.add(
  [{ role: "user", content: "I'm vegetarian and allergic to peanuts." }],
  { userId: "alice" }
);

Recall what is relevant before you answer:

const res = await mem0.search("What can I cook for dinner?", {
  filters: { user_id: "alice" },
});

const items = Array.isArray(res) ? res : res.results ?? [];
const memories = items.map((m) => m.memory).filter(Boolean);
// -> ["Is vegetarian", "Allergic to peanuts"]
const res = await mem0.search("What can I cook for dinner?", {
  filters: { user_id: "alice" },
});

const items = Array.isArray(res) ? res : res.results ?? [];
const memories = items.map((m) => m.memory).filter(Boolean);
// -> ["Is vegetarian", "Allergic to peanuts"]
const res = await mem0.search("What can I cook for dinner?", {
  filters: { user_id: "alice" },
});

const items = Array.isArray(res) ? res : res.results ?? [];
const memories = items.map((m) => m.memory).filter(Boolean);
// -> ["Is vegetarian", "Allergic to peanuts"]

Feed those memories into your model's context and the reply comes back personal. That is the whole loop: recall before you answer, save durable facts after. Mem0 handles the extraction, dedupe, and ranking in between.

Or start from the template

If you want to see it working end to end, start from our template: mem0-eve-template, a durable memory agent built with eve, Vercel's framework for backend AI agents. Hit Deploy in the README and Vercel clones the repo, installs the Mem0 integration, and injects your key, so you get a running memory agent with nothing to wire up.

It ships with two Mem0-backed tools. remember saves a durable fact:

export default defineTool({
  description: "Save a durable fact or preference about the user.",
  inputSchema: z.object({ content: z.string() }),
  async execute({ content }, ctx) {
    const userId = ctx.session.auth.current?.principalId ?? "default-user";
    await getMem0().add([{ role: "user", content }], { userId });
    return { saved: true };
  },
});
export default defineTool({
  description: "Save a durable fact or preference about the user.",
  inputSchema: z.object({ content: z.string() }),
  async execute({ content }, ctx) {
    const userId = ctx.session.auth.current?.principalId ?? "default-user";
    await getMem0().add([{ role: "user", content }], { userId });
    return { saved: true };
  },
});
export default defineTool({
  description: "Save a durable fact or preference about the user.",
  inputSchema: z.object({ content: z.string() }),
  async execute({ content }, ctx) {
    const userId = ctx.session.auth.current?.principalId ?? "default-user";
    await getMem0().add([{ role: "user", content }], { userId });
    return { saved: true };
  },
});

recall_memories searches long-term memory for anything relevant to the current question. The instructions tell the agent to recall before answering anything personal and to remember durable facts as they come up. Memory is scoped per user through principalId, so once you add a real auth provider, every user gets their own private memory with no code changes.

Try it: tell the agent "I'm vegetarian and allergic to peanuts," start a new session, and ask "what can I cook for dinner?" It answers with what it already knows about you.

What you can build

  • A support agent that remembers each customer's plan, past issues, and preferences, so it stops asking the same questions every time.

  • A coding assistant that remembers your stack, your conventions, and the decisions you already made.

  • A personal assistant that carries context across every conversation instead of resetting on each new chat.

Get started

GET TLDR from:

Summarize

Website/Footer

Summarize

Website/Footer

Summarize

Website/Footer

Summarize

Website/Footer