工作区OpenClaw Demo Workspace
桥接状态健康
运行中任务1
结果产物1
核心文件分支

核心文件

主题

Openclaw Api Contract

webweb/openclaw-api-contract.md

查看来源与关联入口

类别web

来自当前 Web 文档集。

路径web/openclaw-api-contract.md

- `memory`: default development mode - `prisma`: target persistence mode after migrations and repository implementation Request:

关联入口返回相关页面

阅读后可直接回到运行时、会话或网站页面继续操作。

web/openclaw-api-contract.md

# OpenClaw Web API Contract

## Driver Modes

- `memory`: default development mode
- `prisma`: target persistence mode after migrations and repository implementation

## Bridge APIs

### `POST /api/bridge/link-challenges`

Request:

```json
{
  "workspaceId": "ws_demo",
  "label": "Lu MacBook Pro",
  "platform": "macos"
}
```

### `POST /api/bridge/redeem`

Request:

```json
{
  "challengeId": "chl_xxx",
  "code": "ABCD-EFGH",
  "runtimeVersion": "pi_agent_rust@0.1.8",
  "capabilities": {
    "rpcMode": true
  }
}
```

### `POST /api/bridge/heartbeat`

Request:

```json
{
  "deviceId": "dev_xxx",
  "queueDepth": 0,
  "activeRuns": 1,
  "cpuPercent": 12,
  "memoryMb": 284,
  "lastRpcHealth": "ok"
}
```

## Task APIs

### `POST /api/workspaces/:workspaceId/dispatch-plan`

Returns the control-plane routing decision without creating a run.

### `POST /api/workspaces/:workspaceId/tasks`

Creates a task run and returns:

- `taskRun`
- `dispatchDecision`

### `POST /api/tasks/events`

Used by the bridge or cloud host to update run state from runtime events.

- `memory`: default development mode - `prisma`: target persistence mode after migrations and repository implementation Request: