← Back to Skills Marketplace
nantes

Agent Metrics

by Ivan Cetta · GitHub ↗ · v1.0.5
cross-platform ✓ Security Clean
904
Downloads
0
Stars
4
Active Installs
6
Versions
Install in OpenClaw
/install agent-metrics-osiris
Description
Monitor AI agent calls, errors, latency, and resource usage with a terminal dashboard and JSON export for observability and metrics tracking.
README (SKILL.md)

Agent Metrics Skill

Track and monitor your AI agent's behavior with built-in observability.

Files included:

  • metrics.py - Python CLI (cross-platform)
  • agent-metrics.ps1 - PowerShell wrapper (Windows)

What it does

  • Call Tracking - Count API calls, messages, tasks
  • Error Logging - Track errors with stack traces
  • Latency Metrics - Measure response times
  • Resource Usage - CPU, memory, network
  • Simple Dashboard - Terminal-based metrics view
  • Export - JSON export for external dashboards

Installation

# Install Python dependency
pip install psutil

Usage

Option 1: PowerShell (recommended on Windows)

.\agent-metrics.ps1 -Action record -MetricType call -Label "api_openai"

Option 2: Python CLI (cross-platform)

python metrics.py record --type call --label "api_openai"

Record an Error

.\agent-metrics.ps1 -Action record -MetricType error -Label "api_error" -Details "Rate limit exceeded"

Record Latency

.\agent-metrics.ps1 -Action record -MetricType latency -Label "task_process" -Value 1500

View Dashboard

.\agent-metrics.ps1 -Action dashboard

View Resource Usage (CPU, Memory, Disk)

.\agent-metrics.ps1 -Action resources

Export Metrics

.\agent-metrics.ps1 -Action export -Format json -Output metrics.json

Get Summary

.\agent-metrics.ps1 -Action summary

Metrics Types

Type Description Fields
call API call made label, timestamp
error Error occurred label, details, timestamp
latency Response time (ms) label, value, timestamp
custom Custom metric label, value

Dashboard Example

╔═══════════════════════════════════════════════╗
║           AGENT METRICS DASHBOARD            ║
╠═══════════════════════════════════════════════╣
║ Total Calls:     1,247                       ║
║ Total Errors:   23                          ║
║ Error Rate:     1.84%                        ║
║ Avg Latency:    234ms                        ║
║ Uptime:         4h 32m                      ║
╠═══════════════════════════════════════════════╣
║ Top Labels:                                  ║
║   api_openai      892 (71.5%)               ║
║   api_claude      234 (18.8%)               ║
║   task_process    121 (9.7%)                ║
╚═══════════════════════════════════════════════╝

Requirements

  • Python 3.8+
  • psutil library

License

MIT

Usage Guidance
This skill appears to be a simple, local metrics CLI and is coherent with its stated purpose, but there are a few things to check before installing or running it: - Provenance and version: the SKILL.md and registry metadata disagree on versions and declared requirements, and a PowerShell wrapper referenced in the docs is not included. Verify the source and prefer an official repository or release before trust. - Dependency install: SKILL.md asks you to run `pip install psutil`. Install dependencies in a virtualenv and from PyPI using an account you trust. - Local data and privacy: the tool writes agent_metrics.json (and any export files) to the current working directory. Error records can include stack traces which may leak sensitive info. Inspect metrics files before sharing them externally. - File paths & permissions: by default it uses the current directory and disk usage('/') — if you need different locations or tighter permissions, modify the code or run it in an isolated environment (container or dedicated user) to limit exposure. - Missing wrapper: the docs mention agent-metrics.ps1 but the file isn't present. Use the included metrics.py directly or obtain the missing wrapper from a trusted source. If you need higher assurance, ask the publisher for a canonical repo/release, verify checksums, or run the script in an isolated test environment before integrating it with production agents.
Capability Analysis
Type: OpenClaw Skill Name: agent-metrics-osiris Version: 1.0.5 The OpenClaw skill bundle 'agent-metrics-osiris' is a benign utility designed for tracking AI agent metrics and resource usage. The `SKILL.md` provides clear, non-malicious instructions and does not contain any prompt injection attempts. The `metrics.py` script uses standard Python libraries and `psutil` to record metrics to a local JSON file and display system resource information. There is no evidence of data exfiltration, unauthorized execution, persistence mechanisms, or other malicious behaviors. All actions align with the stated purpose of observability and monitoring.
Capability Assessment
Purpose & Capability
metrics.py implements call/error/latency/resource tracking and a terminal dashboard, which aligns with the skill description. However, there are inconsistencies: the registry metadata lists no required binaries while SKILL.md metadata states it requires python and the psutil pip package; SKILL.md references a PowerShell wrapper (agent-metrics.ps1) that is not present in the file manifest; SKILL.md version (1.0.3) differs from the registry version (1.0.5). These mismatches don't imply malicious behavior but reduce trust in provenance.
Instruction Scope
Instructions stay within the expected scope (install psutil, run the CLI or the recommended PowerShell wrapper, record/view/export metrics). But SKILL.md tells the agent to use a PowerShell wrapper that isn't included and to run pip install psutil even though there is no install spec — the actions are appropriate for a local metrics tool, but the missing wrapper/file and metadata drift are concerning.
Install Mechanism
There is no formal install spec in the registry (instruction-only), and SKILL.md simply instructs users to run pip install psutil. That is a low-risk, common approach, but because installation is ad-hoc (manual pip) users should install dependencies from trusted sources and consider using a virtualenv.
Credentials
The skill requires no credentials or environment variables. It only reads/writes a local JSON file (agent_metrics.json) and queries local system metrics (psutil, disk usage '/'). No network calls or secrets are requested. Note: recorded errors may include stack traces which can inadvertently capture sensitive local information.
Persistence & Privilege
The skill does not request always: true, does not modify other skills or system-wide configurations, and does not persist beyond creating/updating its own metrics file in the working directory. Privilege footprint is limited to local file I/O and standard psutil queries.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-metrics-osiris
  3. After installation, invoke the skill by name or use /agent-metrics-osiris
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.5
Force rescan - verified working
v1.0.4
Force rescan - updated version
v1.0.3
Added resources command (CPU/memory/disk via psutil), added stack traces to errors
v1.0.2
Fixed export handler bug, fixed unicode issues, fixed deprecated datetime.utcnow
v1.0.1
Fixed SKILL.md - clarified both PowerShell and Python files exist, added file listing
v1.0.0
Initial release of agent-metrics-osiris: - Provides observability and metrics for AI agents, including call tracking, error logging, and latency measurement. - Tracks resource usage such as CPU, memory, and network. - Offers a terminal-based dashboard for viewing metrics. - Supports JSON export for integration with external dashboards. - Simple command-line usage for recording, viewing, and exporting metrics. - Requires Python 3.8+ and the psutil library.
Metadata
Slug agent-metrics-osiris
Version 1.0.5
License
All-time Installs 4
Active Installs 4
Total Versions 6
Frequently Asked Questions

What is Agent Metrics?

Monitor AI agent calls, errors, latency, and resource usage with a terminal dashboard and JSON export for observability and metrics tracking. It is an AI Agent Skill for Claude Code / OpenClaw, with 904 downloads so far.

How do I install Agent Metrics?

Run "/install agent-metrics-osiris" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Metrics free?

Yes, Agent Metrics is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Agent Metrics support?

Agent Metrics is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Metrics?

It is built and maintained by Ivan Cetta (@nantes); the current version is v1.0.5.

💬 Comments