> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracectrl.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google ADK

> Instrument Google Agent Development Kit agents with TraceCtrl

## Installation

`tracectrl` is on PyPI. The Google ADK instrumentor is not yet published — install it from the source tree.

```bash theme={"dark"}
pip install tracectrl
pip install ./sdk/tracectrl-instrumentation-google-adk
```

<Note>
  PyPI publication of `tracectrl-instrumentation-google-adk` is pending. Until then, install from a local checkout or via `pip install git+https://github.com/cloudsine/tracectrl.git#subdirectory=sdk/tracectrl-instrumentation-google-adk`.
</Note>

## Usage

```python theme={"dark"}
import tracectrl
from tracectrl import tag_agent
from tracectrl.instrumentation.google_adk import ADKInstrumentor

tracectrl.configure(service_name="my-adk-agent")
ADKInstrumentor().instrument()

from google.adk import Agent

agent = Agent(model="gemini-2.5-flash", tools=[...])
tag_agent(agent)

agent.run("Plan my trip")
```

`tag_agent(agent)` stamps the agent identity onto every downstream span so the agent shows up as a distinct node in TraceCtrl.

## What Gets Captured

Google ADK agents generate spans for:

* Agent execution lifecycle
* Gemini model calls with model name and parameters
* Tool invocations with risk category classification
* Input/output values for each step

## API

### `ADKInstrumentor()`

<ParamField path="instrument" type="method">
  `instrument(tracer_provider=None, skip_dep_check=False)` — Registers the TraceCtrl span processor and wraps the OpenInference Google ADK instrumentor.
</ParamField>

<ParamField path="uninstrument" type="method">
  `uninstrument()` — Shuts down the TraceCtrl processor and unwraps the OpenInference instrumentor.
</ParamField>

<ParamField path="instrumented" type="bool">
  Whether the instrumentor is currently active.
</ParamField>
