agent-observability
Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking…
от j4flmao★ 47 звёзд на GitHub
Установить agent-observability в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Agent Observability
Purpose
This skill provides the complete knowledge required to build production-grade observability systems for AI agent deployments. Unlike traditional software where execution paths are deterministic and debuggable with standard tools, agent systems exhibit non-deterministic reasoning loops, branching decision trees, variable-length tool call chains, and stochastic output variations that demand specialized observability infrastructure.
The skill covers every dimension of agent observability: capturing and visualizing reasoning traces that show why an agent made each decision, integrating OpenTelemetry to instrument every LLM call and tool invocation, propagating distributed trace context across multi-agent chains, maintaining tamper-evident decision audit logs, profiling performance bottlenecks in agent pipelines, detecting anomalous behavior patterns that indicate drift or failure, tracking costs across model providers and optimizing token usage, and analyzing latency to identify and eliminate bottlenecks in the agent execution critical path.
Core Principles
Trace Everything, Sample Intelligently: Every LLM call, tool invocation, and decision point must be instrumentable. In production, use head-based and tail-based sampling to control volume while guaranteeing capture of errors and anomalies.
Reasoning is the Primary Signal: Traditional metrics (latency, throughput, errors) are necessary but insufficient. The agent's reasoning trace—the chain of observations, thoughts, and actions—is the primary debugging and auditing artifact.
Correlation Across Boundaries: A single user request may traverse multiple agents, tools, sandboxes, and external APIs. Trace context must propagate across all boundaries to enable end-to-end visibility.
Cost is a First-Class Metric: Token consumption, API call counts, and dollar costs must be tracked with the same rigor as latency and error rates. Cost anomalies often indicate reasoning loops or prompt inefficiencies.
Detect Drift Before Failure: Anomaly detection on agent behavior distributions (response length, tool call frequency, reasoning depth) catches degradation before it manifests as user-visible failures.
Agent Protocol
Triggers
- Agent system deployed to production requiring monitoring
- Debugging non-deterministic agent behavior or reasoning failures
- Cost overruns detected in agent API usage
- Compliance requirement for decision audit trails
- Performance degradation in agent response times
- New agent chain requiring end-to-end trace instrumentation
Input Context Required
- Agent system architecture (single agent, chain, graph, swarm)
- Current instrumentation state (none, partial, full OpenTelemetry)
- Observability backend (Jaeger, Tempo, Datadog, Honeycomb, custom)
- Compliance requirements (audit retention period, tamper evidence)
- Cost tracking requirements (per-request, per-agent, per-model)
- Alert thresholds (latency P99, error rate, cost per request)
Output Artifact
- Instrumentation configuration (OpenTelemetry SDK setup)
- Dashboard definitions (Grafana JSON, Datadog monitors)
- Alert rules (Prometheus alerting rules, PagerDuty integrations)
- Reasoning trace schema (structured JSON for trace storage)
- Cost attribution report (per-agent, per-model breakdown)
Response Formats
{
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"span_id": "00f067aa0ba902b7",
"agent_id": "agent-planner-01",
"request_id": "req-7f8a9b0c",
"reasoning_trace": {
"steps": [
{
"step_id": 1,
"type": "observation",
"content": "User requests weather forecast for Tokyo",
"timestamp": "2026-06-04T09:00:00.123Z",
"tokens_in": 47,
"tokens_out": 0
},
{
"step_id": 2,
"type": "thought",
"content": "Need to call weather API tool with location=Tokyo",
"timestamp": "2026-06-04T09:00:00.456Z",
"tokens_in": 0,
"tokens_out": 32,
"model": "claude-sonnet-4-20250514",
"cost_usd": 0.00048
},
{
"step_id": 3,
"type": "action",
"tool": "weather_api",
"input": {"location": "Tokyo", "units": "metric"},
"output": {"temp_c": 22, "condition": "partly_cloudy"},
"latency_ms": 340,
"timestamp": "2026-06-04T09:00:00.796Z"
}
],
"total_steps": 5,
"total_tokens": 847,
"total_cost_usd": 0.00127,
"total_latency_ms": 2340
},
"metrics": {
"llm_calls": 2,
"tool_calls": 1,
"retries": 0,
"cache_hits": 1,
"reasoning_depth": 5
}
}
Decision Matrix
START: Observability requirement identified
│
├─ What is the primary goal?
│ ├─ DEBUGGING → Focus on reasoning trace capture
│ │ ├─ Single agent? → Instrument with local span collection
│ │ └─ Multi-agent? → Deploy distributed tracing with context propagation
│ │
│ ├─
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/anomaly-detection-agents.md
- references/cost-tracking-optimization.md
- references/decision-audit-logging.md
- references/distributed-tracing-agents.md
- references/latency-analysis-optimization.md
- references/opentelemetry-agent-integration.md
- references/performance-profiling.md
- references/reasoning-trace-visualization.md
FAQ
Что делает скилл agent-observability?
Use when the user asks about agent observability, tracing agent reasoning, debugging an agent loop, OpenTelemetry GenAI spans for LLM calls, LLM cost tracking per agent, agent audit logs or hallucination/eval monitoring in production. Produces instrumentation config, trace schema, dashboards, alerts and cost attribution. Not for generic service tracing without LLMs (use devops-opentelemetry).
Как установить скилл agent-observability?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-observability запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…