Setup
CODEBLOCK0
Operational Rhythm
Follow this pattern every session:
- 1.
clawctl checkin — register presence, see unread count - INLINECODE1 — read messages before picking up work
- INLINECODE2 — find highest-priority actionable task (or
clawctl list --mine) - INLINECODE4 then
clawctl start <id> — take ownership and begin - INLINECODE6 — coordinate during work
- INLINECODE7 then
clawctl next — complete and move on
Only claim tasks assigned to you or matching your role. Completing an already-done task is a safe no-op.
Decision Tree
| Situation | Command |
|---|
| New task | INLINECODE9 |
| Find work |
clawctl next then
clawctl claim <id> |
| Blocked |
clawctl block <id> --by <blocker-id> and notify via
clawctl msg |
| Finished |
clawctl done <id> -m "Result" |
| Hand off |
clawctl msg <agent> "Ready for you" --task <id> --type handoff |
| Ready for review |
clawctl review <id> |
| Catch up |
clawctl feed --last 20 or
clawctl summary |
| Link artifacts | Add
--meta '{"note":"path/to/file"}' to
done,
claim,
start, or
block |
Task Statuses
CODEBLOCK1
INLINECODE24 excludes done/cancelled by default. Use --all for history (newest first).
Commands
Tasks
| Command | Description |
|---|
| INLINECODE26 | Create task. -d desc, -p 0\|1\|2 priority, --for AGENT assign, INLINECODE30 |
| INLINECODE31 |
Active tasks.
--mine,
--status STATUS,
--owner AGENT,
--all |
|
next | Highest-priority actionable task for current agent |
|
claim ID | Claim task.
--force overrides ownership,
--meta JSON |
|
start ID | Begin work (in_progress).
--meta JSON |
|
done ID | Complete.
-m note,
--force,
--meta JSON |
|
review ID | Mark ready for review.
--meta JSON |
|
cancel ID | Cancel task.
--meta JSON |
|
block ID --by OTHER | Mark blocked.
--meta JSON |
|
board | Kanban board grouped by status |
Messages
| Command | Description |
|---|
| INLINECODE53 | Send message. --task ID, --type TYPE (comment, status, handoff, question, answer, alert) |
| INLINECODE56 |
Alert all agents |
|
inbox | Read messages.
--unread for unread only |
Fleet
| Command | Description |
|---|
| INLINECODE59 | Heartbeat — update presence, report unread count |
| INLINECODE60 |
Register agent.
--role TEXT |
|
fleet | All agents with status and current task |
|
whoami | Identity, role, and DB path |
Monitoring
| Command | Description |
|---|
| INLINECODE64 | Activity log. --last N, --agent NAME, INLINECODE67 |
| INLINECODE68 |
Fleet overview with counts and recent events |
|
dashboard | Web UI.
--port INT,
--stop,
--verbose |
设置
bash
clawctl init # 创建数据库
export CLAW_AGENT=your-name # 设置身份(若未设置,默认使用 $USER 并发出警告)
export CLAW_DB=~/.openclaw/clawctl.db # 可选,此为默认路径
操作节奏
每次会话遵循以下模式:
- 1. clawctl checkin — 登记在线状态,查看未读消息数量
- clawctl inbox --unread — 开始工作前阅读消息
- clawctl next — 查找优先级最高的可执行任务(或 clawctl list --mine)
- clawctl claim 然后 clawctl start — 认领任务并开始执行
- clawctl msg update --task — 工作中进行协调沟通
- clawctl done -m what I did 然后 clawctl next — 完成任务并继续
只认领分配给您的任务或与您角色匹配的任务。完成已完成的任务是安全的空操作。
决策树
| 情况 | 命令 |
|---|
| 新任务 | clawctl add 主题 -d 详情 |
| 查找工作 |
clawctl next 然后 clawctl claim
|
| 受阻 | clawctl block --by <阻塞任务-id> 并通过 clawctl msg 通知 |
| 完成 | clawctl done -m 结果 |
| 移交 | clawctl msg <代理> 已为您准备就绪 --task --type handoff |
| 准备审核 | clawctl review |
| 跟进 | clawctl feed --last 20 或 clawctl summary |
| 关联产物 | 在 done、claim、start 或 block 中添加 --meta {note:path/to/file} |
任务状态
待处理 → 已认领 → 进行中 → 已完成
↘ 受阻 ↗ ↘ 已取消
↘ 待审核 ↗
默认情况下 list 不包含已完成/已取消的任务。使用 --all 查看历史记录(最新在前)。
命令
任务
| 命令 | 描述 |
|---|
| add SUBJECT | 创建任务。-d 描述,-p 0\ | 1\ | 2 优先级,--for AGENT 分配,--parent ID |
| list |
活跃任务。--mine,--status STATUS,--owner AGENT,--all |
| next | 当前代理优先级最高的可执行任务 |
| claim ID | 认领任务。--force 覆盖所有权,--meta JSON |
| start ID | 开始工作(进行中)。--meta JSON |
| done ID | 完成。-m 备注,--force,--meta JSON |
| review ID | 标记为待审核。--meta JSON |
| cancel ID | 取消任务。--meta JSON |
| block ID --by OTHER | 标记为受阻。--meta JSON |
| board | 按状态分组的看板视图 |
消息
| 命令 | 描述 |
|---|
| msg AGENT BODY | 发送消息。--task ID,--type TYPE(评论、状态、移交、问题、回答、提醒) |
| broadcast BODY |
提醒所有代理 |
| inbox | 阅读消息。--unread 仅查看未读消息 |
团队
| 命令 | 描述 |
|---|
| checkin | 心跳 — 更新在线状态,报告未读消息数 |
| register NAME |
注册代理。--role TEXT |
| fleet | 所有代理及其状态和当前任务 |
| whoami | 身份、角色和数据库路径 |
监控
| 命令 | 描述 |
|---|
| feed | 活动日志。--last N,--agent NAME,--meta |
| summary |
团队概览,包含统计和近期事件 |
| dashboard | Web 界面。--port INT,--stop,--verbose |