Skip to main content

Installation

Setup

We recommend using UUIDs for session_id and user_id so traces can be grouped reliably across runs.
Call instrument() once at application startup, before creating any ADK agents or runners.

Usage

What gets traced

Token usage mapping

Thinking mode

When using Gemini models with thinking enabled, thought parts are automatically separated from answer parts. Thinking content is stored in metadata as reasoning_summary.

Example with tools

This example defines two function tools and runs an LlmAgent asynchronously using GoogleADKAdapter. We trace the agent via GoogleADKAdapter:
This produces a trace with: CHAIN (runner) → AGENT (city_info_agent) → LLM (model call) → TOOL (get_weather) → TOOL (get_population) → LLM (final response).