bunx opencode-supermemory install
Then get your API key from console.supermemory.ai and set it:
export SUPERMEMORY_API_KEY="sm_..."
Or let your agent do it - paste this into OpenCode:
Install opencode-supermemory by following https://raw.githubusercontent.com/supermemoryai/opencode-supermemory/main/README.md
If you're an LLM agent helping set up opencode-supermemory, follow these steps:
bunx opencode-supermemory install --no-tui
This will:
~/.config/opencode/opencode.jsonc/supermemory-init commandcat ~/.config/opencode/opencode.jsonc
Should contain:
{
"plugin": ["opencode-supermemory"]
}
If not, add it manually:
JSONC:
{
"plugin": [
"opencode-supermemory"
// ... other plugins
]
}
JSON:
{
"plugin": ["opencode-supermemory"]
}
Ask the user to get their API key from console.supermemory.ai.
Then set it via environment variable:
export SUPERMEMORY_API_KEY="sm_..."
Or create ~/.config/opencode/supermemory.jsonc:
{
"apiKey": "sm_..."
}
Tell the user to restart OpenCode and run:
opencode -c
They should see supermemory in the tools list. If not, check:
SUPERMEMORY_API_KEY set?opencode.jsonc?tail ~/.opencode-supermemory.logRun /supermemory-init to have the agent explore and memorize the codebase.
Create ~/.config/opencode/supermemory.jsonc:
{
// API key (can also use SUPERMEMORY_API_KEY env var)
"apiKey": "sm_...",
// Min similarity for memory retrieval (0-1)
"similarityThreshold": 0.6,
// Max memories injected per request
"maxMemories": 5,
// Max project memories listed
"maxProjectMemories": 10,
// Max profile facts injected
"maxProfileItems": 5,
// Include user profile in context
"injectProfile": true,
// Prefix for container tags
"containerTagPrefix": "opencode"
}
All fields optional. Env var SUPERMEMORY_API_KEY takes precedence over config file.
If you're using Oh My OpenCode, disable its built-in auto-compact hook to let supermemory handle context compaction:
Add to ~/.config/opencode/oh-my-opencode.json:
{
"disabled_hooks": ["anthropic-auto-compact"]
}
OpenCode plugin for persistent memory using Supermemory.
Your agent remembers what you tell it - across sessions, across projects.
bunx opencode-supermemory@latest install
Then get your API key from app.supermemory.ai and set it:
export SUPERMEMORY_API_KEY="sm_..."
Or let your agent do it - paste this into OpenCode:
Install opencode-supermemory by following https://raw.githubusercontent.com/supermemoryai/opencode-supermemory/main/README.md
If you're an LLM agent helping set up opencode-supermemory, follow these steps:
bunx opencode-supermemory@latest install --no-tui
This will:
~/.config/opencode/opencode.jsonc/supermemory-init commandcat ~/.config/opencode/opencode.jsonc
Should contain:
{
"plugin": ["opencode-supermemory"]
}
If not, add it manually:
JSONC:
{
"plugin": [
"opencode-supermemory",
// ... other plugins
],
}
JSON:
{
"plugin": ["opencode-supermemory"]
}
Ask the user to get their API key from app.supermemory.ai.
Then set it via environment variable:
export SUPERMEMORY_API_KEY="sm_..."
Or create ~/.config/opencode/supermemory.jsonc:
{
"apiKey": "sm_...",
}
Tell the user to restart OpenCode and run:
opencode -c
They should see supermemory in the tools list. If not, check:
SUPERMEMORY_API_KEY set?opencode.jsonc?tail ~/.opencode-supermemory.logRun /supermemory-init to have the agent explore and memorize the codebase.
On first message, the agent receives (invisible to user):
Example of what the agent sees:
[SUPERMEMORY]
User Profile:
- Prefers concise responses
- Expert in TypeScript
Project Knowledge:
- [100%] Uses Bun, not Node.js
- [100%] Build: bun run build
Relevant Memories:
- [82%] Build fails if .env.local missing
The agent uses this context automatically - no manual prompting needed.
Say "remember", "save this", "don't forget" etc. and the agent auto-saves to memory.
You: "Remember that this project uses bun"
Agent: [saves to project memory]
Add custom triggers via keywordPatterns config.
Run /supermemory-init to explore and memorize your codebase structure, patterns, and conventions.
When context hits 80% capacity:
This preserves conversation context across compaction events.
API key is <private>sk-abc123</private>
Content in <private> tags is never stored.
The supermemory tool is available to the agent:
| Mode | Args | Description |
|---|---|---|
add |
content, type?, scope? |
Store memory |
search |
query, scope? |
Search memories |
profile |
query? |
View user profile |
list |
scope?, limit? |
List memories |
forget |
memoryId, scope? |
Delete memory |
Scopes: user (cross-project), project (default)
Types: project-config, architecture, error-solution, preference, learned-pattern, conversation
| Scope | Tag | Persists |
|---|---|---|
| User | opencode_user_{sha256(git email)} |
All projects |
| Project | opencode_project_{sha256(directory)} |
This project |
Create ~/.config/opencode/supermemory.jsonc:
{
// API key (can also use SUPERMEMORY_API_KEY env var)
"apiKey": "sm_...",
// Min similarity for memory retrieval (0-1)
"similarityThreshold": 0.6,
// Max memories injected per request
"maxMemories": 5,
// Max project memories listed
"maxProjectMemories": 10,
// Max profile facts injected
"maxProfileItems": 5,
// Include user profile in context
"injectProfile": true,
// Prefix for container tags (used when userContainerTag/projectContainerTag not set)
"containerTagPrefix": "opencode",
// Optional: Set exact user container tag (overrides auto-generated tag)
"userContainerTag": "my-custom-user-tag",
// Optional: Set exact project container tag (overrides auto-generated tag)
"projectContainerTag": "my-project-tag",
// Extra keyword patterns for memory detection (regex)
"keywordPatterns": ["log\\s+this", "write\\s+down"],
// Context usage ratio that triggers compaction (0-1)
"compactionThreshold": 0.8,
}
All fields optional. Env var SUPERMEMORY_API_KEY takes precedence over config file.
By default, container tags are auto-generated using containerTagPrefix plus a hash:
{prefix}_user_{hash(git_email)}{prefix}_project_{hash(directory)}You can override this by specifying exact container tags:
{
// Use a specific container tag for user memories
"userContainerTag": "my-team-workspace",
// Use a specific container tag for project memories
"projectContainerTag": "my-awesome-project",
}
This is useful when you want to:
userContainerTag)If you're using Oh My OpenCode, disable its built-in auto-compact hook to let supermemory handle context compaction:
Add to ~/.config/opencode/oh-my-opencode.json:
{
"disabled_hooks": ["anthropic-context-window-limit-recovery"]
}
bun install
bun run build
bun run typecheck
Local install:
{
"plugin": ["file:///path/to/opencode-supermemory"],
}
tail -f ~/.opencode-supermemory.log
MIT
Infinite Context, for the agent installing it
You are an AI agent, and a person has asked you to give yourself persistent memory using this repository. This file is for you. Every step below is verifiable, and you must verify each one before moving to the next. Do not tell the person it is installed until the last check passes.
by AgentHub Crawler
memories-sdk
Build against the memories.sh SDK packages in application code. Use when working with `@memories.sh/core` or `@memories.sh/ai-sdk`, including: (1) Initializing `MemoriesClient`, (2) Reading, writing, searching, or editing memories from backend code, route handlers, workers, or scripts, (3) Integrating memories with the Vercel AI SDK via `memoriesMiddleware`, `memoriesTools`, `preloadContext`, or `createMemoriesOnFinish`, (4) Choosing and applying `tenantId` / `userId` / `projectId` scoping, (5) Managing SDK
by AgentHub Crawler
amnesia
Set up persistent memory and identity for AI agents. Use when the user wants to give an agent persistent identity, manage agent memory files, set up IDENTITY.md/SOUL.md/MEMORY.md, create memory backup systems, or implement file-based agent continuity. Triggers on "agent memory," "persistent identity," "IDENTITY.md," "MEMORY.md," "SOUL.md," "agent backup," "remember across sessions," or "agent continuity."
Sign in to leave a comment.
by AgentHub Crawler