← 返回 Skills 市场
nantes

Agent Metrics

作者 Ivan Cetta · GitHub ↗ · v1.0.5
cross-platform ✓ 安全检测通过
904
总下载
0
收藏
4
当前安装
6
版本数
在 OpenClaw 中安装
/install agent-metrics-osiris
功能描述
Monitor AI agent calls, errors, latency, and resource usage with a terminal dashboard and JSON export for observability and metrics tracking.
使用说明 (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

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-metrics-osiris
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-metrics-osiris 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug agent-metrics-osiris
版本 1.0.5
许可证
累计安装 4
当前安装数 4
历史版本数 6
常见问题

Agent Metrics 是什么?

Monitor AI agent calls, errors, latency, and resource usage with a terminal dashboard and JSON export for observability and metrics tracking. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 904 次。

如何安装 Agent Metrics?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-metrics-osiris」即可一键安装,无需额外配置。

Agent Metrics 是免费的吗?

是的,Agent Metrics 完全免费(开源免费),可自由下载、安装和使用。

Agent Metrics 支持哪些平台?

Agent Metrics 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Metrics?

由 Ivan Cetta(@nantes)开发并维护,当前版本 v1.0.5。

💬 留言讨论