OpenClaw SDK Adapter
Use this SDK adapter reference together with the canonical OpenClaw integration guide.
Canonical Guide
Adapter Responsibilities
- Resolve a stable
external_user_id - Retrieve memory before task execution
- Persist outcomes after task completion
- Keep tenant scope explicit (
organization_id,namespace_id)
API Mapping
- OpenClaw pre-task memory ->
POST /v1/memory/search - OpenClaw post-task memory write ->
POST /v1/memory - Optional relationship analytics ->
POST /v1/graphql
Minimal Adapter Contract
Implement two methods in your OpenClaw adapter:
retrieve(prompt, external_user_id)-> callPOST /v1/memory/searchpersist(content, external_user_id)-> callPOST /v1/memory