Supermemory
Learn how to use the Supermemory AI SDK provider for the Vercel AI SDK.
Supermemory is a long-term memory platform that adds persistent, self-growing memory to your AI applications. The Supermemory provider for the AI SDK enables you to build AI applications with memory that works like the human brain:
- Persistent Memory: Long-term storage that grows with each interaction
- Semantic Search: Find relevant memories using natural language queries
- Automatic Memory Management: AI automatically saves and retrieves relevant information
- Easy Integration: Simple setup with existing AI SDK applications
- Memory Router: Direct integration with language model providers
- Free Tier Available: Get started with a free API key
Learn more about Supermemory's capabilities in the Supermemory Documentation.
Setup
The Supermemory provider is available in the @supermemory/tools module. You can install it with:
$ pnpm add @supermemory/tools
$ npm install @supermemory/tools
$ yarn add @supermemory/tools
$ bun add @supermemory/tools
Provider Instance
You can obtain your Supermemory API key for free at https://console.supermemory.ai.
There are two ways to integrate Supermemory with your AI applications:
1. Using Supermemory Tools
Import and use Supermemory tools with your existing AI SDK setup:
2. Using the Memory Router
Use the Memory Router for direct integration with language model providers:
Examples
Here are examples of using Supermemory with the AI SDK:
generateText with Tools
streamText with Automatic Memory
Using Memory Router
For more information about these features and advanced configuration options, visit the Supermemory Documentation.