> ## Documentation Index
> Fetch the complete documentation index at: https://docs.claude-mem.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# eve Integration

> Give an eve agent your claude-mem memory — recall before every turn, search and save tools, and a one-click personal agent template with iMessage

## Overview

[eve](https://eve.dev) is Vercel's framework for durable backend agents. The `claude-mem/eve` memory provider connects an eve memory slot to your claude-mem memory on [cmem.ai](https://cmem.ai). An agent deployed on Vercel can then recall what you did in Claude Code, Codex, and your other claude-mem clients.

The provider does three things:

1. **Recall.** Before every turn, it runs one search (`dumb_search`) for the user's message. The matches go into the model's context as data, not instructions. This makes no inference calls.
2. **Tools.** The model gets `<slot>__search`, which looks further back, and `<slot>__remember`, which saves one note.
3. **No automatic capture.** Turns are never saved on their own. See [Why there is no automatic capture](#why-there-is-no-automatic-capture).

## One-click template

The [eve agent with claude-mem template](https://github.com/thedotmack/claude-mem/tree/main/integrations/eve/template) is a personal agent with password-protected web chat and claude-mem memory. To deploy it, click **Deploy with Vercel** in the template README and enter two values:

| Variable | Value |
| - | - |
| `EVE_CHAT_PASSWORD` | A strong password, 16 or more characters |
| `CLAUDE_MEM_API_KEY` | Your key from [cmem.ai/pro/key](https://cmem.ai/pro/key) |

The template uses eve's default model, `anthropic/claude-sonnet-5`, through Vercel AI Gateway. The AI Gateway free tier does not include Claude models. Add AI Gateway credits, or change `model` in `agent/agent.ts`.

### iMessage

iMessage is an eve channel add-on. Add one from the project, then redeploy:

```bash theme={null}
npx eve add channel/linq     # or: npx eve add channel/photon
```

Set `CLAUDE_MEM_OWNER_PHONE` to your own phone number or Apple ID. Texts from that handle get your memory. Texts from anyone else get none. The template README shows how to ignore strangers' texts entirely.

## Add claude-mem to an existing eve agent

```bash theme={null}
npm install claude-mem
```

```ts title="agent/memory/claude-mem.ts" theme={null}
import { claudeMem } from "claude-mem/eve";
import { defineMemory } from "eve/memory";
import { byPrincipal } from "eve/memory/scope";

export default defineMemory({
  description: "Recall and save durable context for the current user.",
  provider: claudeMem({ apiKey: process.env.CLAUDE_MEM_API_KEY }),
  scope: byPrincipal,
});
```

The filename makes the slot `claude-mem`, so the tools are `claude-mem__search` and `claude-mem__remember`. The provider requires eve 0.84.0 or later and Node.js 24 or later.

## Options

| Option | Default | Meaning |
| - | - | - |
| `apiKey` | required | cmem.ai key. The agent fails to build when it is missing. |
| `project` | one per scope | The claude-mem project that saves go into and that reads come from. The default is `eve-<sha256 of the eve scope key>`, so separate callers never share memory. |
| `searchAllProjects` | `false` | Recall and search read every project the key can see, instead of only `project`. |
| `baseUrl` | `https://cmem.ai` | Override for testing. |

## Security

* **The key owns the memory.** A cmem.ai key reads and writes one person's memory. The default configuration keeps each eve scope in its own project, and every search filters on that project on the server.
* **Only use `searchAllProjects` for a single-owner agent.** With it on, anyone the slot's scope admits can read the key owner's whole memory. Make `scope` return `null` for everyone else, the way the template does.
* **Tools are bound to the scope.** The model cannot point `search` or `remember` at another project.
* **Recalled text is data.** It arrives inside `<claude_mem_recall>` with markup escaped, and is placed as a user message, never as system instructions.
* **Saving needs write access.** A Pro key from cmem.ai/pro/key can read and write. A read-only key still recalls and searches, and `remember` reports that saving is not allowed. On the server, cmem.ai drops `<private>` regions and redacts secrets from saved notes.
* **Failures are visible.** If cmem.ai can't be reached, the turn still runs. The provider logs `[claude-mem/eve] recall failed` and tells the model memory was unavailable. A cancelled turn is not reported as a memory failure.

## Why there is no automatic capture

eve may run a capture handler again with the same operation ID, for example when an interrupted step retries. A provider must therefore make capture idempotent. cmem.ai's `save_memory` gives every call a new ID, so a retried capture would save the same turn twice. Until the hosted API accepts an idempotency key, capture stays off. Saves happen only when the model calls `remember`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.