Supermemory
tip
1,234 GitHub stars — Persistent memory across OpenCode sessions. Agents remember context, decisions, and project knowledge between conversations.
Overview
Supermemory gives OpenCode agents durable memory that persists across sessions. Instead of starting fresh each time, the agent can recall past decisions, known patterns, project conventions, and important context from previous conversations — enabling a continuous, learning interaction model.
When to Use
| Scenario | Benefit |
|---|---|
| Long-term projects | Agents remember architectural decisions and conventions |
| Onboarding new agents | Shared context reduces ramp-up time for new sessions |
| Repeated workflows | Agents learn and optimize familiar procedures |
| Cross-session knowledge | Decisions from one session inform the next |
How It Works
- Capture — During a session, the agent identifies important context: decisions, patterns, file locations, conventions.
- Store — Supermemory persists this information to a durable store (local file or cloud-backed).
- Retrieve — In subsequent sessions, the agent pulls relevant memories into context automatically.
- Update — Memories can be refined, corrected, or invalidated as the project evolves.
Installation
- npm
- Local
{
"plugin": ["opencode-supermemory"]
}
git clone https://github.com/supermemoryai/opencode-supermemory.git ~/.config/opencode/plugins/opencode-supermemory
Configuration
Basic Setup
{
"plugin": ["opencode-supermemory"],
"supermemory": {
"store": "local",
"path": "~/.opencode/memory.json"
}
}
Cloud-Backed Storage
{
"plugin": ["opencode-supermemory"],
"supermemory": {
"store": "cloud",
"api_key": "${SUPERMEMORY_API_KEY}"
}
}
Usage
Automatic Memory
Once installed, the agent automatically saves and retrieves context:
When working on authentication, remember we decided to use session-based auth with refresh tokens.
The next session will recall this decision when authentication topics arise.
Manual Memory Management
/supermemory list # Show all stored memories
/supermemory search auth # Search for authentication-related memories
/supermemory delete <id> # Remove a specific memory
Memory in Commands
{
"command": {
"with-context": {
"description": "Work with full project memory",
"template": "Load the project context from Supermemory and help me implement $ARGUMENTS."
}
}
}
Best Practices
Be Explicit About What to Remember
- Tell the agent explicitly when something should be persisted.
- Use structured statements: "Remember that the API base URL is https://api.example.com/v2."
Review and Curate Memories
- Periodically review stored memories for accuracy.
- Remove or update memories that are no longer relevant.
- Contradictory memories confuse agents — keep them clean.
Granularity
- Save high-level decisions and conventions, not every minor detail.
- Avoid storing code snippets that will change; store patterns and references instead.
GitHub
- Repo: supermemoryai/opencode-supermemory
- npm:
opencode-supermemory - Topics:
memory,persistence,knowledge-base - Category: Context / Memory