google-agents-cli-observability
What it does
This skill explains how to watch a deployed Google ADK agent, including tracing and prompt logging. It is for developers who run agents in production and need to debug real traffic.
When to use it
- βWhen you want to set up tracing or logging for a deployed agent.
- βWhen you need to find out why a production agent behaved a certain way.
- βWhen you want to send agent analytics to BigQuery or a third-party monitoring tool.
Skill link
https://github.com/google/agents-cli/blob/main/skills/google-agents-cli-observability/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βSet up tracing and prompt logging for my deployed ADK agent so I can see what it answers in production.β
5 new skills a week. 1 minute to read.
How it works
The skill explains which monitoring features work out of the box and which need extra cloud resources. It walks through the setup steps and the commands to check that logs and traces are arriving.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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 --apply --project PROJECT_IDto provision these resources. Go projects get the BigQuery telemetry stack too; the GCS completion upload behind prompt-response logging and the BigQuery Agent Analytics plugin are Python only. Seereferences/cloud-trace-and-logging.mdfor details, env vars, and verification commands. If your project isn't scaffolded yet, see/google-agents-cli-scaffoldfirst.
Deployment order
| Do you want Terraform-managed observability? | Action |
|---|---|
| No | Run agents-cli deploy directly (works for all targets). |
| Yes | Run agents-cli infra single-project --apply first, then agents-cli deploy. |
If you already ran agents-cli deploy imperatively:
Do not apply Terraform afterward. For Agent Runtime in Gemini platform, Terraform owns the whole engine (service account, deployment spec, env vars), so a later apply can't be reconciled without taking over the resource.
Either delete the deployment and start over, or 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 app_sa_roles) 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 ADK Python and Claude projects | Disabled locally, enabled when deployed | Auditing LLM interactions, compliance |
| BigQuery Agent Analytics | Structured agent events (LLM calls, tool use, outcomes) to BigQuery | ADK Python agents with the plugin enabled; Claude template agents | 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_contentcomes 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)
FAQ
Does Cloud Trace need extra setup?
The description says Cloud Trace works out of the box, without extra infrastructure.
What needs Terraform-managed resources?
Prompt-response logging and BigQuery Agent Analytics need resources provisioned with the infrastructure command.
What if I already deployed the agent?
The skill warns that a Terraform apply after an imperative deploy can conflict, so it explains the safe options.
Details
Original description by the author
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-deploy) or API code patterns (use google-agents-cli-adk-code).
repo: google/agents-cli
Popularity
- GitHub stars
- 6.3k
- Ranking position
- #14371
- License
- Apache-2.0
- Updated
- 10/27/2026
Comments
- β¦
More skills from this repository
google-agents-cli-adk-code
6.3kHelps your agent write code for AI agents with the Google ADK, including tools, callbacks, state and orchestration patterns.
google-agents-cli-deploy
6.3kHelps your agent deploy an AI agent to Google Cloud, covering Agent Runtime, Cloud Run, GKE, secrets, CI/CD and troubleshooting.
google-agents-cli-eval
6.3kHelps your agent evaluate an AI agent with test datasets and scoring, then find out why answers fail.
google-agents-cli-publish
6.3kHelps your agent register a deployed AI agent with Gemini, and manage registered agents and MCP servers in the Agent Registry.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.