Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,18 @@ Everything runs in the cloud. Supermemory handles extraction, deduplication, and

The AI uses these tools autonomously. With custom container tags enabled, all tools support a `containerTag` parameter for routing to specific containers.

| Tool | Description |
| --------------------- | ------------------------------------------------------ |
| `supermemory_store` | Save information to memory. |
| `supermemory_search` | Search memories by query. |
| `supermemory_forget` | Delete a memory by query or ID. |
| `supermemory_profile` | View user profile (persistent facts + recent context). |
| Tool | Description |
| ----------------------- | ------------------------------------------------------ |
| `supermemory-save` | Save information to memory. |
| `supermemory-search` | Search memories by query. |
| `supermemory-forget` | Delete a memory by query or ID. |
| `supermemory-profile` | View user profile (persistent facts + recent context). |

The hyphenated names above are the standard across all Supermemory plugins. The
older `supermemory_store`, `supermemory_search`, `supermemory_forget` and
`supermemory_profile` names still work and resolve to the same tools, but they
are deprecated and will be removed in 3.0. Update any tool allowlists to the
hyphenated names.
Comment thread
MaheshtheDev marked this conversation as resolved.
Resolved

## CLI Commands

Expand Down
5 changes: 5 additions & 0 deletions commands/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import type { SupermemoryClient } from "../client.ts"
import { DEFAULT_BASE_URL } from "../config.ts"
import { log } from "../logger.ts"

// Hyphenated names are current; snake_case is deprecated and removed in 3.0.
const SUPERMEMORY_TOOL_NAMES = [
"supermemory-save",
"supermemory-search",
"supermemory-forget",
"supermemory-profile",
"supermemory_store",
"supermemory_search",
"supermemory_forget",
Expand Down
4 changes: 4 additions & 0 deletions openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
],
"contracts": {
"tools": [
"supermemory-search",
"supermemory-save",
"supermemory-forget",
"supermemory-profile",
"supermemory_search",
"supermemory_store",
"supermemory_forget",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@supermemory/openclaw-supermemory",
"version": "2.1.15",
"version": "2.1.17",
"type": "module",
"description": "OpenClaw Supermemory memory plugin",
"license": "MIT",
Expand Down
21 changes: 14 additions & 7 deletions runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,16 @@ export function buildMemoryRuntime(
export function buildPromptSection(params: {
availableTools: Set<string>
}): string[] {
const hasSearch = params.availableTools.has("supermemory_search")
const hasStore = params.availableTools.has("supermemory_store")
if (!hasSearch && !hasStore) return []
// Prefer the hyphenated names; fall back to the deprecated snake_case ones.
const pick = (hyphen: string, snake: string): string | null => {
if (params.availableTools.has(hyphen)) return hyphen
if (params.availableTools.has(snake)) return snake
return null
}

const searchTool = pick("supermemory-search", "supermemory_search")
const storeTool = pick("supermemory-save", "supermemory_store")
if (!searchTool && !storeTool) return []

const lines: string[] = [
"## Memory (Supermemory)",
Expand All @@ -123,14 +130,14 @@ export function buildPromptSection(params: {
"",
]

if (hasSearch) {
if (searchTool) {
lines.push(
"Use supermemory_search to look up prior conversations, preferences, and facts.",
`Use ${searchTool} to look up prior conversations, preferences, and facts.`,
)
}
if (hasStore) {
if (storeTool) {
lines.push(
"Use supermemory_store to save important information the user asks you to remember.",
`Use ${storeTool} to save important information the user asks you to remember.`,
)
}

Expand Down
Loading