{"skill":{"slug":"sessions-dashboard","displayName":"Live Sessions Dashboard","summary":"Live dashboard viewer for OpenClaw sessions (CLI + web) that shows color-coded states, token/cost totals, and shareable HTML panels. Requires local OpenClaw...","description":"---\nname: sessions-dashboard\ndescription: Live dashboard viewer for OpenClaw sessions (CLI + web) that shows color-coded states, token/cost totals, and shareable HTML panels. Requires local OpenClaw CLI access (`openclaw sessions` and optional `openclaw logs`). Created by Nate Teshome (stellarsitesai.com).\n---\n\n# Sessions Dashboard (\"Live Dashboard Viewer\")\n\nCreator: **Nate Teshome** — <https://stellarsitesai.com>\n\n## What this skill delivers\n- **Color-coded CLI monitor** (`scripts/agents_cli_monitor.py`): RUN/IDLE/STALE/EXIT states, runtime, last update, token + USD estimates, model/kind, plus a live KPI banner (state counts, Σ tokens/cost, longest run, avg lag).\n- **Shareable HTML dashboard** (`scripts/agents_canvas_snapshot.py`): dark-mode cards + table, status pills, runtime/lag columns, and auto-refresh browser view for leadership/client reviews.\n- **Looping web generator** (`--loop <seconds>`): continuously rewrites the HTML so you don’t need separate `watch` commands. Pair with the built-in `<meta refresh>` (default 5 s) for a true live panel.\n\nUse this when you need a polished, always-on view of every OpenClaw session—perfect for ops rooms, agency war rooms, or lightweight audits.\n\n## Requirements & security\n- **OpenClaw CLI** (`openclaw` >= 2025.x) must be installed and authenticated so `openclaw sessions --json` works.\n- **Optional log tail**: the CLI monitor subscribes to `openclaw logs --json --follow` for instant RUN/IDLE bumps. Those logs can contain prompts, tool arguments, secrets, or PII. Nothing is printed or stored, but if you don’t want to expose log contents, pass `--no-subscribe` (poll-only) or run on a machine without log access.\n  - Set `AGENT_MONITOR_NO_SUBSCRIBE=1` to default to poll-only everywhere; pass `--subscribe` to override per run.\n- **Gateway scope**: run the dashboard only on hosts that are already allowed to query your OpenClaw gateway; everything stays local/in-memory.\n\n## Directory\n```\nskills/sessions-dashboard/\n├── SKILL.md\n├── scripts/\n│   ├── agents_cli_monitor.py        # Live terminal UI (color + KPI banner)\n│   └── agents_canvas_snapshot.py    # HTML generator (+ --loop for continuous refresh)\n└── assets/\n    └── agents_canvas.html           # Default output target for the web panel\n```\n\n## CLI monitor quick start\n```bash\ncd ~/.openclaw/workspace/skills/sessions-dashboard\n./scripts/agents_cli_monitor.py --interval 2 --cost-per-1k 0.015\n```\nKey flags:\n- `--interval SECONDS` (default 3, min 0.5)\n- `--active-minutes MINS` (default 720) to widen the lookback\n- `--agent <id>` / `--all-agents` to filter\n- `--retention SECONDS` (default 120) to control how long EXITED rows linger\n- `--cost-per-1k USD` or env `AGENT_MONITOR_COST_PER_1K`\n- `--once` for a single snapshot, `--no-subscribe` to disable the log tailer\n\n### What the CLI shows\n- **State** (RUN green, IDLE amber, STALE magenta, EXIT gray)\n- **Runtime + start time** for quick “how long has this been around?” checks\n- **Last update lag** (`00:12 ago`) to spot stuck sessions\n- **Tokens & projected cost** per session\n- **Model / kind** (channel) for context\n- **KPI banner** (top line) summarizing RUN/IDLE/STALE/EXIT counts, Σ tokens/cost, the longest-running session, and mean lag — ideal for screenshots or lightweight reporting.\n\n## Web dashboard (Canvas / browser)\nGenerate the HTML and keep it running in one command:\n```bash\ncd ~/.openclaw/workspace/skills/sessions-dashboard\n./scripts/agents_canvas_snapshot.py \\\n  --loop 5 \\\n  --refresh 5 \\\n  --cost-per-1k 0.015 \\\n  --output assets/agents_canvas.html\n```\nWhat the script does:\n- Hits `openclaw sessions --json` on each loop.\n- Rebuilds `assets/agents_canvas.html` with cards (state counts, Σ tokens/cost, longest run, avg lag) plus the detailed table.\n- Inserts a `<meta refresh>` so the browser (or Canvas tab) reloads itself every `--refresh` seconds.\n- When `--loop` > 0, the script stays alive forever and rewrites the file at that cadence (Ctrl+C to stop). No extra `watch` command needed.\n\n### Presenting the dashboard\n- **Open locally:** `open assets/agents_canvas.html`\n- **Canvas:** `openclaw canvas present --path skills/sessions-dashboard/assets/agents_canvas.html`\n- **Remote share:** host the HTML anywhere static files are allowed; it has no external dependencies.\n\n## Troubleshooting\n- **`command not found`:** `chmod +x scripts/*.py` and run from the skill directory (or use absolute paths).\n- **Gateway errors:** verify `openclaw gateway status`; the scripts just print the stderr and retry.\n- **No color in CLI:** set `NO_COLOR=1` to disable, otherwise the monitor auto-detects TTY support.\n- **Browser not updating:** make sure `--loop` is running so the HTML file actually changes; `--refresh` only reloads the page.\n- **Cost column blank:** pass `--cost-per-1k` or export `AGENT_MONITOR_COST_PER_1K` to enable projections.\n\n## Release notes (current version)\n- Added colorized states + KPI banner to the CLI monitor.\n- Added looping mode and a polished dark-mode layout for the HTML dashboard.\n- Default assets are optimized for screenshots / executive readouts.\n\nThat’s it—launch the CLI, fire up the live HTML panel, and give your team a real-time Sessions Dashboard without cobbling together spreadsheets.\n","tags":{"latest":"1.0.1","live-dashboard":"1.0.1"},"stats":{"comments":0,"downloads":773,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":2},"createdAt":1772563519264,"updatedAt":1778994941448},"latestVersion":{"version":"1.0.1","createdAt":1772564709900,"changelog":"Add security/dependency notes plus AGENT_MONITOR_NO_SUBSCRIBE env flag","license":null},"metadata":null,"owner":{"handle":"takeovernat","userId":"s170dz2f89gkkaxjsnhca7j6an8847w0","displayName":"Natnael Teshome","image":"https://avatars.githubusercontent.com/u/78238029?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089745844}}