Introducing the MongoDB Vercel AI SDK Integration: Persistent Memory for AI Applications

MongoDB Blog · 软件开发

We are excited to announce the release of the MongoDB Vercel AI SDK integration, which provides AI applications and agents built with Vercel’s SDK with a persistent memory store in MongoDB Atlas. It's now open source and generally available on npm. This integration adds MongoDB Atlas as the memory store in the existing Vercel AI SDK code. Once installed, the package connects Vercel AI SDK applications to MongoDB Atlas and automatically stores the application's memories in documents. This allows the application to retain memories about conversations, user facts, and past events that persist across sessions, users, and restarts. What is the Vercel AI SDK? The Vercel AI SDK is a TypeScript toolkit for building AI applications. It handles calling models, streaming responses, using tools, and running agents that work through multi-step tasks. The SDK doesn't include a database to persist memories between runs. Without memory, an AI application starts every conversation with no knowledge of the last one. It doesn't know who the user is, what they asked yesterday, or what it learned along the way. It doesn’t have any context. Today, developers have to build their own tooling to store memories in a 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 semantic meaning instead of just keywords. It's a lot of work to build an AI application that can remember context. What types of memory does an AI application need? An AI application needs five kinds of memory, each kept for a different length of time and retrieved differently. This integration automatically categorizes each type of memory and stores it in MongoDB Atlas; here are short definitions of the five memory types: Session: The conversation an application or agent has in each session. This helps the application follow what the user just said. Semantic: Facts about people, entities, and preferences

查看原文