Proposal
Nâng cấp dashboard và cơ chế tracking để quan sát usage/cost/hiệu quả vận hành của GoClaw chi tiết hơn.
Các hướng chính:
- Đếm lượt requests.
- Đếm lượt sử dụng agent.
- Đếm lượt sử dụng skill.
- Đếm lượt sử dụng tools / MCP / runtime packages / CLI commands / connectors nếu phù hợp.
- Dashboard trực quan với các thống kê đầy đủ hơn.
- Theo dõi số tokens sử dụng, có thể filter theo:
- từng agent
- từng skill
- từng tool
- từng MCP server/tool
- từng runtime package / command nếu có tracking được
- khoảng thời gian
- user / org / channel nếu phù hợp với permission model
Motivation
Hiện tại cần có visibility tốt hơn để:
- Biết agent nào được dùng nhiều.
- Biết skill/tool nào tạo nhiều usage/cost.
- Theo dõi token consumption theo chiều agent/skill/tool.
- Phát hiện spike bất thường hoặc misuse.
- Có số liệu để tối ưu UX, pricing, quota, billing, và vận hành.
- Hỗ trợ admin/debug khi user báo tốn token hoặc tool chạy nhiều.
Gợi ý dashboard metrics
Usage overview
- Total requests theo ngày/tuần/tháng.
- Active agents.
- Active users.
- Active channels.
- Total tool calls.
- Total skill activations.
- Total MCP calls.
- Total runtime package/CLI executions nếu có.
Token analytics
- Input tokens.
- Output tokens.
- Total tokens.
- Tokens by agent.
- Tokens by skill.
- Tokens by tool/MCP.
- Tokens by channel/session/user/org.
- Token trend over time.
Tool / skill analytics
- Top skills by usage.
- Top tools by call count.
- Top tools by token/cost impact nếu đo được.
- Error rate per tool/MCP.
- Latency per tool/MCP.
- Runtime package/CLI usage count.
Agent analytics
- Requests per agent.
- Tokens per agent.
- Tool calls per agent.
- Skill usage per agent.
- Success/failure/error distribution.
- Avg response time.
UI ideas
- Date range filter.
- Org/user/channel/agent filters.
- Drill-down từ overview → agent → session/request → tool calls.
- Export CSV/JSON.
- Charts:
- time series usage/token trend
- stacked bar tokens by agent/tool
- top-N tables
- error-rate cards
- latency distribution
Open questions / cần thảo luận thêm
- Tracking granularity nên ở mức request/session/message/tool-call hay event stream?
- Có cần lưu raw prompt/response không, hay chỉ metadata để tránh privacy risk?
- Token attribution cho skill/tool nên tính thế nào khi skill chỉ là instruction layer còn model call là chung?
- MCP/tool cost attribution có cần chuẩn hoá schema riêng không?
- Runtime package tracking nên tính theo command execution, package import, hay tool call?
- Data retention bao lâu?
- Có cần quota/billing alert từ metrics này không?
- Dashboard permission model: admin thấy gì, owner thấy gì, shared agent member thấy gì?
Acceptance direction
Issue này là proposal/enhancement, cần thảo luận thêm chi tiết trước khi implement. Mục tiêu trước mắt là thống nhất schema tracking + dashboard UX + quyền truy cập dữ liệu.
Proposal
Nâng cấp dashboard và cơ chế tracking để quan sát usage/cost/hiệu quả vận hành của GoClaw chi tiết hơn.
Các hướng chính:
Motivation
Hiện tại cần có visibility tốt hơn để:
Gợi ý dashboard metrics
Usage overview
Token analytics
Tool / skill analytics
Agent analytics
UI ideas
Open questions / cần thảo luận thêm
Acceptance direction
Issue này là proposal/enhancement, cần thảo luận thêm chi tiết trước khi implement. Mục tiêu trước mắt là thống nhất schema tracking + dashboard UX + quyền truy cập dữ liệu.