多租户隔离技巧:按 agent 绑定独立 Supermemory API Key
场景:多人共用 OpenClaw 时长期记忆串库。通过 perAgentKeys 从 auth-profiles.json 解析每个 agent 独立密钥,实现记忆容器隔离。
GITHUBDiscovered 2026-02-14Author jmoraispk
Prerequisites
- openclaw-supermemory plugin is already installed and running.
- Each agent has auth profile file under OPENCLAW_STATE_DIR agents path.
Steps
- Enable perAgentKeys in plugin config and keep global key as fallback.
- Create supermemory provider entries in each agent auth-profiles.json with api_key type.
- Start separate conversations per agent and write distinct marker memories.
- Query from each agent and confirm only its own marker is returned.
Commands
openclaw gateway restartopenclaw supermemory profilecat ~/.openclaw/agents/<agentId>/agent/auth-profiles.jsonVerify
Cross-agent recall no longer leaks memory entries and each agent resolves a scoped container.
Caveats
- Feature is from an active PR and behavior may change before release, so verify against plugin version.
- If per-agent key is missing, plugin falls back to global key and can reintroduce shared-memory risk.
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