
Google Agents Cli Observability
- 64.2k installs
- 5.4k repo stars
- Updated July 23, 2026
- google/agents-cli
Google-agents-cli-observability is a skill for adding observability to agents using Cloud Trace, logging, and integrations.
About
Google-agents-cli-observability is a skill for adding observability to agents on Gemini Enterprise Agent Platform. It covers Cloud Trace integration for distributed tracing, logging configuration, and third-party integrations for monitoring and debugging agent behavior in production.
- Cloud Trace integration for distributed tracing of agents
- Logging configuration and third-party integrations
- Observability best practices for production agents
Google Agents Cli Observability by the numbers
- 64,192 all-time installs (skills.sh)
- +8,435 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #9 of 610 Debugging skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
google-agents-cli-observability capabilities & compatibility
- Capabilities
- logging · tracing · monitoring
- Works with
- datadog · grafana · sentry
- Use cases
- debugging
- Runs
- Remote server
- Pricing
- Free
npx skills add https://github.com/google/agents-cli --skill google-agents-cli-observabilityAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 64.2k |
|---|---|
| repo stars | ★ 5.4k |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 23, 2026 |
| Repository | google/agents-cli ↗ |
How do you log ADK agent events to BigQuery?
Add observability to deployed agents using Cloud Trace, logging, and third-party integrations for monitoring and debugging
Who is it for?
Production monitoring,Debugging,Performance analysis
Skip if: Local-only debugging without cloud logging, projects without BigQuery access, or developers still scaffolding who have not deployed an agent yet.
When should I use this skill?
The user wants agent conversation logging, BigQuery analytics, Looker dashboards, or tool provenance tracking for ADK agents.
What you get
BigQuery tables of agent sessions, tool provenance records, LLM judgments, and Looker Studio-ready analytics datasets.
- BigQuery agent event tables
- Tool provenance and session analytics datasets
By the numbers
- Tracks 5 tool provenance categories: LOCAL, MCP, SUB_AGENT, A2A, TRANSFER_AGENT
- Uses BigQuery Storage Write API for structured event logging
Files
ADK 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). Runagents-cli infra single-project --project PROJECT_IDto provision these resources. Seereferences/cloud-trace-and-logging.mdfor details, env vars, and verification commands. If your project isn't scaffolded yet, see/google-agents-cli-scaffoldfirst.
Order of operations for agent_runtime deployments
For deployment_target = agent_runtime, run agents-cli infra single-project before the first agents-cli deploy. The Terraform module owns the entire Reasoning Engine resource (display_name, service account, deployment spec, env vars), so applying it after a SDK-based deploy creates a state mismatch — Terraform has no record of the SDK-deployed instance and cannot layer env vars onto it without taking ownership of the whole resource.
If you have already run agents-cli deploy, you have two options:
1. Switch to Terraform-managed. Delete the SDK-deployed Reasoning Engine, then run agents-cli infra single-project followed by agents-cli deploy. Sessions and any in-flight state on the previous instance are lost. 2. Keep the SDK-deployed instance. Skip infra single-project and set the observability env vars on the running instance directly via the vertexai client update API. You will also need to grant the instance's service account the IAM permissions required to emit telemetry — writing to the logs GCS bucket, BigQuery dataset access, log writer, etc. See deployment/terraform/single-project/iam.tf and telemetry.tf in your scaffolded project for the full set of bindings the Terraform module would otherwise provision. Terraform-managed env vars are not 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 |
---
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 | ADK agents only | 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 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 ADK 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
ADK uses OpenTelemetry to emit distributed traces. Every agent invocation produces spans that track the full execution flow.
Span Hierarchy
invocation
└── agent_run (one per agent in the chain)
├── call_llm (model request/response)
└── execute_tool (tool execution)Setup by Deployment Type
| Deployment | Setup |
|---|---|
| Agent Runtime | Automatic — traces are exported to Cloud Trace by default |
| Cloud Run (scaffolded) | Automatic — otel_to_cloud=True in the FastAPI app |
| GKE (scaffolded) | Automatic — otel_to_cloud=True in the FastAPI app |
| Cloud Run / GKE (manual) | Configure OpenTelemetry exporter in your app |
| Local dev | Works with agents-cli playground; traces visible in Cloud Console |
View traces: Cloud Console → Trace → Trace explorer
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 (model name, tokens, timing) and exports to GCS (JSONL) and BigQuery (via direct log sinks and external tables). Privacy-preserving by default — only metadata is logged unless explicitly configured otherwise.
Key env var: OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT — OTel GenAI semantic-conventions standard (modes: span_only, event_only, span_and_event, no_content). The scaffolded setup_telemetry() collapses every non-false value to NO_CONTENT (metadata-only); false disables capture. Logging is disabled locally unless LOGS_BUCKET_NAME is set.
For scaffolded project details (Terraform resources, env vars, privacy modes, 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
Optional 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
ADK supports several third-party observability platforms. Each uses OpenTelemetry or custom instrumentation to capture agent behavior.
| 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. For setup details, fetch the relevant ADK docs page from the Deep Dive table below.
---
Troubleshooting
| Issue | Solution |
|---|---|
| No traces in Cloud Trace | Verify otel_to_cloud=True in FastAPI app; check service account has cloudtrace.agent role |
| Prompt-response data not appearing | Check LOGS_BUCKET_NAME is set; verify SA has storage.objectCreator on the bucket; check app logs for telemetry setup warnings |
| Privacy mode misconfigured | Check OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT value — use NO_CONTENT for metadata-only, false to disable |
| BigQuery Analytics not logging | Verify plugin is configured in app/agent.py; check BQ_ANALYTICS_DATASET_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 | Tool execution spans appear under execute_tool — check trace explorer filters |
| High telemetry costs | Switch to NO_CONTENT mode; reduce BigQuery retention; disable unused tiers |
---
Deep Dive: ADK Docs (WebFetch URLs)
For detailed documentation beyond what this skill covers, fetch these pages:
| Topic | URL |
|---|---|
| Observability overview | https://adk.dev/observability/index.md |
| Agent activity logging | https://adk.dev/observability/logging/index.md |
| Cloud Trace integration | https://adk.dev/integrations/cloud-trace/index.md |
| BigQuery Agent Analytics | https://adk.dev/integrations/bigquery-agent-analytics/index.md |
| AgentOps | https://adk.dev/integrations/agentops/index.md |
| Arize AX | https://adk.dev/integrations/arize-ax/index.md |
| Phoenix (Arize) | https://adk.dev/integrations/phoenix/index.md |
| MLflow tracing | https://adk.dev/integrations/mlflow-tracing/index.md |
| Monocle | https://adk.dev/integrations/monocle/index.md |
| W&B Weave | https://adk.dev/integrations/weave/index.md |
| Freeplay | https://adk.dev/integrations/freeplay/index.md |
---
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
BigQuery Agent Analytics Plugin
Opt-in. Enable with--bq-analyticsat scaffold time, or add manually toapp/agent.py.
An optional plugin that logs structured agent events directly to BigQuery via the Storage Write API. Enables:
- Conversational analytics — session flows, user interaction patterns
- LLM-as-judge evals — structured data for evaluation pipelines
- Custom dashboards — Looker Studio integration
- Tool provenance tracking — LOCAL, MCP, SUB_AGENT, A2A, TRANSFER_AGENT
Enabling
| Method | How |
|---|---|
| At scaffold time | agents-cli scaffold create <project-name> --bq-analytics |
| Post-scaffold | Add the plugin manually to app/agent.py (see ADK docs) |
Infrastructure (BigQuery dataset, GCS offloading) is provisioned automatically by Terraform when enabled at scaffold time.
Key Features
- Auto-schema upgrade (new fields added without migration)
- GCS offloading for multimodal content (images, audio)
- Distributed tracing via OpenTelemetry span context
- SQL-queryable event log for all agent interactions
For full schema, SQL query examples, and Looker Studio setup, fetch https://adk.dev/integrations/bigquery-agent-analytics/index.md.
Cloud Trace & Prompt-Response Logging (Scaffolded Projects)
Assumes `/google-agents-cli-scaffold` scaffolding. Observability infrastructure is provisioned by Terraform in scaffolded projects.
Cloud Trace
Always-on distributed tracing via otel_to_cloud=True in the FastAPI app. Tracks requests through LLM calls and tool executions with latency analysis and error visibility.
View traces: Cloud Console → Trace → Trace explorer
No configuration required. Works in local dev (agents-cli playground) and all deployed environments.
Prompt-Response Logging Infrastructure
All provisioned automatically by deployment/terraform/single-project/telemetry.tf (and the cicd/ variant):
- Log sinks — Route GenAI inference logs and feedback logs directly to BigQuery (partitioned tables)
- BigQuery dataset — Telemetry dataset with external tables over GCS data and pre-created log export table
- Pre-created log export table —
gen_ai_client_inference_operation_detailstable with Cloud Logging BQ export schema (labels flattened: dots become underscores) - GCS logs bucket — Stores completions as NDJSON
- BigQuery connection — Service account for GCS access from BigQuery
- Completions view — Joins BQ log export data with GCS-stored prompt/response data
Check deployment/terraform/single-project/telemetry.tf for exact configuration. IAM bindings grant log sink service accounts roles/bigquery.dataEditor on the telemetry dataset.
Environment Variables
Set automatically by Terraform on the deployed service:
| Variable | Purpose |
|---|---|
LOGS_BUCKET_NAME | GCS bucket for completions and logs. Required to enable prompt-response logging |
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT | Controls logging state and content capture |
BQ_ANALYTICS_DATASET_ID | BigQuery dataset for telemetry (only when scaffolded with --bq-analytics) |
BQ_ANALYTICS_CONNECTION_ID | BigQuery connection for GCS access (only when scaffolded with --bq-analytics) |
BQ_ANALYTICS_GCS_BUCKET | GCS bucket for BigQuery Analytics multimodal offloading (only when scaffolded with --bq-analytics) |
GENAI_TELEMETRY_PATH | Optional: override upload path within bucket (default: completions) |
Enabling / Disabling
Enable Locally
Set these before running agents-cli playground:
export LOGS_BUCKET_NAME="your-bucket-name"
export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT="NO_CONTENT"Disable in Deployed Environments
Set OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false in deployment/terraform/single-project/service.tf (or the cicd/ variant) and re-apply Terraform.
BigQuery Dataset Naming Convention
BigQuery dataset names cannot contain hyphens. Terraform automatically converts hyphens to underscores when creating dataset names from your project name:
- Project name
my-agent→ BQ datasetmy_agent_telemetry
One dataset is created:
- `{name}_telemetry` — Contains external tables over GCS completions data (NDJSON), the pre-created log export table (
gen_ai_client_inference_operation_details), and thecompletions_view
To discover the actual dataset name in your project:
bq ls --project_id=${PROJECT_ID}Verifying Telemetry
After deploying, verify prompt-response logging is working:
PROJECT_ID="your-dev-project-id"
PROJECT_NAME="your-app-name" # The agents-cli project name (not the GCP project ID)
# Check GCS data
gsutil ls gs://${PROJECT_ID}-${PROJECT_NAME}-logs/completions/
# Check BigQuery log export table (logs arrive via sink, may take a few minutes)
bq query --use_legacy_sql=false \
"SELECT COUNT(*) FROM \`${PROJECT_ID}.${PROJECT_NAME//-/_}_telemetry.gen_ai_client_inference_operation_details\`"
# Query completions external table
bq query --use_legacy_sql=false \
"SELECT * FROM \`${PROJECT_ID}.${PROJECT_NAME//-/_}_telemetry.completions\` LIMIT 10"
# Query the completions view (joins log export with GCS data)
bq query --use_legacy_sql=false \
"SELECT * FROM \`${PROJECT_ID}.${PROJECT_NAME//-/_}_telemetry.completions_view\` LIMIT 10"If data is not appearing: check LOGS_BUCKET_NAME is set, verify SA has storage.objectCreator on the bucket, check application logs for telemetry setup warnings. Log export to BigQuery may take a few minutes to propagate.
Related skills
How it compares
Use google-agents-cli-observability for durable BigQuery agent telemetry; use google-agents-cli-eval for trajectory correctness before production logging.
FAQ
How is BigQuery analytics enabled on ADK agents?
google-agents-cli-observability enables the plugin with --bq-analytics during agents-cli scaffold create, or by adding the BigQuery Agent Analytics plugin manually to app/agent.py after scaffolding.
What agent data does the BigQuery plugin capture?
google-agents-cli-observability logs structured agent events—including conversations, tool calls, and LLM judgments—to BigQuery via the Storage Write API for session analytics, eval pipelines, and dashboards.
Which tool provenance categories does ADK observability track?
google-agents-cli-observability tracks five tool provenance types in BigQuery: LOCAL, MCP, SUB_AGENT, A2A, and TRANSFER_AGENT, helping teams audit where agent actions originated.
Is Google Agents Cli Observability safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.