Loading...
Loading...
Node.js CLI for interacting with the AO Task Monitor API - get system health, alerts, logs, and task metrics for AO processes
npx skill4agent add permaweb/skills monitorskills/monitor/index.mjshttps://ao-task-monitor.onrender.com# Add to ~/.zshrc
export AO_MONITOR_KEY="YOUR_KEY_HERE"
# Reload
source ~/.zshrc# Add to ~/.bashrc
export AO_MONITOR_KEY="YOUR_KEY_HERE"
# Reload
source ~/.bashrcexport AO_MONITOR_KEY="YOUR_KEY_HERE"node skills/monitor/index.mjs summary --token "YOUR_KEY_HERE"node skills/monitor/index.mjs summary--period <1h|4h|8h|24h|48h>--include <csv>counts,kpis,latency--format <json|text># Default summary
node skills/monitor/index.mjs summary
# Last 24 hours, text format
node skills/monitor/index.mjs summary --period 24h --format text
# Only counts and KPIs
node skills/monitor/index.mjs summary --include counts,kpisnode skills/monitor/index.mjs task <taskId>--period <1h|4h|8h|24h|48h>--include <csv>--format <json|text># Get ao-token-info task details
node skills/monitor/index.mjs task ao-token-info
# With 48-hour window and text output
node skills/monitor/index.mjs task ao-token-info --period 48h --format textnode skills/monitor/index.mjs alerts--period <1h|4h|8h|24h|48h>--format <json|text># Current alerts
node skills/monitor/index.mjs alerts
# Last 4 hours, text format
node skills/monitor/index.mjs alerts --period 4h --format text# All logs
node skills/monitor/index.mjs logs
# Task-specific logs
node skills/monitor/index.mjs logs <taskId>--limit <n>--offset <n>--status <success|failure|timeout>--error-type <string>--since <isoTimestamp>--until <isoTimestamp>--task-id <taskId># Recent logs
node skills/monitor/index.mjs logs
# Task-specific logs
node skills/monitor/index.mjs logs ao-token-info
# Failed executions only
node skills/monitor/index.mjs logs --status failure
# Logs with 503 errors
node skills/monitor/index.mjs logs --error-type 503
# Last 50 logs since yesterday
node skills/monitor/index.mjs logs --limit 50 --since 2024-01-01T00:00:00Z
# Paginated results
node skills/monitor/index.mjs logs --limit 100 --offset 100node skills/monitor/index.mjs docsnode skills/monitor/index.mjs request <endpoint> <method> [body]endpoint/v1/summarymethodbody# GET request
node skills/monitor/index.mjs request /v1/summary GET
# GET with query params
node skills/monitor/index.mjs request "/v1/summary?format=text" GET
# POST with JSON body
node skills/monitor/index.mjs request /v1/api/agent POST '{"task_id":"123","status":"running"}'
# PUT request
node skills/monitor/index.mjs request /v1/api/agent/456 PUT '{"name":"Updated Agent"}'| Option | Description |
|---|---|
| Override API base URL |
| Override auth token (instead of AO_MONITOR_KEY) |
| Request timeout in milliseconds (default: 30000) |
| Show help message |
# Use different API server
node skills/monitor/index.mjs summary --base-url https://my-monitor.example.com
# Override token for single request
node skills/monitor/index.mjs alerts --token "different_key"
# Longer timeout for slow connections
node skills/monitor/index.mjs logs --timeout-ms 60000| Parameter | Values | Description |
|---|---|---|
| | Time window for metrics |
| CSV of fields | Fields to include in response |
| | Response format |
countskpislatency| Parameter | Type | Description |
|---|---|---|
| integer | Max results (1-1000, default: 100) |
| integer | Pagination offset |
| string | |
| string | Filter by error substring |
| ISO timestamp | Logs after this time |
| ISO timestamp | Logs before this time |
| string | Filter by task ID |
# Quick overview
node skills/monitor/index.mjs summary --format text
# Check for any alerts
node skills/monitor/index.mjs alerts# See if task has issues
node skills/monitor/index.mjs task ao-token-info --period 24h
# Get recent failures
node skills/monitor/index.mjs logs ao-token-info --status failure --limit 20
# Search for specific error
node skills/monitor/index.mjs logs --error-type "503" --limit 50# Last 100 logs
node skills/monitor/index.mjs logs
# Last hour of logs
node skills/monitor/index.mjs logs --since "$(date -u -v-1H +%Y-%m-%dT%H:%M:%SZ)"
# Successful runs only
node skills/monitor/index.mjs logs --status success --limit 50# Task metrics
node skills/monitor/index.mjs task ao-token-info --include counts,kpis,latency
# Task logs
node skills/monitor/index.mjs logs ao-token-info --limit 50# Find timeout issues
node skills/monitor/index.mjs logs --status timeout
# Check latency metrics
node skills/monitor/index.mjs summary --include latencyAO_MONITOR_KEY--tokenError: No authentication token provided.
Set the AO_MONITOR_KEY environment variable:
export AO_MONITOR_KEY="your_key_here"
Or use the --token flag:
node skills/monitor/index.mjs summary --token "your_key_here"AO_MONITOR_KEYError: Request failed with status 404
Not Found: Task 'invalid-task' does not exist--timeout-ms# System overview
node skills/monitor/index.mjs summary
# Text format summary
node skills/monitor/index.mjs summary --format text
# Last 24h summary
node skills/monitor/index.mjs summary --period 24h
# Check alerts
node skills/monitor/index.mjs alerts
# Task details
node skills/monitor/index.mjs task ao-token-info
# Recent logs
node skills/monitor/index.mjs logs
# Task logs
node skills/monitor/index.mjs logs ao-token-info
# Failed runs
node skills/monitor/index.mjs logs --status failure
# Search errors
node skills/monitor/index.mjs logs --error-type "503"
# API docs
node skills/monitor/index.mjs docs
# Custom request
node skills/monitor/index.mjs request /v1/summary GET