This page is for code outside the OpenClaw process. Plugin code that runs
inside OpenClaw should use documented
openclaw/plugin-sdk/* subpaths instead.What is available today
| Surface | Status | Use it for |
|---|---|---|
| Gateway protocol | Ready | WebSocket transport, connect handshake, auth scopes, protocol versioning, and events. |
| Gateway RPC reference | Ready | Current Gateway methods for agents, sessions, tasks, models, tools, artifacts, and approvals. |
openclaw agent | Ready | One-shot script integration when shelling out to the CLI is enough. |
openclaw message | Ready | Sending messages or channel actions from scripts. |
Recommended path
- Run or discover a Gateway.
- Connect over the Gateway protocol.
- Call documented RPC methods from Gateway RPC reference.
- Pin the OpenClaw version you test against.
- Recheck the RPC reference when upgrading OpenClaw.
agent RPC and pair it with agent.wait when
you need a terminal result. For durable conversation state, use the sessions.*
methods. For UI integrations, subscribe to Gateway events and render only the
event families your app understands.
App code vs plugin code
Use Gateway RPC when code lives outside OpenClaw:- Node scripts that start or observe agent runs
- CI jobs that call a Gateway
- dashboards and admin panels
- IDE extensions
- external bridges that do not need to become channel plugins
- integration tests with fake or real Gateway transports
- provider plugins
- channel plugins
- tool or lifecycle hooks
- agent harness plugins
- trusted runtime helpers
openclaw/plugin-sdk/*; those subpaths are for
plugins loaded by OpenClaw.