google/agents-cli

google-agents-cli-observability

This skill should be used when the user wants to "set up tracing", "monitor my agent", "configure logging", "add observability", "debug production traffic", or needs guidance on monitoring deployed agents, including ADK (Agent Development Kit) agents. Covers Cloud Trace, prompt-response logging, BigQuery Agent Analytics, third-party integrations (AgentOps, Phoenix, MLflow, etc.), and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment setup (use google-agents-cli-dep…

All-time #267 Trending #53 Hot #1 First seen Apr 21, 2026
8-week activity · all time api

Installation

$ npx skills add google/agents-cli --skill google-agents-cli-observability

Summary

  • Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
  • Four observability tiers: Cloud Trace (always enabled, distributed tracing), Prompt-Response Logging (GenAI interactions to GCS/BigQuery), BigQuery Agent Analytics (structured agent events), and third-party integrations (AgentOps, Phoenix, MLflow, Weave, Freeplay, and others) For Agent Runtime deployments, run agents-cli infra single-project before first deploy to provision Terraform-managed infrastructure (service account, GCS bucket, BigQuery dataset); post-deployment setup requires manual IAM and env var configuration Cloud Trace works out of the box with OpenTelemetry spans tracking invocation flow, LLM calls, and tool execution; accessible via Cloud Console Trace explorer Prompt-response logging is privacy-preserving by default (metadata only via OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=NO_CONTENT ); disabled locally unless LOGS_BUCKET_NAME is set Includes troubleshooting guide covering missing traces, privacy misconfiguration, BigQuery setup, and cost optimization strategies

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Security audits

Partner security reviews for this skill.

agent-trust-hub SAFE

Analyzed May 19, 2026

This skill provides detailed guidance for establishing observability, tracing, and logging within Google ADK projects. It leverages official Google Cloud services and tools to facilitate infrastructure setup and telemetry verification.

snyk LOW

Analyzed May 19, 2026

No issues detected.

socket Score 0.9000 · 0 alerts

Analyzed May 19, 2026

  • license 1
  • maintenance 1
  • quality 0.9
  • supply chain 1
  • vulnerability 1

0 alerts

Also in this package

Other skills from google/agents-cli.

npx skills add google/agents-cli

Browse all from google/agents-cli

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 5.8K
License LICENSE
Default branch main
Open issues 30
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.5.0
LicenseApache-2.0
More metadata
author
Google
license
Apache-2.0
version
1.5.0
requires
{"bins":["agents-cli"],"install":"uv tool install google-agents-cli"}

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 11,352 B
  • docs SUMMARY.md 597 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 163,911 installs

SKILL.md

Observability Guide

Cloud Trace works out of the box — no infrastructure needed. Prompt-response logging and BigQuery Agent Analytics require Terraform-provisioned infrastructure (service account, GCS bucket, BigQuery dataset). Run agents-cli infra single-project --project PROJECT_ID to provision these resources. See references/cloud-trace-and-logging.md for details, env vars, and verification commands. If your project isn't scaffolded yet, see /google-agents-cli-scaffold first.

Order of operations for agent_runtime deployments

For deploymenttarget = agentruntime, run agents-cli infra single-project before the first agents-cli deploy. The Terraform module owns the entire Reasoning Engine resource (service account, deployment spec, env vars), so applying it after an SDK-based deploy creates a state mismatch Terraform can't reconcile without taking ownership of the whole resource.

Already ran agents-cli deploy? Two options:

  1. Switch to Terraform-managed — delete the SDK-deployed Reasoning Engine, then run agents-cli infra single-project and agents-cli deploy (sessions and in-flight state are lost).
  2. Keep the SDK-deployed instance — skip infra single-project and set the observability env vars by re-running agents-cli deploy --update-env-vars "KEY=VALUE,..."; deploy matches the existing Reasoning Engine by display name and updates it in place, preserving env vars set outside the deploy. You must also grant its service account the telemetry IAM roles the Terraform module would otherwise provision: roles/storage.admin (write completions to the logs bucket), roles/logging.logWriter, roles/cloudtrace.agent, plus roles/bigquery.dataOwner + roles/bigquery.jobUser when scaffolded with --bq-analytics. The full set lives in deployment/terraform/single-project/iam.tf (from appsaroles) and telemetry.tf. Terraform-managed env vars aren't available in this mode.

Reference Files

File Contents
references/cloud-trace-and-logging.md Scaffolded project details — Terraform-provisioned resources, environment variables, verification commands, enabling/disabling locally
references/bigquery-agent-analytics.md BQ Agent Analytics plugin — enabling, key features, GCS offloading, tool provenance
references/adk-docs.md ADK: adk.dev pages to fetch for detail beyond this skill
references/feedback-mechanism.md Adding a user-feedback endpoint — request model, structured logging, log sink → BigQuery

Observability Tiers

Choose the right level of observability based on your needs:

Tier What It Does Scope Default State Best For
Cloud Trace Distributed tracing — execution flow, latency, errors via OpenTelemetry spans All templates, all environments Always enabled Debugging latency, understanding agent execution flow
Prompt-Response Logging GenAI interactions exported to GCS, BigQuery, and Cloud Logging Scaffolded projects Disabled locally, enabled when deployed Auditing LLM interactions, compliance
BigQuery Agent Analytics Structured agent events (LLM calls, tool use, outcomes) to BigQuery ADK agents with the plugin enabled Opt-in (--bq-analytics at scaffold time) Conversational analytics, custom dashboards, LLM-as-judge evals
Third-Party Integrations External observability platforms (AgentOps, Phoenix, MLflow, etc.) Any OpenTelemetry-instrumented agent Opt-in, per-provider setup Team collaboration, specialized visualization, prompt management

Ask the user which tier(s) they need — they can be combined. Cloud Trace is always on; the others are additive.


Cloud Trace

Scaffolded agents use OpenTelemetry to emit distributed traces. Every agent invocation produces spans that track the full execution flow.

Span Hierarchy

ADK projects. These are ADK's span names; other frameworks emit their own (generate_content comes from the shared google-genai instrumentor either way).

invoke_workflow (top-level run)
  └── invoke_agent (one per agent in the chain)
        ├── call_llm (model request)
        │     └── generate_content (underlying GenAI model call)
        └── execute_tool (tool execution)

Setup by Deployment Type

Deployment Setup
Agent Runtime Automatic — exporters wired at startup, gated on GOOGLECLOUDAGENTENGINEENABLE_TELEMETRY (set by deploy); exports to Cloud Trace/Logging + Agent Engine console
Cloud Run / GKE (scaffolded) Automatic — exporters wired at startup, exports to Cloud Trace/Logging
Cloud Run / GKE (manual) Configure OpenTelemetry exporter in your app
Local dev Works with agents-cli playground; traces visible in Cloud Console

ADK: the wiring is getfastapiapp(oteltocloud=True) in app/fastapiapp.py. Other templates call their own setup at startup (e.g. app/apputils/telemetry.py).

View traces: Cloud Console → Trace → Trace explorer

ADK: for detailed setup instructions (Agent Runtime CLI/SDK, Cloud Run, custom deployments), fetch https://adk.dev/integrations/cloud-trace/index.md.


Prompt-Response Logging

Captures GenAI interactions and exports to GCS (JSONL) and BigQuery (via log sinks + external tables). Content is governed by two independent tiers; the net Terraform-deploy default is full content in GCS/BigQuery, none in traces:

Tier Captures Controlled by Default (Terraform deploy)
GCS/BigQuery completions Full prompts/responses (the prompt-response logging feature) OTELINSTRUMENTATIONGENAICOMPLETIONHOOK=upload + LOGSBUCKETNAME On — full content
Trace spans / Cloud Logging events Span/event content OTELINSTRUMENTATIONGENAICAPTUREMESSAGECONTENT (plus ADKCAPTUREMESSAGECONTENTINSPANS=false, ADK only) OffNO_CONTENT

The tiers are independent: GCS/BigQuery uploads capture full content whenever their upload vars are set and do not honor OTELINSTRUMENTATIONGENAICAPTUREMESSAGE_CONTENT, which governs the traces/events tier only. Its valid (experimental-semconv) values:

  • NO_CONTENT — no content in spans/events (scaffolded default)
  • EVENT_ONLY — content in Cloud Logging events
  • SPANONLY / SPANAND_EVENT — content in trace spans
  • true / falseinvalid; fall back to NO_CONTENT

For the full mechanics (semconv opt-in, declarative Terraform config, env-var table, enabling/disabling, verification commands), see references/cloud-trace-and-logging.md. For ADK logging docs (log levels, configuration, debugging), fetch https://adk.dev/observability/logging/index.md.


BigQuery Agent Analytics Plugin

ADK projects. Optional ADK plugin that logs structured agent events to BigQuery. Enable with --bq-analytics at scaffold time. See references/bigquery-agent-analytics.md for details.


Third-Party Integrations

Many third-party observability platforms can ingest agent telemetry (via OpenTelemetry or custom instrumentation). The table below covers common ones; the full list is larger (see the pointer below it).

Platform Key Differentiator Setup Complexity Self-Hosted Option
AgentOps Session replays, 2-line setup, replaces native telemetry Minimal No (SaaS)
Arize AX Commercial platform, production monitoring, evaluation dashboards Low No (SaaS)
Phoenix Open-source, custom evaluators, experiment testing Low Yes
MLflow OTel traces to MLflow Tracking Server, span tree visualization Medium (needs SQL backend) Yes
Monocle 1-call setup, VS Code Gantt chart visualizer Minimal Yes (local files)
Weave W&B platform, team collaboration, timeline views Low No (SaaS)
Freeplay Prompt management + evals + observability in one platform Low No (SaaS)

Ask the user which platform they prefer — present the trade-offs and let them choose. ADK: fetch a platform's setup page at https://adk.dev/integrations/<slug>/index.md (slugs for the table above: agentops, arize-ax, phoenix, mlflow-tracing, monocle, weave, freeplay); ADK has more observability integrations (Datadog, Galileo, LangWatch, Latitude, Future AGI, Respan, Zespan, …) — browse the complete, current list at https://adk.dev/integrations/ (observability topic). On other frameworks the OpenTelemetry-based platforms still work, but follow the platform's own setup docs.


Troubleshooting

Issue Solution
No traces in Cloud Trace Verify telemetry setup runs at startup (ADK: fastapiapp.py uses getfastapiapp(oteltocloud=True); Agent Runtime gates it on GOOGLECLOUDAGENTENGINEENABLETELEMETRY) and the SA has the cloudtrace.agent role
Prompt-response data not appearing Check LOGSBUCKETNAME is set; verify SA has storage.objectCreator on the bucket; check app logs for telemetry setup warnings
Content in traces/events (unwanted) OTELINSTRUMENTATIONGENAICAPTUREMESSAGECONTENT=NOCONTENT keeps content out of spans/events. NOTE: GCS/BigQuery completions still capture full content — to stop that, remove LOGSBUCKETNAME/OTELINSTRUMENTATIONGENAICOMPLETIONHOOK (drop the upload block in service.tf)
BigQuery Analytics not logging ADK: verify the plugin is configured in app/agent.py; check BQANALYTICSDATASET_ID env var is set
Third-party integration not capturing spans Check provider-specific env vars (API keys, endpoints); some providers (AgentOps) replace native telemetry
Traces missing tool spans ADK: tool execution spans appear under execute_tool (other frameworks use their own span names) — check trace explorer filters
High telemetry costs Switch to NO_CONTENT mode; reduce BigQuery retention; disable unused tiers

Related Skills

  • /google-agents-cli-deploy — Deployment targets, CI/CD pipelines, and production workflows
  • /google-agents-cli-workflow — Development workflow, coding guidelines, and operational rules
  • /google-agents-cli-adk-code — ADK Python API quick reference for writing agent code