Mission Claw Activity Logging
Log significant tasks to the Mission Claw activity feed for tracking agent work, token usage, and project progress.
Prerequisites
- - Mission Claw CLI: The
mclaw binary must be installed on the host system. - OpenClaw Built-ins: Relies on the
session_status tool to retrieve current token usage.
CLI Usage
CODEBLOCK0
Required Fields
- -
action - Brief task description (positional argument) - INLINECODE3 - Agent name (e.g., "J", "mission-claw", "type-alchemy")
- INLINECODE4 - Total tokens used (always include)
Optional Fields
- -
--details - Longer description of work done - INLINECODE6 - Project name
- INLINECODE7 -
completed (default), in_progress, or INLINECODE10 - INLINECODE11 - Time taken (e.g., "5m", "1h 30m")
- INLINECODE12 /
--output-tokens - Token breakdown
When to Log
Log after completing:
- - Significant development tasks
- Bug fixes or feature implementations
- Research or investigation work
- Configuration changes
- Any task worth tracking
Getting Token Usage
Before logging, check your session's token usage:
- - Use the built-in
session_status tool to see current tokens - For subagents, tokens are in the completion announcement
Examples
CODEBLOCK1
Other Commands
CODEBLOCK2
API Alternative
The CLI logs to a local daemon (defaulting to http://localhost:3100). You can also POST directly to the API:
POST http://localhost:3100/api/activity
CODEBLOCK3
Mission Claw 活动日志记录
将重要任务记录到 Mission Claw 活动源中,以追踪代理工作、令牌使用情况和项目进度。
前提条件
- - Mission Claw CLI:主机系统上必须安装 mclaw 二进制文件。
- OpenClaw 内置工具:依赖 session_status 工具来获取当前令牌使用情况。
CLI 使用方式
bash
mclaw log 任务描述 \
--agent 代理名称 \
--project 项目名称 \
--status completed \
--duration X分 Y秒 \
--input-tokens N \
--output-tokens N \
--total-tokens N
必填字段
- - action - 简短的任务描述(位置参数)
- --agent - 代理名称(例如:J、mission-claw、type-alchemy)
- --total-tokens - 使用的总令牌数(始终包含)
可选字段
- - --details - 已完成工作的详细描述
- --project - 项目名称
- --status - completed(默认)、in_progress 或 failed
- --duration - 耗时(例如:5m、1h 30m)
- --input-tokens / --output-tokens - 令牌分解
何时记录
在完成以下任务后进行记录:
- - 重要的开发任务
- 错误修复或功能实现
- 研究或调查工作
- 配置更改
- 任何值得追踪的任务
获取令牌使用情况
在记录前,检查当前会话的令牌使用情况:
- - 使用内置的 session_status 工具查看当前令牌数
- 对于子代理,令牌信息包含在完成通知中
示例
bash
功能实现
mclaw log 为仪表板添加日期时间过滤器 \
--agent mission-claw \
--project Mission Claw \
--status completed \
--duration 10m \
--total-tokens 15000
快速修复
mclaw log 修复时区错误 \
--agent J \
--project ContentMorph \
--duration 2m \
--total-tokens 3500
进行中的工作
mclaw log 实现支付流程 \
--agent J \
--project TypeAlchemy \
--status in_progress
其他命令
bash
mclaw list # 最近活动
mclaw list --agent J # 按代理筛选
mclaw status # 快速统计和服务状态
mclaw dashboard start # 启动网页仪表板(默认 localhost:3101)
API 替代方案
CLI 会记录到本地守护进程(默认地址为 http://localhost:3100)。您也可以直接通过 POST 请求调用 API:
POST http://localhost:3100/api/activity
json
{
action: 任务名称,
agent: J,
project: 项目,
status: completed,
totalTokens: 5000,
inputTokens: 4000,
outputTokens: 1000
}