Problems solved

Technical challenges this implementation handles out of the box.
  • Persist user facts across sessions
  • Inject per-user context before every model turn
  • Keep tenant and user scope out of the model's hands
  • Gate destructive memory operations behind human approval

Use cases

Products and workflows this pattern is designed to support.
  • Remembering durable user preferences
  • Personalizing future agent sessions
  • Building tenant-isolated assistant memory
  • Testing approval-gated memory deletion

Setup

Requirements, wiring steps, and what this pattern adds to your project.

Requirements

Complexity
Intermediate
Setup time
~10 minutes
Node
24+
Memory
256MB

Getting started

Pick how you want to pull this pattern in — then wire env vars and routes the same way.

  1. 1

    Install into an empty project directory

    Shadcn Icon

    Copy the tokenized install command from the preview toolbar and run it in an empty directory so the Eve package and agent tree stay together.

  2. 2

    Install dependencies and run the verification suite

    With Node.js 24+, run `pnpm install`, `pnpm verify:discovery`, `pnpm typecheck`, `pnpm build`, and `pnpm eval`.

  3. 3

    Run the Eve development server

    Run `pnpm dev` after every verification gate passes.

Files added

20 files
  • .gitignore
  • .node-version
  • agent/agent.ts
  • agent/channels/eve.ts
  • agent/instructions.md
  • agent/instructions/memory.ts
  • agent/lib/memory-store.ts
  • agent/lib/tenant.ts
  • agent/tools/forget.ts
  • agent/tools/list_memories.ts
  • agent/tools/remember.ts
  • evals/cross-session-persistence.eval.ts
  • evals/evals.config.ts
  • evals/forget-with-approval.eval.ts
  • evals/helpers.ts
  • evals/remember-and-recall.eval.ts
  • evals/tenant-isolation.eval.ts
  • package.json
  • README.md
  • tsconfig.json

Dependencies

3 total

npm packages

3
AISDKeveZod