MemorySync
Getting Started

Eve Memory

The first installable memory package for Eve, Vercel’s filesystem-first framework for durable backend AI agents: three one-line mounts give any Eve agent persistent, per-user memory — idempotent turn persistence, budgeted turn-scoped recall, and an auth-derived identity ladder. Install eve-memorysync from npm.

Three one-line mounts

npm install eve-memorysync

Set MEMORYSYNC_API_KEY in the agent’s environment and run eve dev. Eve resolves dynamic instructions on turn.started before the resolver can see the inbound user text, so the channel records the utterance first — that is the single stashUtterance line. The recall block is turn-scoped: Eve replaces the previous turn’s block, so only the latest recall is ever in the prompt.

Engineering guarantees

  • A memory failure can never fail a turn. A thrown Eve hook fails the whole turn, so every handler is fully guarded: API errors, timeouts, quota limits, and dead networks degrade to a [memorysync] log line.
  • Retries converge, never duplicate. Deterministic role@eve::<session>#h<hash> seeds absorb Eve’s at-least-once redelivery.
  • Recall is budgeted. The turn.started resolver fails open after 1.2s (configurable) — slow memory cannot stall the agent.
  • Stash misses degrade, not die. On multi-isolate hosts where onMessage and turn.started may run in different processes, a stash miss falls back to a profile recall instead of silently skipping memory. Set fallbackRecall: 'skip' to opt out.
  • Identity comes from auth, never the model. Ladder: your resolveUserId(ctx) → session auth principal (current, then initiator) → defaultUserIdMEMORYSYNC_DEFAULT_USER_IDdefault. Tool arguments cannot select another user’s memory.
  • Loud startup, silent runtime. Factories throw at agent build time when no API key is configured — a memory product silently running with memory off is worse than a visible failure.
  • Tool-call boundaries are skipped; only assistant messages the user actually saw persist. Turns truncate at 16,000 characters.
// agent/tools/search_memories.ts — search-only, no deletes
import { createMemoryTool } from 'eve-memorysync'
export default createMemoryTool()

The landscape

ZepMem0Supermemory / LettaMemorySync
Eve integration⚠ copy-paste example (no package)✗ none (generic Vercel env-var installer)✗ nothing at allfirst installable package
Retry safety✗ at-least-once hooks duplicate turns✓ idempotent seeds converge
Utterance stash✗ unbounded in-process Maps; multi-isolate = silent recall loss✓ TTL + bounds + create-session queue, profile-recall fallback on misses
Recall budget✗ none — a slow search stalls the turn✓ 1.2s fail-open
Message limits✗ silently rejects >4,096-char messages✓ 16k with explicit truncation
Identity✗ shared demo-user fallback footgun✓ auth-principal ladder, never model-provided

Supported versions

SurfaceRequiresVerified on
eve-memorysync 1.0.0Node.js 24+ (Eve’s own minimum); eve >=0.40 <1 as a peer dependency32 CI checks against the REAL eve package (defineHook/defineDynamic/defineTool brand their definitions, so acceptance proves real-agent wiring): at-least-once replay convergence, tool-call skips, stash TTL/bounds and the create-session handoff, the fail-open recall budget, the identity ladder, 16k truncation, quota modes, and the search-only tool

Where to go next

Was this page helpful?