Migrating to v2 from 1.4.x? Check the migration guide.
@supermemory/tools on npm
Check out the NPM page for more details
Installation
Quick Start
Supermemory provides awithSupermemory wrapper that enhances any VoltAgent agent config with automatic memory retrieval and storage:
Memory saving is enabled by default in the VoltAgent integration. To disable it:
How It Works
When integrated with VoltAgent, Supermemory hooks into two lifecycle events:1. Memory Retrieval (onPrepareMessages)
Before each LLM call, Supermemory automatically:- Extracts the user’s latest message
- Searches for relevant memories scoped to the
containerTag - Injects retrieved memories into the system prompt
2. Conversation Saving (onEnd)
After each agent response, the conversation is saved to Supermemory for future retrieval. This requires acustomId to be set.
Memory Modes
Configuration Options
Search Modes
ThesearchMode option controls what type of results are searched: