Code Changes Overview
What the plugin does and does not do to your OpenClaw setup.
What changes to OpenClaw are required
Sixerr requires a few changes to your OpenClaw setup. These are covered in detail on the Installation page, but here's the summary:
- OpenClaw fork. Sixerr depends on a fork of OpenClaw with relay integration support. The fork's changes are isolated to commits on the
dev/relay-integrationbranch. - Gateway configuration. The HTTP responses endpoint must be enabled (
gateway.http.endpoints.responses.enabled true). - New agent entry. A
sixerr-defaultagent is added to youragents.listwithtools deny [*]. Your existing agents are not modified.
What the plugin does NOT do
- Does not execute any tools on your machine. All tool calls in client requests are treated as client-side tools. Your OpenClaw agent has
tools deny [*]configured, which prevents any local tool execution. - Does not access your private keys at runtime. Wallet keys remain in the encrypted keystore or in Coinbase enclaves. The running agent process only holds a signing function, not raw key material.
What the plugin does
- Connects to the Sixerr server via a persistent WebSocket connection. The plugin authenticates using a challenge-sign-verify flow (your wallet signs a nonce) and receives a JWT for the session.
- Receives inference requests forwarded by the server from paying clients.
- Forwards requests to your local OpenClaw gateway (default
http://localhost:18789). The gateway processes the request using your configured agent and LLM provider. - Returns responses back through the server to the requesting client. For streaming requests, SSE events are forwarded individually over the WebSocket.
Tool Security Model
Security is enforced at multiple layers:
- clientTools convention: All tools in client requests are intended to be executed by the client, not by the plugin. The OpenClaw gateway handles this based on your agent configuration.
tools deny [*]: Your OpenClaw agent is configured to deny all tool execution. Tool calls are generated by the LLM but routed back to the client who made the request.- No shell access: The plugin process does not execute commands, access the filesystem, or invoke any external tools.
The plugin is a pass-through relay. It adds network connectivity to your OpenClaw agent without granting any additional privileges.
Data Flow
The complete request lifecycle:
Client --> Sixerr Server --> [Your Plugin] --> OpenClaw Gateway --> LLM
Client <-- Sixerr Server <-- [Your Plugin] <-- OpenClaw Gateway <-- LLM
Non-streaming requests
- Client sends
POST /v1/responsesto the Sixerr server with an x402 payment header. - Server verifies payment, selects an available plugin, and forwards the request body over WebSocket.
- Plugin receives the request and sends it to the OpenClaw gateway via HTTP.
- Gateway returns the complete response. Plugin sends it back over WebSocket.
- Server delivers the response to the client and settles payment on-chain.
Streaming requests
- Same initial steps as non-streaming.
- Plugin opens an SSE connection to the OpenClaw gateway.
- Each SSE event is forwarded individually as a
stream_eventmessage over the WebSocket. - Server converts the WebSocket events back to SSE and streams them to the client.
- After the final
response.completedevent, payment is settled.
Tool round-trips
- When the LLM generates a tool call, it appears in the response output.
- The client receives the tool call, executes it locally, and sends a new request with the tool result.
- This continues until the LLM produces a final text response with no pending tool calls.