Now GA: MongoDB Vercel AI SDK Integration

November 5, 2026

What it is: The MongoDB Vercel AI SDK Integration enables persistent memory for AI applications and agents built with Vercel’s AI SDK. With this integration, developers can use MongoDB for agent state memory, user memory, metadata, and query the data using search and vector search.

Who it's for: This integration is for developers who have to build their own tooling to store memories in a data layer. That usually means designing a database schema, writing jobs to clear out old data, and setting up vector search so the application can find relevant past information by meaning instead of exact keywords. It's a lot of work to build an AI application that can remember context. This integration simplifies the process while also enabling developers to use MongoDB as the single data platform where agent state memory and operational data coexist.

Why it matters: This integration allows existing MongoDB users to build AI applications seamlessly with their current database setup, while providing new developers a compelling reason to adopt MongoDB by storing operational and agent data together in one place without needing a separate vector database.

How to get started: Developers can add memory to an existing Vercel AI SDK project in three steps. This integration works with AI SDK v6 and v7 and requires a MongoDB Atlas cluster.

  1. Install the package and its peer dependencies: npm install @mongodb-developer/vercel-ai-memory ai mongodb zod
  2. Create a memory instance with an Atlas connection string and an embedding model
  3. Pass the memory tools to the application, scoped to a user and session.
How to get started:

https://www.mongodb.com/docs/atlas/ai-integrations/vercel-ai

Read our blog post to learn more about the integration and its capabilities.