---
title: "eve Memory Agent"
description: "eve agent template with long-term memory powered by Mem0. Deploy from the Vercel Marketplace."
url: "https://vercel.com/templates/eve/eve-memory-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+Memory+Agent&demo-description=eve+agent+template+with+long-term+memory+powered+by+Mem0.+Deploy+from+the+Vercel+Marketplace.&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+Memory+Agent&repository-name=eve-memory-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 Memory Agent

eve agent template with long-term memory powered by Mem0. Deploy from the Vercel Marketplace.

# 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.

## Deploy

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/mem0ai/mem0-eve-template&project-name=mem0-eve-template&repository-name=mem0-eve-template&integration-ids=oac_rTG82TypBWqzWTr1IpOUG7EB)

Deploy clones this repo and installs the Mem0 integration, which sets `MEM0_API_KEY`
on your project automatically. Model access uses the Vercel AI Gateway through your
linked project.

## 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 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.
