Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
Records operational metrics for agents: API calls, task completions, errors, and timed durations. Generates text-based dashboards and exports data as JSON or CSV. Data is stored as daily JSON files in ~/.openclaw/metrics/ with no database required.
Stores metrics as flat JSON files with no database or infrastructure setup, making it usable immediately in any agent environment.
When to use it
- Tracking API call volume across providers over a week
- Monitoring error rates during overnight agent runs
- Measuring average task duration after a code change
- Identifying which skills an agent uses most frequently
- Exporting daily metrics to CSV for external analysis
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: What's my agent's error rate and average API call duration this week?
- 1Run metrics.py view --name api_calls --period week to retrieve API call history
- 2Run metrics.py view --name errors --period week to check recorded error events
- 3Run metrics.py dashboard to generate a summary showing error rate and average durations
- 4Run metrics.py export --format json to save full data for external review
Text dashboard showing weekly API call count, error rate, average task duration, and a JSON export file with complete metric history