> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ctrlnode.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenClaw provider

> Bridge provider openclaw — gateway token, openclaw.json, and HTTP dispatch

Provider id: **`openclaw`** · CtrlNode agent type: **`OpenClaw`**

OpenClaw is an open-source agent executor with its own session runtime. The Bridge forwards task intents to the OpenClaw **HTTP gateway** and streams session output back to CtrlNode.

## When to use it

* You already run [OpenClaw](https://github.com/openclaw/openclaw) on the Bridge machine
* You want OpenClaw's native multi-agent and tool orchestration
* Other steps in the same workflow may use different providers (Claude, Codex, etc.)

## Prerequisites

1. Install and start OpenClaw (see [OpenClaw docs](https://docs.openclaw.ai/install))
2. Ensure the gateway is reachable (default `http://localhost:18789`)
3. Configure agents in `openclaw.json`

## Environment variables

| Variable                 | Required | Default                  | Description                       |
| ------------------------ | -------- | ------------------------ | --------------------------------- |
| `OPENCLAW_GATEWAY_TOKEN` | **Yes**  | —                        | Token from your OpenClaw instance |
| `OPENCLAW_GATEWAY_URL`   | No       | `http://localhost:18789` | Gateway base URL                  |
| `BASE_PATH`              | No       | Home directory           | Used for path resolution          |

Example `.env`:

```env theme={null}
PAIRING_TOKEN=...
# All providers load automatically; routing uses sync_openclaw_agents from CtrlNode
OPENCLAW_GATEWAY_TOKEN=your_gateway_token
OPENCLAW_GATEWAY_URL=http://localhost:18789
```

## Agent configuration

Agents are defined in `openclaw.json` at the workspace root:

```json theme={null}
{
  "agents": [
    {
      "id": "my-agent",
      "name": "My Agent",
      "workspace": "/path/to/workspace"
    }
  ]
}
```

Register matching agents in CtrlNode **Team** with agent type **OpenClaw**. The Bridge discovers local agents from this file and merges registrations from CtrlNode sync.

## Run the Bridge

```bash theme={null}
PAIRING_TOKEN=... OPENCLAW_GATEWAY_TOKEN=... ctrlnode
```

All built-in providers load automatically; routing uses `sync_openclaw_agents` from CtrlNode when agents are registered. Set API keys and paths in `~/.ctrlnode/.env` — see [Configuration](/bridge/configuration).

## Troubleshooting

| Issue                                | Fix                                                                                 |
| ------------------------------------ | ----------------------------------------------------------------------------------- |
| Bridge warns `openclaw.json` missing | Create config; OpenClaw is skipped until config exists (other providers still work) |
| Gateway connection refused           | Start OpenClaw before the Bridge                                                    |
| 401 from gateway                     | Rotate `OPENCLAW_GATEWAY_TOKEN` to match OpenClaw                                   |
| Agent missing in UI                  | Register in Team; verify Bridge connected                                           |

[← All providers](/bridge/providers)
