Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
24 changes: 24 additions & 0 deletions examples/openclaw-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Use [OpenViking](https://github.com/volcengine/OpenViking) as the long-term memo
- [Configuration Reference](#configuration-reference)
- [Daily Usage](#daily-usage)
- [Web Console (Visualization)](#web-console-visualization)
- [Multi-Agent Memory Isolation](#multi-agent-memory-isolation)
- [Troubleshooting](#troubleshooting)
- [Uninstallation](#uninstallation)

Expand Down Expand Up @@ -406,6 +407,29 @@ Open http://127.0.0.1:8020 in your browser.

---

## Multi-Agent Memory Isolation

Previously, all agents on the same OpenClaw instance shared a single memory namespace — memories stored by one agent were visible to every other agent. The plugin now supports **per-agent memory isolation**: each agent's memories are automatically namespaced by its agent ID, so agents no longer see each other's memories.

**This is enabled by default.** No extra configuration is needed — simply leave the `agentId` config empty and the plugin will use the agent ID provided by the OpenClaw host.

| `agentId` config | Behavior |
|---|---|
| **Not set** (default, recommended) | Each agent gets its own isolated memory namespace. The plugin reads the agent ID from the OpenClaw host automatically. |
| **Set to a fixed value** (e.g. `"default"`) | All agents using this value share the same memory namespace (the old behavior). |

> **Backward compatibility:** OpenClaw's default primary agent ID is `main`. For compatibility with previous versions (where all memories were stored under `default`), the plugin maps `main` to the `default` namespace — so existing memories remain accessible after upgrading. Other agents get their own isolated namespace based on their agent ID.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Bug] (blocking)

This paragraph states:

"the plugin maps main to the default namespace — so existing memories remain accessible after upgrading"

But this mapping does not exist in the code. resolveAgentId in config.ts returns "main" as-is when configured, and resolveAgentId / getToolAgentId in index.ts also pass it through unchanged. Test 4 explicitly verifies that "main" is preserved and NOT collapsed to "default".

This documentation will mislead users into thinking their existing default-namespace memories are automatically accessible when the host provides "main" as agent ID after upgrading.

Either:

  1. Remove or correct this claim in the README, or
  2. Actually implement the "main""default" mapping in the code (e.g., in getToolAgentId / resolveAgentId)


### Reverting to Shared Memory

If you need all agents to share the same memories (the previous behavior), set a fixed `agentId`:

```bash
openclaw config set plugins.entries.memory-openviking.config.agentId "default"
```

---

## Troubleshooting

### Common Issues
Expand Down
Loading
Loading