Skip to content
PluginStats

@mongodb-developer/vercel-ai-memory weekly downloads statistics

By mongodb-developer · npm · AI SDKs

MongoDB-backed persistent memory provider for the Vercel AI SDK and Vercel Eve — Session, Semantic, Procedural, Episodic, and Scratchpad memory with Atlas Vector Search (optional Atlas Automated Embedding).

View on npm Stale · Oct 17, 2026

@mongodb-developer/vercel-ai-memory has 937 recorded weekly downloads on npm, a decrease of 76.5% over the past 30 days, ranking #1402 of 2,256 tracked listings.

Weekly downloads
937
Official API · Oct 17, 2026
7-day growth
-65.7%
-1.8K weekly downloads
30-day growth
-76.5%
-3K weekly downloads
90-day growth
+338%
+723 weekly downloads
Rank
#1402
Among tracked npm listings

About @mongodb-developer/vercel-ai-memory

@mongodb-developer/vercel-ai-memory

MongoDB-backed persistent memory for the Vercel AI SDK and a first-class memory provider for Vercel Eve. Gives your agent five structured memory tiers — Session, Semantic, Procedural, Episodic, and Scratchpad — all stored in MongoDB Atlas with automatic vector search indexes and per-type retention policies. Bring your own embedding model, or let Atlas Automated Embedding (Voyage AI) generate vectors server-side with zero client embedding pipeline.

Features

• 🧠 5 memory types — session history, entity knowledge, how-to procedures, event episodes, and a temporary scratchpad • 🤖 Vercel Eve provider — drop-in mongodbMemory() for Eve's memory slots via the /eve subpath: automatic recall before every turn, automatic or agent-driven capture, and remember / forget tools — all partitioned by Eve's trusted scope key • ⚡ Atlas Automated Embedding — opt in with autoEmbed: { model: 'voyage-4' } and Atlas embeds your memories server-side (Voyage AI); no embedding API key or client pipeline required • 🔍 Atlas Vector Search — semantic retrieval powered by any Vercel AI SDK embedding model • 📏 Auto-detected dimensions — no need to configure vector dimensions; the package probes them at startup • ⏱️ Flexible retention — per-type policies: none, ttl, ttl+importance, or fully dynamic (forgetting curve) • 🗑️ Agent-driven memory_forget — let the model mark individual memories for immediate deletion • 🧩 Multi-tenant ready — custom collection/index names, extra filter fields (e.g. tenant_id), or disable types entirely • 🔄 Temporal versioning — semantic and procedural memories are versioned; history is preserved • 🏗️ Zero lock-in — works with any AI SDK model and any embedding provider (VoyageAI, OpenAI, Cohere, Google, etc.) • 🔌 Lazy connection — MongoDB connects on first tool use; call .connect() early if you prefer

Installation

Peer dependencies (install separately):

This package supports AI SDK v6 and v7 (ai@^6.0.0 || ^7.0.0). The examples use APIs such as ToolLoopAgent and isLoopFinished() that are available in both major versions.

Quick Start

mongodbMemory({ userId, sessionId }) returns the tools record directly — no spreading needed.

Session memory: two modes

The package exposes session (short-term conversation) memory in two modes, both backed by the same Mongo collection. Pick based on how much determinism you need — they can't be combined for the same session.

Mode A — Tool-driven (LLM-controlled)

Shown in the Quick Start above. The LLM sees memory with session_append / session_recent commands and decides when to call them. This is the simplest setup but not deterministic: the model sometimes skips writes (only user or only assistant turns get persisted) or skips reads (agent forgets earlier turns).

Use this for demos, prototypes, or agents where the LLM genuinely curates what belongs in the transcript.

Mode B — Hook-driven (runtime-controlled) ✅ recommended for production

Hide the session tool commands from the LLM and let the runtime read/write the transcript on every turn via Vercel AI SDK hooks. Every user, assistant, and tool turn is captured exactly once per generation, regardless of what the LLM decides.

What the hooks do:

| Hook | Method | When it runs | What it does |

| Pre | mongodbMemory.loadSession({ userId, sessionId }) | Inside prepareCall, before every LLM call | Reads prior turns from Mongo, returns ModelMessage[] you prepend to messages. | | Post | mongodbMemory.onFinish() | After the full tool loop finishes | Persists the user prompt + every assistant & tool message across all steps. |

