Install and activate
Install PowerContext and the OpenClaw plugin:openclaw and pnpm. It checks the OpenClaw version, installs dependencies with the frozen lockfile, builds dist/index.js, links the plugin, enables it, selects the memory slot, appends the five tools to tools.alsoAllow, enables recall/capture, sets gateway.mode=local when absent, and restarts the Gateway.
It does not start PowerContext Server. The command sequence shows that boundary plainly: setup first, Server separately, then the host.
To use project mode or a different endpoint:
Runtime defaults
Run once with defaults before changing them. This gives you a known local baseline for separating host configuration from Server or authentication failures.
CLI setup rejects endpoint credentials, query strings, and fragments. Manual plugin configuration is less strict, so use the setup command or apply the same operator checks yourself.
Exactly five tools
OpenClaw exposes this exact Memory subset. If the task needs Handoff, Review, Experience, or Skill, choose another integration instead of trying to infer hidden tools.
Search accepts
memory, wiki, all, or sessions as a host corpus hint, but wiki is unsupported and sessions does not search transcripts. all still means durable Memory here.
Get defaults to 120 lines. It truncates the Memory body at 12,000 characters, then may append a continuation notice, so final tool text can be slightly longer. The caller may request more than 120 lines, so 120 is not a hard maximum. Store and revise accept at most 8192 UTF-8 bytes at runtime. A stale revise returns a conflict with the action: search again and retry using the current exact citation.
These five tools are the whole PowerContext surface in OpenClaw. There is no Handoff, Review, Experience, external Skill, managed Skill, or export tool in this plugin.
Minimal verification
Run Server and host diagnostics separately:- Store a harmless test preference with
powercontext_memory_store. - Search for it with
powercontext_memory_search. - Read the returned citation with
powercontext_memory_get. - Revise it, then retry the old citation and confirm the conflict.
- Retire the current citation and confirm it no longer appears as active Memory.
powercontext_memory_store:
doctor openclaw only checks that the CLI exists and that memory-powercontext reports enabled=true, status="loaded", and memorySlotSelected=true. It does not check OpenClaw version, endpoint, Gateway token, Server reachability, the five allowlist entries, or an actual recall/capture round trip. Single-host setup does not run this final doctor for you.
Private-session gate
Recall, capture, and tools run only for eligible private sessions:- Explicit
chatType=groupandchatType=channelare rejected. - If
chatTypeis present, onlydirectis accepted. - Incognito session keys are rejected.
- Session keys parsed as group or channel are rejected.
- If metadata lookup throws, eligibility is rejected. If lookup only returns no entry, the plugin falls back to session-key and chat-type heuristics; an opaque non-group, non-channel, non-incognito key may still pass.
Capture and recall are bounded
Before prompt construction, the plugin sends only the latest user text as the prepare query, capped at 8192 UTF-8 bytes. Returned content must match the PreparedContext schema. Ready content is wrapped as untrusted history, and recalled boundary tags are escaped before injection. After a successfulagent_end, capture stores only the latest eligible user message:
privacy_class: private.
Before compaction and at session end, the plugin checks capabilities and Flushes observed scopes only when memory_extraction=true. If extraction is disabled, captured Sources remain pending.
Scope is still per agent
Agent mode resolves to:Gateway token and remote HTTP
When Server auth is enabled, put the same bare token in the Gateway process environment:tokenEnv and adds the Bearer header. Exporting the token only in the shell that started PowerContext Server does not put it in the Gateway environment.
Execution flow
Lifecycle recall, capture, and Flush fail open. Explicit tool failures return structured unavailable, rejected, or conflict results. Unlike Hermes, the OpenClaw HTTP client uses standardfetch() behavior; the documented behavior does not claim that redirects are refused.
Negative paths to test
- Stop PowerContext Server. The ordinary OpenClaw response should continue without recall; an explicit store must report unavailable.
- Open a group, channel, or incognito session. Recall, capture, and all five tools must be unavailable there.
- Put the same project key under two different agent IDs. Their project-mode Scopes must remain different.
- Remove the token from the Gateway environment while Server auth remains enabled. Doctor may still pass, but live operations must fail visibly.
- Reuse an old citation after revise. The operation must return conflict rather than overwrite the current Revision.
- Capture a user turn with an assistant response. Only the latest user prompt should be sent as Source content.
- Configure a remote
http://endpoint. Treat this as an unsafe operator configuration; the plugin will not block it for you.
Current limits
- Only the Memory plane is supported. Handoff, Review, Experience, Skill, external Skill, and managed export are Unsupported here.
- Project Scope still includes agent ID; cross-agent sharing is not implemented.
- Capture does not include a full transcript or assistant output, and it does not perform secret redaction.
- Setup is not transactional; a late failure may leave partial host changes.
- Reusing a cached checkout for a mutable ref may not fetch its latest commit.
- Doctor is an installation check, not a Server or runtime E2E test.
- A real OpenClaw host-process E2E is Not validated here.
Finish the shared check on this host
What should happen after the OpenAPI contract changes?
- Store the answer in a stable Scope with
powercontext_memory_store. Of the five Memory tools, only store performs this write. - Open a new private / direct session and ask the same question.
- The recall must include a Citation and enter the model only as untrusted history from this latest-user prepare.
- Stop the Server and ask again. Automatic recall may fail. The session should continue.
- Call
powercontext_memory_storeagain. The failure must stay visible. Do not pretend the write succeeded.
Completion checklist
- OpenClaw is
>=2026.8.1-beta.2; the runtime uses the recommended Node 24.15+ environment. pnpmis installed, setup completed, and the Gateway restarted.- PowerContext Server was started separately.
doctor openclawpasses, with its boundary understood.- All five exact tool names are allowlisted and usable in a private/direct session.
- Group, channel, and incognito negative tests pass.
- Capture contains only the latest user prompt, not the transcript.
- Agent and project Scope formulas match the intended isolation; no cross-agent sharing is assumed.
- The token exists in the Gateway environment.
- Every remote endpoint uses HTTPS by operator policy.

