> orchestration. Use when the user asks about LLM monitoring, GenAI observability, or AI cost/quality.
npx skills add https://github.com/elastic/agent-skills --skill observability-llm-obs
Answer user questions about monitoring LLMs and agentic components using data ingested into Elastic only. Focus on
LLM performance, cost and token utilization, response quality, and call chaining or agentic workflow orchestration. Use
ES|QL, Elasticsearch APIs, and (where needed) Kibana APIs. Do not rely on Kibana UI; the skill works without it. A
given deployment typically uses one or more ingestion paths (APM/OTLP traces and/or integration metrics/logs)—
discover what is available before querying.
traces* when collected by theElastic APM Agent, and in traces-generic.otel-default (and similar) when collected by OpenTelemetry. Use the
generic pattern traces* to find all trace data regardless of source. When the application is instrumented with
OpenTelemetry (e.g. Elastic
Distributions of OpenTelemetry (EDOT),
OpenLLMetry, OpenLIT, Langtrace exporting to OTLP), LLM and agent spans land in these trace data streams; metrics may
land in metrics-apm* or metrics-generic. Query traces* and metrics* data streams for per-request and
aggregated LLM signals.
(OpenAI, Azure OpenAI, Azure AI Foundry, Amazon Bedrock, Bedrock AgentCore, GCP Vertex AI, etc.), metrics and logs go
to integration data streams (e.g. metrics*, logs* with dataset/namespace per integration). Check which data
streams exist.
GET _data_stream, orGET traces*/_mapping, GET metrics*/_mapping) and optionally sample a document to see which LLM-related fields are
present. Do not assume both APM and integration data exist.
against traces* or metrics data streams.
API** (Stack |
Serverless) and Alerting API
(Stack |
Serverless) to find SLOs and alerting rules
that target LLM-related data (e.g. services backed by traces*, or integration metrics). Firing alerts or
violated/degrading SLOs point to potential degraded performance.
Spans from OTel/EDOT (and compatible SDKs) carry span attributes that may follow
OpenTelemetry GenAI semantic conventions or
provider-specific names. In Elasticsearch, attributes typically appear under span.attributes (exact key names depend
on ingestion). Common attributes:
| Purpose | Example attribute names (OTel GenAI) |
| -------------------- | --------------------------------------------------------- |
| Operation / provider | gen_ai.operation.name, gen_ai.provider.name |
| Model | gen_ai.request.model, gen_ai.response.model |
| Token usage | gen_ai.usage.input_tokens, gen_ai.usage.output_tokens |
| Request config | gen_ai.request.temperature, gen_ai.request.max_tokens |
| Errors | error.type |
| Conversation / agent | gen_ai.conversation.id; tool/agent spans as child spans |
Cost is not in the OTel spec; some instrumentations add custom attributes (e.g. llm.response.cost.usd_estimate).
Discover actual field names from the index mapping or a sample document (e.g. span.attributes.* or flattened keys).
Use duration and event.outcome on spans for latency and success/failure. Use trace.id, span.id, and
parent/child span relationships to analyze call chaining and agentic workflows (e.g. one root span, multiple LLM or
tool-call child spans).
Integrations (OpenAI, Azure OpenAI, Azure AI Foundry, Bedrock, Bedrock AgentCore, Vertex AI, etc.) ship metrics (and
where supported logs) to Elastic. Metrics typically include token usage, request counts, latency, and—where the
integration supports it—cost-related fields. Logs may include prompt/response or guardrail events. Exact field names and
data streams are defined by each integration package; discover them from the integration docs or from the target data
stream mapping.
GET _data_stream and filter for traces*, metrics-apm* (or metrics*), and metrics-* /logs-* that match known LLM integration datasets (e.g. from
traces*, run a small search or use mapping to see if spans contain gen_ai.* orllm.* (or similar) attributes. Confirm presence of token, model, and duration fields.
latency, and model dimensions.
question (e.g. use traces for per-request chain analysis, integration metrics for aggregate token/cost).
services or integration metrics, and to get open or recently fired alerts. Firing alerts or SLOs in
degrading/violated status point to potential degraded performance.
traces* filtered by span attributes (e.g. gen_ai.operation.name or gen_ai.provider.namewhen present). Compute throughput (count per time bucket), latency (e.g. duration.us or span duration), and error
rate (event.outcome == "failure") by model, service, or time.
by the integration.
traces*: sum gen_ai.usage.input_tokens and gen_ai.usage.output_tokens (orequivalent attribute names) by time, model, or service. If a cost attribute exists (e.g. custom
llm.response.cost.*), sum it for cost views.
event.outcome, error.type, and span attributes (e.g. gen_ai.response.finish_reasons) intraces* to identify failures, timeouts, or content filters. Correlate with prompts/responses if captured in
attributes (e.g. gen_ai.input.messages, gen_ai.output.messages) and not redacted.
using the fields defined by that integration.
traces*. Filter by root service or trace attributes; group by trace.idand use parent/child span relationships (e.g. parent.id, span.id) to reconstruct chains (e.g. orchestration span →
multiple LLM or tool-call spans). Aggregate by span name or gen_ai.operation.name to see distribution of steps (e.g.
retrieval, LLM, tool use). Duration per span and per trace gives bottleneck and end-to-end latency.
@timestamp). When present, add service.name and optionallyservice.environment. For LLM-specific spans, filter by span attributes once you know the field names (e.g. a keyword
field for gen_ai.provider.name or gen_ai.operation.name).
LIMIT, coarse time buckets when only trends are needed, and avoid full scans over largewindows.
LLM observability progress:
- [ ] Step 1: Determine available data (traces*, metrics-apm* or metrics*, or integration data streams)
- [ ] Step 2: Discover LLM-related field names (mapping or sample doc)
- [ ] Step 3: Run ES|QL or Elasticsearch queries for the user's question (performance, cost, quality, orchestration)
- [ ] Step 4: Check for active alerts or SLOs defined on LLM-related data (Alerting API, SLOs API); field names from
Step 2 help identify related rules; firing alerts or violated/degrading SLOs indicate potential degraded performance
- [ ] Step 5: Summarize findings from ingested data only; include alert/SLO status when relevant
Assume span attributes are available as span.attributes.gen_ai.usage.input_tokens and
span.attributes.gen_ai.usage.output_tokens (adjust to actual field names from mapping):
FROM traces*
| WHERE @timestamp >= "2025-03-01T00:00:00Z" AND @timestamp <= "2025-03-01T23:59:59Z"
AND span.attributes.gen_ai.provider.name IS NOT NULL
| STATS
input_tokens = SUM(span.attributes.gen_ai.usage.input_tokens),
output_tokens = SUM(span.attributes.gen_ai.usage.output_tokens)
BY BUCKET(@timestamp, 1 hour), span.attributes.gen_ai.request.model
| SORT @timestamp
| LIMIT 500
FROM traces*
| WHERE @timestamp >= "2025-03-01T00:00:00Z" AND @timestamp <= "2025-03-01T23:59:59Z"
AND span.attributes.gen_ai.request.model IS NOT NULL
| STATS
request_count = COUNT(*),
failures = COUNT(*) WHERE event.outcome == "failure",
avg_duration_us = AVG(span.duration.us)
BY span.attributes.gen_ai.request.model
| EVAL error_rate = failures / request_count
| LIMIT 100
Get trace IDs that contain at least one LLM span and count spans per trace to see chain length:
FROM traces*
| WHERE @timestamp >= "2025-03-01T00:00:00Z" AND @timestamp <= "2025-03-01T23:59:59Z"
AND span.attributes.gen_ai.operation.name IS NOT NULL
| STATS span_count = COUNT(*), total_duration_us = SUM(span.duration.us) BY trace.id
| WHERE span_count > 1
| SORT total_duration_us DESC
| LIMIT 50
The Amazon Bedrock AgentCore integration
ships metrics to the metrics-aws_bedrock_agentcore.metrics-* data stream (time series index). Use TS for
aggregations on time series data streams (Elasticsearch 9.2+); use a time range with TRANGE (9.3+). The
integration’s dashboards and
Example: token usage (counter), invocations (counter), and average latency (gauge) by hour and agent:
TS metrics-aws_bedrock_agentcore.metrics-*
| WHERE TRANGE(7 days)
AND aws.dimensions.Operation == "InvokeAgentRuntime"
| STATS
total_tokens = SUM(RATE(aws.bedrock_agentcore.metrics.TokenCount.sum)),
total_invocations = SUM(RATE(aws.bedrock_agentcore.metrics.Invocations.sum)),
avg_latency_ms = AVG(AVG_OVER_TIME(aws.bedrock_agentcore.metrics.Latency.avg))
BY TBUCKET(1 hour), aws.bedrock_agentcore.agent_name
| SORT TBUCKET(1 hour) DESC
For Elasticsearch 8.x or when TS is not available, use FROM with BUCKET(@timestamp, 1 hour) and SUM/AVG over
the metric fields (as in the integration's alert rule templates). For other LLM integrations (OpenAI, Azure OpenAI,
Vertex AI, etc.), use that integration’s data stream index pattern and field names from its package (see
traces*, metrics, or integrationmetrics/logs). Do not describe or rely on other vendors’ UIs or products.
vs integration) exists and use it consistently for the question.
_mapping or a sample document; naming may differ (e.g. gen_ai.* vs llm.* or integration-specific fields).
alerting). Do not instruct the user to open Kibana UI.
LLM and agentic AI observability,
Observability Labs – LLM Observability,
OpenTelemetry GenAI spans. For ES|QL syntax and
query patterns, use the elasticsearch-esql skill, or look through
ES|QL TS command reference for Elastic v9.3
or higher and for Serverless, and look through
ES|QL FROM command reference for other
Elastic versions.
Assess Kubernetes workloads and cluster configuration for AKS Automatic compatibility. Identifies incompatibilities, generates fixes, and guides migration from AKS Standard to AKS Automatic. WHEN: migrate to AKS Automatic, check AKS Automatic readiness, validate manifests for Automatic, assess cluster for Automatic compatibility, fix deployment for Automatic compatibility, identify AKS Automatic migration blockers, is my cluster ready for AKS Automatic.
Discovers available Azure OpenAI model capacity across regions and projects. Analyzes quota limits, compares availability, and recommends optimal deployment locations based on capacity requirements. USE FOR: find capacity, check quota, where can I deploy, capacity discovery, best region for capacity, multi-project capacity search, quota analysis, model availability, region comparison, check TPM availability. DO NOT USE FOR: actual deployment (hand off to preset or customize after discovery), quota increase requests (direct user to Azure Portal), listing existing deployments.
Interactive guided deployment flow for Azure OpenAI models with full customization control. Step-by-step selection of model version, SKU (GlobalStandard/Standard/ProvisionedManaged), capacity, RAI policy (content filter), and advanced options (dynamic quota, priority processing, spillover). USE FOR: custom deployment, customize model deployment, choose version, select SKU, set capacity, configure content filter, RAI policy, deployment options, detailed deployment, advanced deployment, PTU deployment, provisioned throughput. DO NOT USE FOR: quick deployment to optimal region (use preset).
Unified Azure OpenAI model deployment skill with intelligent intent-based routing. Handles quick preset deployments, fully customized deployments (version/SKU/capacity/RAI policy), and capacity discovery across regions and projects. USE FOR: deploy model, deploy gpt, create deployment, model deployment, deploy openai model, set up model, provision model, find capacity, check model availability, where can I deploy, best region for model, capacity analysis. DO NOT USE FOR: listing existing deployments (use foundry_models_deployments_list MCP tool), deleting deployments, agent creation (use agent/create), project creation (use project/create).
Intelligently deploys Azure OpenAI models to optimal regions by analyzing capacity across all available regions. Automatically checks current region first and shows alternatives if needed. USE FOR: quick deployment, optimal region, best region, automatic region selection, fast setup, multi-region capacity check, high availability deployment, deploy to best location. DO NOT USE FOR: custom SKU selection (use customize), specific version selection (use customize), custom capacity configuration (use customize), PTU deployments (use customize).
This skill should be used when working with LaminDB, an open-source data framework for biology that makes data queryable, traceable, reproducible, and FAIR. Use when managing biological datasets (scRNA-seq, spatial, flow cytometry, etc.), tracking computational workflows, curating and validating data with biological ontologies, building data lakehouses, or ensuring data lineage and reproducibility in biological research. Covers data management, annotation, ontologies (genes, cell types, diseases, tissues), schema validation, integrations with workflow managers (Nextflow, Snakemake) and MLOps platforms (W&B, MLflow), and deployment strategies.
Latch platform for bioinformatics workflows. Build pipelines with Latch SDK, @workflow/@task decorators, deploy serverless workflows, LatchFile/LatchDir, Nextflow/Snakemake integration.
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.
Take elastic/observability-llm-obs from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.