loadSession() restores user/assistant turns only. Tool turns remain stored in Mongo as transcript/audit records, but they are not replayed as provider tool-result blocks because OpenAI Responses and Anthropic Messages reject orphan tool results without the matching prior assistant tool call.

Why experimental_context? ToolLoopAgent only accepts onFinish at construction time, but you still need per-call scope (userId, sessionId, prompt). The hook reads those from event.experimental_context, which you set inside prepareCall. You can also call mongodbMemory.onFinish({ userId, sessionId, prompt }) with a baked-in closure when using one-shot generateText / streamText.

See examples/deterministic-agent.ts for the full runnable example.

Note: The other memory tiers (semantic, procedural, episodic, scratchpad) are intentionally left under LLM control — they should be selective and content-dependent, not every-turn.

Vercel Eve

MongoDB is also available as a first-class Vercel Eve memory provider via the additive /eve subpath — layered on top of the exact same store, embeddings, vector search, retention, and forgetting logic used by the AI SDK integration.

eve is an optional peer dependency. If you only use the AI SDK integration (the root import), you don't need to install eve, and it is never bundled into the root entrypoint.

That's the whole integration. Eve owns the agent runtime and lifecycle; MongoDB provides persistent, personalized, cross-session memory. You don't write remember.ts, recall.ts, semantic_search.ts, episodic_search.ts, or forget.ts — the provider handles all of it.

How it maps to the Eve provider contract

| Eve surface | What MongoDB does |

| recall["turn.started"] | Parallel semantic / episodic / procedural vector search, returned as recalled messages before the model responds — automatically. | | capture["turn.completed"] | (When capture: "automatic") extracts & classifies durable memories and stores them. | | tools | Exposes remember and forget (Eve qualifies them as profileremember, profileforget). |

Trusted scope (security)

The MongoDB owner/user id is never supplied by the model. The adapter uses Eve's trusted ctx.memory.scope.key as the partition key for every read and write:

Two principals therefore can never retrieve each other's memories.…

Description from the npm listing.

  • mongodb
  • vercel-ai
  • ai-sdk
  • eve
  • vercel-eve
  • memory
  • agent-memory
  • vector-search
  • atlas
  • llm
  • rag

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@mongodb-developer/vercel-ai-memory weekly downloads on npm, last 90 days: 937 weekly downloads as of Oct 17, 2026, +338% over 90 days.@mongodb-developer/vercel-ai-memoryWeekly downloads on npm · Last 90 days937downloads / week+338% over 90 days01K2K3K4K5K6KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 17, 2026 · 88 observations · Updated Oc…pluginstats.com
@mongodb-developer/vercel-ai-memory weekly downloads on npm, last 90 days: 937 weekly downloads as of Oct 17, 2026, +338% over 90 days.

7/30/90-day growth

@mongodb-developer/vercel-ai-memory weekly downloads growth on npm: -65.7% over 7 days, -76.5% over 30 days, +338% over 90 days.@mongodb-developer/vercel-ai-memoryWeekly downloads growth on npm937downloads / week now7-day growth-1,794 weekly downloads-65.7%30-day growth-3,048 weekly downloads-76.5%90-day growth+723 weekly downloads+338%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@mongodb-developer/vercel-ai-memory weekly downloads growth on npm: -65.7% over 7 days, -76.5% over 30 days, +338% over 90 days.

Ranking history

@mongodb-developer/vercel-ai-memory npm ranking history: currently #1402 (by weekly downloads).@mongodb-developer/vercel-ai-memorynpm ranking · by weekly downloads · Last 90 days#1402current rank#1397#1398#1399#1400#1401#1402#1403#1404Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
@mongodb-developer/vercel-ai-memory npm ranking history: currently #1402 (by weekly downloads).

Listing placement

All npm2,256 listings · 113 pages · 1,129 shown · page 71, #3 (overall #1,403)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs250 listings · 13 pages · page 7, #9 (overall #129)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (121)
Recent weekly downloads observations for @mongodb-developer/vercel-ai-memory
Date (UTC)Weekly downloadsChange vs. previous
937-108
1,045-146
1,191-892
2,083-814
2,8970
2,897+65
2,832+101
2,731+93
2,638+113
2,525+309
2,216+14
2,202-637
2,839-649
3,488—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@mongodb-developer/vercel-ai-memory. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.