Eve + Memanto
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
eve0.60+ - A Moorcheh API key (or an on-prem Memanto backend)
- For local development:
uv(shipsuvx), 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
MEMANTO_BASE_URL empty in eve dev and the SDK starts a local Memanto server with uvx.
What happens on each turn
- 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.
- Tools. The model can call
memanto__rememberto save something andmemanto__recallto search further. Eve names provider tools<slot>__<tool>, so the names follow your slot file’s name. - 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
- Run
memanto servesomewhere your agent can reach, configured with your Moorcheh API key. - Set
MEMANTO_BASE_URLto that server’s URL andMOORCHEH_API_KEYto the same key.
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
agent/tools/recallMemory.ts
agent/tools/rememberMemory.ts and agent/tools/answerMemory.ts.
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 inagent/instructions.md:
Shared memory across integrations
All Memanto integration packages use the same Moorcheh-backed agents when they share anagent_id:
Next Steps
- Eve integration source
- Eve on GitHub
- TypeScript SDK Reference for the full
Memantoclient API - Remember API
- Recall API