---
title: "eve Mem0 Agent"
description: "eve agent with long-term memory powered by Mem0."
url: "https://vercel.com/templates/eve/eve-mem0-agent"
links:
  repository: "https://github.com/mem0ai/eve-mem0-template"
  demo: "https://eve-mem0-demo.vercel.app/"
  deploy: "https://vercel.com/new/clone?demo-title=eve+Mem0+Agent&demo-description=eve+agent+with+long-term+memory+powered+by+Mem0.&demo-url=https%3A%2F%2Feve-mem0-demo.vercel.app%2F&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F86449-b-8-bd-2678-bb-5424-a-4-d-433009-c-4-b-1%2F8ed9706694c01ccf6f0e6eb764de5bc9%2FTemplate_Thumbnail_1600x900.png&project-name=eve+Mem0+Agent&repository-name=eve-mem0-agent&repository-url=https%3A%2F%2Fgithub.com%2Fmem0ai%2Feve-mem0-template&from=templates&products=%5B%7B%22type%22%3A%22integration%22%2C%22protocol%22%3A%22storage%22%2C%22productSlug%22%3A%22mem0%22%2C%22integrationSlug%22%3A%22mem0%22%7D%5D"
---

# eve Mem0 Agent

eve agent with long-term memory powered by Mem0.

# Mem0 eve template

An [eve](https://eve.dev) agent template with long-term memory powered by
[Mem0](https://mem0.ai). eve is Vercel's framework for durable backend AI agents;
this template wires Mem0 into an eve agent so it remembers facts and preferences
about each user across conversations, getting more helpful over time instead of
starting from scratch.

## How it works

The agent has two Mem0-backed tools:

- **`remember`** — saves a durable fact or preference (`mem0.add`).
- **`recall_memories`** — searches long-term memory for relevant facts (`mem0.search`).

The instructions (`agent/instructions.md`) tell the model to recall before answering
and to remember durable facts. Memory is scoped per user via
`ctx.session.auth.current.principalId` (see `agent/lib/mem0.ts`).

## Auth

The chat channel (`agent/channels/eve.ts`) ships with `placeholderAuth()`, the
safe default: local development works, your own Vercel deployments and the eve
TUI can reach the agent, and anonymous browser traffic is blocked in production.

Add your auth provider (Auth.js, Clerk, `vercelOidc()`) to open it to real
users. Memory is scoped per authenticated user via `principalId`, so each user
gets their own memory automatically once a provider is in place. For a throwaway
public demo where everyone shares one memory, swap `placeholderAuth()` for
`none()`.

## Run locally

```bash
npm install
vercel env pull            # pulls MEM0_API_KEY from your Vercel project
# set AI_GATEWAY_API_KEY, or link a Vercel project for model access
npm run dev                # opens the eve development REPL
```

Try it: tell the agent something ("I'm vegetarian and allergic to nuts"), start a
new session, and ask "what can I eat?" — it recalls what you told it.

## Learn more

- [Mem0 on Vercel](https://docs.mem0.ai/integrations/vercel)
- [Mem0 quickstart](https://docs.mem0.ai/platform/quickstart)
- [eve documentation](https://eve.dev/docs)

## License

Apache-2.0. See [LICENSE](https://github.com/mem0ai/eve-mem0-template/tree/main/LICENSE).

## Related Templates

### [eve Memory Agent](https://vercel.com/templates/eve/eve-memory-agent)

eve agent with long-term memory powered by Vercel Blob.

### [eve Marketing Team](https://vercel.com/templates/eve/eve-marketing-team)

Marketing team in Slack: one lead, five specialists. Blog drafts in Notion, posts in Typefully, campaigns in Resend, on approval.

### [eve Software Factory](https://vercel.com/templates/eve/eve-software-factory)

Software factory built on eve: AI agents work each stage of the development loop, and people make the judgment calls.

## Related Integrations

### [Mem0](https://vercel.com/marketplace/mem0)

Enable Persistent Memory for your Agents and AI Applications

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
