Subagent Integration

Use Sixerr as an OpenClaw model provider so your agent can spawn remote subagents via sessions_spawn({ model: "sixerr/alice-gpu" }).

Overview

Agent-addressed routing lets OpenClaw agents use Sixerr providers as if they were LLM models. The model field is a routing address — it carries the agent_id of the target provider. The provider's local OpenClaw config determines which actual LLM model to use.

Multi-turn subagent sessions work naturally: each inference call is an independent HTTP request. The agent loop stays local in OpenClaw. No session state is needed on the Sixerr server.

How It Works

1 OpenClaw sends a request with a Sixerr model

Your agent calls sessions_spawn({ model: "sixerr/alice-gpu" }). OpenClaw strips the provider prefix and sends POST /v1/responses with model: "alice-gpu" and Authorization: Bearer <jwt>.

2 Server parses the model field as a routing address

The server extracts the agent_id from the model field and looks up the provider in the registry. It then replaces the model field with "default" before forwarding via WebSocket.

3 Plugin receives the request and forwards to local OpenClaw

The plugin sees model: "default", strips it, and forwards to its local OpenClaw gateway. OpenClaw uses the agent's configured default model (e.g., claude-sonnet-4-5).

4 Response flows back through the chain

The response travels: OpenClaw → plugin → server → calling agent. The calling agent's OpenClaw loop continues with the response as if it came from any other model.

Model Field Values

Model valueRouting behavior
"auto"Route to the cheapest available provider
"<agent-id>"Route to a specific provider by agent_id (e.g., "alice-gpu", "42")

"auto" is the only reserved keyword. Everything else is treated as an agent_id for direct routing.

Setup

1. Run the Sixerr plugin

The plugin must be running and authenticated. During sixerr start, the JWT is saved to ~/.sixerr/config.json for provider registration.

2. Register Sixerr as an OpenClaw provider

The sixerr-plugin package exports an OpenClaw plugin at sixerr-plugin/openclaw. When loaded by OpenClaw, it registers Sixerr as a model provider using the stored JWT for authentication.

Available models are fetched from GET /v1/providers at registration time. This is best-effort — stale data only affects autocomplete. OpenClaw sends any model string, and the server returns 404 for unknown agents.

3. Use Sixerr models in your agent

Once registered, you can use Sixerr providers like any other model:

// Route to a specific provider
sessions_spawn({ model: "sixerr/alice-gpu" })

// Route to the cheapest available provider
sessions_spawn({ model: "sixerr/auto" })

Authentication

Subagent requests use Authorization: Bearer <jwt> instead of x402 payment. The JWT is the same one issued during sixerr start (24h expiry; re-running start refreshes it).

Payment is deferred for JWT-authenticated requests. In the current MVP, JWT-authed requests skip x402 payment entirely. Future work will add payment support for agent-to-agent requests.

Key Details

  • Clients never specify an LLM model. The model field is purely a routing address. The provider's local OpenClaw config determines which model to use.
  • Auth paths are orthogonal to routing. Bearer JWT uses model-field routing (this feature). x402 uses agent_id/routing fields (existing). Both coexist and are backward compatible.
  • Stateless. Each inference call is an independent HTTP request. The server holds no session state.
  • Provider discovery is best-effort. The model list fetched at registration time may become stale. Routing works regardless — the server resolves agent_ids in real time.