Subagent Dashboard Skill
Web dashboard for real-time monitoring and management of OpenClaw subagents.
Installation
CODEBLOCK0
Or manually:
CODEBLOCK1
Usage
Start the dashboard and open http://localhost:8080 in your browser.
The dashboard shows:
- - All sessions from sessions.json: main (orchestrator), subagents, and optionally cron jobs
- Real-time updates (auto-refresh every 3 seconds)
- Agent details: model, age, tokens, task progress; role badges (Main / Subagent / Cron)
- Transcript viewing for each agent
- Stalled agent detection (>30 min inactive)
Purpose
Provides a web UI to:
- - Monitor active subagents in real-time
- View agent transcripts and activity
- Detect and manage stalled agents
- Track task progress and token usage
Dependencies
- - Flask (web server)
- flask-cors (CORS support)
- Subagent-tracker skill (for data)
Configuration
Set PORT environment variable to change the server port (default: 8080).
Integration
The dashboard uses the subagent-tracker skill to fetch data. It reads:
- -
~/.openclaw/agents/main/sessions/sessions.json - Session list - INLINECODE2 - Transcript files
- INLINECODE3 - Task mapping (and legacy
~/.openclaw/subagents/runs.json)
Completed column: For finished tasks to appear in the Completed column, the run in runs.json must have endedAt (timestamp) and outcome.status set to "ok", "completed", or "success" when the sub-agent finishes. The dashboard appends "recently completed" runs (within 24h) even if the session was removed from sessions.json.
子代理仪表盘技能
用于实时监控和管理OpenClaw子代理的Web仪表盘。
安装
bash
cd workspace/skills/subagent-dashboard/scripts
./start_dashboard.sh
或手动安装:
bash
python3 -m venv venv
source venv/bin/activate
pip install -r ../requirements.txt
python3 dashboard.py
使用方法
启动仪表盘后,在浏览器中打开 http://localhost:8080。
仪表盘显示:
- - 所有会话 来自sessions.json:主代理(编排器)、子代理,以及可选的定时任务
- 实时更新(每3秒自动刷新)
- 代理详情:模型、运行时长、令牌数、任务进度;角色徽章(主代理/子代理/定时任务)
- 每个代理的对话记录查看
- 停滞代理检测(超过30分钟无活动)
目的
提供Web界面以实现:
- - 实时监控活跃子代理
- 查看代理对话记录和活动状态
- 检测并管理停滞代理
- 追踪任务进度和令牌使用情况
依赖项
- - Flask(Web服务器)
- flask-cors(跨域支持)
- Subagent-tracker技能(数据来源)
配置
设置PORT环境变量可更改服务器端口(默认:8080)。
集成
仪表盘使用subagent-tracker技能获取数据。它读取:
- - ~/.openclaw/agents/main/sessions/sessions.json - 会话列表
- ~/.openclaw/agents/main/sessions/*.jsonl - 对话记录文件
- ~/.openclaw/agents/main/subagents/runs.json - 任务映射(以及旧版~/.openclaw/subagents/runs.json)
已完成列: 要使已完成任务出现在已完成列中,当子代理完成时,runs.json中的运行记录必须包含endedAt(时间戳)且outcome.status设置为ok、completed或success。即使会话已从sessions.json中移除,仪表盘仍会追加最近完成的运行记录(24小时内)。