Skip to main content

Eve + Memanto

Eve Eve gives agents long-term memory through memory slots: files under agent/memory/ that bind a storage provider to a scope, such as “each authenticated user”. @moorcheh-ai/memanto/eve provides a Memanto-backed memory provider for those slots, plus standalone tools if you’d rather wire memory yourself.
Requires @moorcheh-ai/memanto 0.2.25 or later, Node.js 24 or later, and eve 0.60 or later.

Per-user by default

The memory provider follows Eve’s scope: with byPrincipal, every authenticated user gets their own memories, and one user’s memories are never candidates for another’s recall.

Automatic recall

Before each turn, the memories most relevant to the user’s message are added to the model’s context. The model doesn’t have to remember to look.

Typed memories, not transcripts

Saves go through Memanto’s typed memory model (facts, preferences, decisions, goals, learnings), not raw conversation logs.

Visible activity, compact context

Each tool call shows a short status in Eve’s UI and channels (Recalling "coffee order" → Found 2 memories). The model receives only the fields it reasons with (content, type, confidence, date), which keeps context small.

Choose an approach

Use the memory provider for any agent that talks to more than one person.

Prerequisites

  • Node.js 24+ and eve 0.60+
  • A Moorcheh API key (or an on-prem Memanto backend)
  • For local development: uv (ships uvx), so the SDK can start a local Memanto server for you
  • For deployments: a Memanto server you run (memanto serve) that the agent can reach. Deployed Eve agents, for example on Vercel, cannot start a local server.

Install

eve and zod are optional peer dependencies of @moorcheh-ai/memanto. Eve projects already depend on both.

Memory provider

Add a memory slot:
agent/memory/memanto.ts
.env.local
Leave MEMANTO_BASE_URL empty in eve dev and the SDK starts a local Memanto server with uvx.

What happens on each turn

  1. Recall. Before the model runs, the provider searches the user’s memories with their message and adds the best matches to context as one message marked as user-provided data, not instructions. Each turn’s recall replaces the previous one, so context doesn’t pile up.
  2. Tools. The model can call memanto__remember to save something and memanto__recall to search further. Eve names provider tools <slot>__<tool>, so the names follow your slot file’s name.
  3. Capture (only with capture: true). After the turn completes, the provider extracts durable memories from the user’s messages and saves them. It skips the assistant’s replies, which often repeat memories that were just recalled.

Options

The provider also accepts the other Memanto client options, such as packageSpec and healthTimeoutMs.

Tools

Both tools are bound to the current turn’s scope. The model cannot read or write another user’s memories through them.

How users are kept apart

All scopes share one Memanto agent (agentId). Creating an agent per user would quickly run into Moorcheh namespace limits. Instead, every memory is tagged with a digest of Eve’s opaque scope key. Recall filters on that tag inside the search itself, so another scope’s memories are never candidates. byPrincipal disables memory for anonymous callers and shares one scope across eve dev. For multi-tenant agents, use a scope resolver that includes both the tenant and the caller. See Eve’s multi-tenant memory guide.

Deploying

  1. Run memanto serve somewhere your agent can reach, configured with your Moorcheh API key.
  2. Set MEMANTO_BASE_URL to that server’s URL and MOORCHEH_API_KEY to the same key.
A Memanto server that accepts non-local connections only creates and activates agents for callers presenting its key. The SDK sends apiKey for you as the X-Api-Key header.

Tools only

If you don’t want a memory slot, add the tools directly. Create the client once, in a shared module. A Memanto agent holds a single active session, so separate clients per tool file would keep invalidating each other’s session:
agent/lib/memanto.ts
Then re-export one tool per file, named to match the tool. Eve names each tool after its file, so the model sees the same names the tool descriptions use:
agent/tools/recallMemory.ts
Repeat for agent/tools/rememberMemory.ts and agent/tools/answerMemory.ts.
These tools use one Memanto agent for everyone who talks to your Eve agent. Use the memory provider when different users must not see each other’s memories.
createMemantoEveTools(memanto, options?) returns { recallMemory, rememberMemory, answerMemory }.
  • options.include: build only a subset, e.g. { include: ["recallMemory"] } for read-only access.
  • options.defaultLimit: fallback result count when the model doesn’t specify one. Must be an integer between 1 and 50. An invalid value throws immediately rather than reaching Memanto’s API.

Tell the model how to use memory

Whichever approach you choose, set expectations in agent/instructions.md:
Everything lives in a Memanto agent, so you can read, correct, and audit what your Eve agent knows with the CLI or the web UI.

Shared memory across integrations

All Memanto integration packages use the same Moorcheh-backed agents when they share an agent_id:

Next Steps