Skip to content
Back to skills

Agent Metrics Osiris

ASecurity

Observability and metrics for AI agents - track calls, errors, latency

  • 14 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 7, 2026
ai-agentspythonshellapi

Works with

  • terminal
  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill agent-metrics-osiris --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Metrics Osiris?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Metrics Osiris
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-agent-metrics-osiris/badge)](https://www.skillsdirectory.com/skills/modbender-agent-metrics-osiris)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-metrics
description: Observability and metrics for AI agents - track calls, errors, latency
---


# 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

```powershell
# Install Python dependency
pip install psutil
```

## Usage

### Option 1: PowerShell (recommended on Windows)

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

### Option 2: Python CLI (cross-platform)

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

### Record an Error

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

### Record Latency

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

### View Dashboard

```powershell
.\agent-metrics.ps1 -Action dashboard
```

### View Resource Usage (CPU, Memory, Disk)

```powershell
.\agent-metrics.ps1 -Action resources
```

### Export Metrics

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

### Get Summary

```powershell
.\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

Files in this skill

  • SKILL.md3.2 KB
  • metrics.py8.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…