← 返回
数据分析 中文

Token Burn Monitor

Real-time token consumption monitoring dashboard for OpenClaw agents. Tracks per-agent token usage, cost breakdown by model, cache hit rates, cron job status...
OpenClaw 代理的实时 Token 消耗监控面板,跟踪每个代理的 Token 使用量、按模型的成本细分、缓存命中率以及 Cron 任务状态。
kasparchen
数据分析 clawhub v5.3.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 819
下载
💾 7
安装
1
版本
#latest

概述

Token Burn Monitor

Zero-dependency Node.js dashboard. Core API + swappable frontend themes.

Architecture

server.js          → Core API (stable, don't modify)
themes/default/    → Default dark dashboard theme
themes/<custom>/   → User/agent-generated themes
API.md             → API contract for theme developers
config.json        → Port, theme, agents, pricing overrides

Quick Start

bash start.sh            # Start (default port 3847)
bash start.sh status     # Check status
bash start.sh restart    # Restart after config change
bash start.sh stop       # Stop

Configuration

Copy config.default.json to config.json:

{
  "port": 3847,
  "theme": "default",
  "agents": {
    "main": { "name": "Karl", "icon": "/assets/karl.png" }
  },
  "modelPricing": {}
}
  • theme: Directory name under themes/. Default: "default"
  • agents: Display names/icons. Auto-discovered; config only overrides display.
  • port: Also settable via PORT env var.
  • modelPricing: Override/add model pricing ($/1M tokens).

Set OPENCLAW_AGENTS_DIR to override agent directory (default: /home/node/.openclaw/agents).

Themes

Themes live in themes//. Minimum: one index.html that fetches data from the API.

To create a custom theme:

  1. Read API.md for all available endpoints
  2. Create themes/my-theme/index.html
  3. Set "theme": "my-theme" in config.json
  4. Restart

The default theme (themes/default/) is a full reference implementation.

API Overview

All endpoints return JSON. GET-only. Server binds to localhost. Full docs in API.md.

EndpointDescription
------
GET /api/configAgent names and icons
GET /api/stats?date=All agents aggregated
GET /api/agent/:id?date=Single agent with per-call breakdown
GET /api/history?days=30-day cost history
GET /api/pricingModel pricing table
GET /api/cronsScheduled jobs (read from filesystem)
GET /api/cron/:id/runsJob run history

Security

  • Server binds to 127.0.0.1 by default (localhost only)
  • No shell execution — all data read from filesystem
  • No outbound network requests — default theme uses system fonts
  • User prompts redacted by default ([redacted]), opt-in via showPrompts: true in config
  • HTML responses include CSP: connect-src 'self'; font-src 'self'
  • GET-only — all other HTTP methods rejected

Troubleshooting

  • No data: Verify OPENCLAW_AGENTS_DIR points to correct agents directory.
  • Port conflict: PORT=4000 bash start.sh
  • Theme not loading: Check themes//index.html exists.

版本历史

共 1 个版本

  • v5.3.1 当前
    2026-03-29 09:34 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,471
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 165 📥 60,022
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,124