Skip to main content
Supermemory integrates with VoltAgent, providing long-term memory capabilities for AI agents. Your VoltAgent applications will remember past conversations and provide personalized responses based on user history.
Migrating to v2 from 1.4.x? Check the migration guide.

@supermemory/tools on npm

Check out the NPM page for more details

Installation

Set up your API key as an environment variable:
You can obtain an API key from console.supermemory.ai.

Quick Start

Supermemory provides a withSupermemory 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 a customId to be set.

Memory Modes

Configuration Options

When threshold or limit is omitted, the selected Supermemory backend route applies its own default. Set them explicitly when you need consistent search tuning across modes.

Search Modes

The searchMode option controls what type of results are searched: