Monitoring Observability
yonatangross/orchestkit
Monitoring and observability patterns for Prometheus metrics, Grafana dashboards, Langfuse v4 LLM tracing (astype, scorecurrentspan, shouldexportspan, LangfuseMedia), and drift detection.
Monitor AI agent health, detect anomalies, set up alerting, and maintain observability dashboards for production multi-agent systems.
$ npx skills add cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install cosmicstack-labs/mercury-agent-skills agent-health-monitoring --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/categories/ai-ml/agent-health-monitoring .claude/skills/agent-health-monitoring && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "agent-health-monitoring" agent skill from https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/ai-ml/agent-health-monitoring into .claude/skills/agent-health-monitoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-health-monitoring", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/ai-ml/agent-health-monitoringType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install cosmicstack-labs/mercury-agent-skills agent-health-monitoring --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/categories/ai-ml/agent-health-monitoring .agents/skills/agent-health-monitoring && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "agent-health-monitoring" agent skill from https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/ai-ml/agent-health-monitoring into .agents/skills/agent-health-monitoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-health-monitoring", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install cosmicstack-labs/mercury-agent-skills agent-health-monitoring --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/categories/ai-ml/agent-health-monitoring .cursor/skills/agent-health-monitoring && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "agent-health-monitoring" agent skill from https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/ai-ml/agent-health-monitoring into .cursor/skills/agent-health-monitoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-health-monitoring", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/cosmicstack-labs/mercury-agent-skills.git --path categories/ai-ml/agent-health-monitoring--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install cosmicstack-labs/mercury-agent-skills agent-health-monitoring --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/categories/ai-ml/agent-health-monitoring .gemini/skills/agent-health-monitoring && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "agent-health-monitoring" agent skill from https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/ai-ml/agent-health-monitoring into .gemini/skills/agent-health-monitoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-health-monitoring", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install cosmicstack-labs/mercury-agent-skills agent-health-monitoringInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/categories/ai-ml/agent-health-monitoring .github/skills/agent-health-monitoring && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "agent-health-monitoring" agent skill from https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/ai-ml/agent-health-monitoring into .github/skills/agent-health-monitoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-health-monitoring", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install cosmicstack-labs/mercury-agent-skills agent-health-monitoring --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/categories/ai-ml/agent-health-monitoring .opencode/skills/agent-health-monitoring && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "agent-health-monitoring" agent skill from https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/ai-ml/agent-health-monitoring into .opencode/skills/agent-health-monitoring/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-health-monitoring", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
agent-health-monitoringMonitor AI agent health, detect anomalies, set up alerting, and maintain observability dashboards for production multi-agent systems.
Agent Health Monitoring is an agent skill from cosmicstack-labs/mercury-agent-skills. Monitor AI agent health, detect anomalies, set up alerting, and maintain observability dashboards for production multi-agent systems. Covers liveness checks, performance metrics, drift detection, and incident response.
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in DevOps & Cloud, covering Monitoring and alerting, Anomaly detection and GitOps. The repository describes itself as: A curated registry of reusable Mercury Agent, Open Claw or Hermes Agent skills designed for real developer workflows, persistent memory, and token-efficient execution. The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 30392fb. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python and yaml).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Agent Health Monitoring loads about 2.7k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 613 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from cosmicstack-labs/mercury-agent-skills at commit 30392fb, republished under its MIT licence (© cosmicstack-labs). 613 words, ~2,683 tokens.
.claude/skills/agent-health-monitoring/SKILL.md (or your agent's skills folder).Production multi-agent systems fail silently. An agent that stops responding, returns empty results, or enters an infinite loop can degrade an entire workflow without triggering traditional infrastructure alerts. This skill covers how to build comprehensive health monitoring, metrics collection, and alerting for AI agent fleets.
| Metric | What It Measures | Why It Matters |
|---|---|---|
| Response Rate | % of agent invocations that return a result | Dropping rate indicates crashes or context overflows |
| Latency (P50/P95/P99) | Time from invocation to response | Spikes indicate context bloat or degraded model performance |
| Error Rate | % of invocations with errors/tool failures | Rising rate indicates systemic issues |
| Step Count | Number of reasoning steps per task | Unbounded growth indicates looping behavior |
| Tool Call Success Rate | % of tool calls that succeed | Drop indicates broken integrations or rate limiting |
| Token Consumption | Tokens used per agent run | Budget anomalies indicate runaway agents |
| Context Utilization | % of context window used | High utilization risks truncation and quality loss |
| Hallucination Score | Confidence calibration or factuality checks | Degrading accuracy undermines trust |
| Level | Color | Response Time | Examples |
|---|---|---|---|
| P0 (Critical) | 🔴 Red | < 5 min | Agent completely down, data loss, security breach |
| P1 (High) | 🟠 Orange | < 15 min | Error rate > 20%, latency 5x baseline |
| P2 (Medium) | 🟡 Yellow | < 1 hour | Error rate > 5%, slow degradation |
| P3 (Low) | 🔵 Blue | < 24 hours | Single agent underperforming, minor drift |
Wrap every agent invocation with telemetry:
class MonitoredAgent:
"""Agent wrapper that collects metrics on every invocation."""
def __init__(self, agent, agent_name: str, metrics_client):
self.agent = agent
self.agent_name = agent_name
self.metrics = metrics_client
async def run(self, task: str) -> str:
start_time = time.time()
step_count = 0
token_usage = 0
try:
result = await self.agent.run(task)
# Collect metrics
duration = time.time() - start_time
self.metrics.timing(f"agent.{self.agent_name}.latency", duration)
self.metrics.increment(f"agent.{self.agent_name}.invocations")
self.metrics.increment(f"agent.{self.agent_name}.success")
self.metrics.gauge(f"agent.{self.agent_name}.steps", step_count)
return result
except Exception as e:
duration = time.time() - start_time
self.metrics.increment(f"agent.{self.agent_name}.errors")
self.metrics.timing(f"agent.{self.agent_name}.error_latency", duration)
raiseclass AgentHealthProbe:
"""Kubernetes-style health probes for AI agents."""
async def liveness_check(self, agent) -> bool:
"""Is the agent process alive and responding?"""
try:
result = await asyncio.wait_for(
agent.run("Respond with: OK"),
timeout=5.0
)
return "OK" in result
except (asyncio.TimeoutError, Exception):
return False
async def readiness_check(self, agent) -> dict:
"""Is the agent ready to accept tasks?"""
checks = {
"model_available": await self._check_model(agent),
"tools_available": await self._check_tools(agent),
"memory_available": await self._check_memory(agent),
"context_capacity": await self._check_context(agent),
}
return {
"ready": all(checks.values()),
"checks": checks
}
async def deep_check(self, agent) -> dict:
"""Full diagnostic: run a test task and validate output."""
test_task = agent.config.test_prompt
result = await agent.run(test_task)
return {
"passed": self._validate_output(result),
"output_preview": result[:200],
"latency_ms": self._last_latency
}class AnomalyDetector:
"""Detect unusual agent behavior using statistical methods."""
def __init__(self, window_size: int = 100):
self.window_size = window_size
self.metrics_history = defaultdict(list)
def record(self, agent_name: str, metric: str, value: float):
self.metrics_history[f"{agent_name}:{metric}"].append(value)
# Keep rolling window
history = self.metrics_history[f"{agent_name}:{metric}"]
if len(history) > self.window_size:
history.pop(0)
def is_anomalous(self, agent_name: str, metric: str, value: float,
z_threshold: float = 3.0) -> tuple[bool, float]:
"""Check if a value is anomalous using z-score."""
history = self.metrics_history.get(f"{agent_name}:{metric}", [])
if len(history) < 10:
return False, 0.0 # Not enough data
mean = statistics.mean(history)
stdev = statistics.stdev(history)
if stdev == 0:
return False, 0.0
z_score = (value - mean) / stdev
return abs(z_score) > z_threshold, z_scoreclass AlertManager:
"""Route alerts to the right channels based on severity."""
def __init__(self):
self.channels = {
"p0": ["pagerduty", "slack-critical", "phone"],
"p1": ["slack-critical", "email"],
"p2": ["slack-warn", "email"],
"p3": ["dashboard", "weekly-report"],
}
async def alert(self, severity: str, title: str, message: str,
context: dict = None):
"""Send an alert through the appropriate channels."""
channels = self.channels.get(severity, self.channels["p3"])
for channel in channels:
await self._send(channel, {
"severity": severity,
"title": title,
"message": message,
"context": context,
"timestamp": datetime.now().isoformat()
})# alert-rules.yaml
rules:
- name: agent_down
condition: liveness_check == false
for: 30s
severity: P0
message: "Agent {name} is unresponsive"
- name: high_error_rate
condition: error_rate > 0.20
for: 5m
severity: P1
message: "Agent {name} error rate is {error_rate:.0%}"
- name: latency_spike
condition: p99_latency > 30s
for: 3m
severity: P1
message: "Agent {name} p99 latency is {latency:.1f}s"
- name: looping_detected
condition: step_count > max_steps * 0.8
for: 1m
severity: P2
message: "Agent {name} approaching step limit on {task_count} tasks"
- name: budget_anomaly
condition: token_usage > daily_budget * 0.5
for: 1h
severity: P2
message: "Agent {name} used {usage} tokens in last hour (50% of daily budget)"Essential dashboard panels for a multi-agent system:
| Panel | Metric | Display |
|---|---|---|
| Agent Grid | Liveness per agent | Green/Red status cards |
| Latency Heatmap | P50/P95/P99 per agent | Color-coded time series |
| Error Waterfall | Error rate by agent + error type | Stacked area chart |
| Token Burn Rate | Tokens/min per agent | Line chart with budget line |
| Active Tasks | Tasks in-flight per agent | Gauge per agent |
| Top Errors | Most frequent error messages | Ranked list with count |
| Context Pressure | % context window used | Per-agent gauge cluster |
| Alert Timeline | Alerts over past 24h | Event timeline |
| Phrase | Action |
|---|---|
| "Check agent health" | Run liveness probes on all agents |
| "Show me the dashboard" | Generate or link to monitoring dashboard |
| "Why is agent X slow?" | Show latency breakdown for specific agent |
| "Any anomalies?" | Run anomaly detection on recent metrics |
| "Set up alert for..." | Create a new alert rule |
| "Agent X is down" | Trigger incident response workflow |
| "Run a health check" | Execute full liveness + readiness + deep check |
| Anti-Pattern | Why It Fails | Fix |
|---|---|---|
| Monitoring only liveness | Agent can be "alive" but useless | Add readiness + deep checks |
| Same threshold for all agents | Different agents have different baselines | Per-agent dynamic thresholds |
| No alert deduplication | Alert fatigue leads to ignored alerts | Group by fingerprint, rate-limit |
| Fixing symptoms, not causes | Band-aid solutions mask root issues | Always capture root cause in alerts |
| No dashboard | No shared visibility | Build and maintain a live dashboard |
© cosmicstack-labs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in categories/ai-ml/agent-health-monitoring of cosmicstack-labs/mercury-agent-skills.
Open the folder on GitHubat commit 30392fb
Agent Health Monitoring next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Agent Health Monitoring this skillcosmicstack-labs/mercury-agent-skills | 476 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Monitoring Observabilityyonatangross/orchestkit | 292 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Monitoringericrisco/rsc-harness | 180 | — | ~3.1k | Automated safety check: Pass | MIT | |
| Kubernetes Network Root Cause Analysiskubeshark/kubeshark | 12k | — | ~5.3k | Automated safety check: Pass | Apache-2.0 | |
| Axiom Dashboard Builderopenclaw/clawhub | 9.5k | — | ~4.9k | Automated safety check: Pass | MIT | |
| Docs Corpus Auditmicrosoft/apm | 4k | — | ~2.6k | Automated safety check: Pass | MIT |
yonatangross/orchestkit
Monitoring and observability patterns for Prometheus metrics, Grafana dashboards, Langfuse v4 LLM tracing (astype, scorecurrentspan, shouldexportspan, LangfuseMedia), and drift detection.
ericrisco/rsc-harness
A skill your agent uses when setting up uptime and health monitoring, alerts, or on-call basics for a service already in production, so you learn it is down before customers do — health and…
kubeshark/kubeshark
Investigates past Kubernetes incidents from Kubeshark traffic snapshots: takes captures, dissects API calls, extracts PCAPs and compares traffic over time.
openclaw/clawhub
Designs and deploys Axiom dashboards through the API, choosing chart types and writing APL or metrics queries, with templates and migration notes for Splunk and Grafana.
microsoft/apm
A skill your agent uses to run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code, page-by-page, and emit surgical fixes for stale claims.
slopus/happy
Queries live Prometheus metrics and manages Grafana dashboards as code for Happy's infrastructure, using the grafanactl CLI and the Grafana datasource proxy API.
cosmicstack-labs/mercury-agent-skills
Use this before implementing a product, feature, SaaS, AI app, or side project to score product risk and choose the smallest validation step.
cosmicstack-labs/mercury-agent-skills
HyperFrames CLI dev loop — project scaffolding, validation (lint/inspect), browser preview with live reload, MP4/WebM rendering, and environment troubleshooting (doctor, browser, info, upgrade).
cosmicstack-labs/mercury-agent-skills
Asset preprocessing for HyperFrames compositions — local text-to-speech narration (Kokoro-82M, no API key), audio/video transcription (Whisper), and background removal for transparent overlays…
cosmicstack-labs/mercury-agent-skills
Design and implement agent-to-agent handoff protocols for multi-agent systems.
cosmicstack-labs/mercury-agent-skills
Design and operate task delegation systems for multi-agent fleets.
cosmicstack-labs/mercury-agent-skills
Convert Markdown to publication-quality PDF with reportlab — CJK/Latin mixed text, themes, cover pages, watermarks, callouts, formulas, and interactive theme selection
Categories
Monitor AI agent health, detect anomalies, set up alerting, and maintain observability dashboards for production multi-agent systems. Agent Health Monitoring is an agent skill from cosmicstack-labs/mercury-agent-skills. Monitor AI agent health, detect anomalies, set up alerting, and maintain observability dashboards for production multi-agent systems.
Agent Health Monitoring fits situations like: tasks that involve Monitoring and alerting; tasks that involve Anomaly detection; tasks that involve GitOps.
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring -a claude-code`. Or copy the skill folder (categories/ai-ml/agent-health-monitoring in cosmicstack-labs/mercury-agent-skills) into .claude/skills/agent-health-monitoring in your project. Claude Code loads it when a task matches its description.
Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring -a codex`. Or copy the skill folder (categories/ai-ml/agent-health-monitoring in cosmicstack-labs/mercury-agent-skills) into .agents/skills/agent-health-monitoring in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cosmicstack-labs/mercury-agent-skills --skill agent-health-monitoring -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-health-monitoring, .gemini/skills/agent-health-monitoring, .github/skills/agent-health-monitoring and .opencode/skills/agent-health-monitoring in your project.
SKILL.md names no scripts, command-line tools or credentials: Agent Health Monitoring is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Agent Health Monitoring is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Agent Health Monitoring: Monitoring Observability (yonatangross/orchestkit, 292 stars), Monitoring (ericrisco/rsc-harness, 180 stars), Kubernetes Network Root Cause Analysis (kubeshark/kubeshark, 12k stars) and Axiom Dashboard Builder (openclaw/clawhub, 9.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
cosmicstack-labs (a GitHub organization) maintains it in cosmicstack-labs/mercury-agent-skills, which has 476 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on August 25, 2026.
Source: cosmicstack-labs/mercury-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.