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

# Google ADK

> Auto-instrument Google ADK (Agent Development Kit) via a native ADK plugin. One trace per invocation with model, tools, and sub-agent activity.

First-class tracing for `google-adk` via a native ADK `BasePlugin`. One DecimalAI trace is captured per ADK **invocation** (one `Runner.run` / `run_async`), with LLM generations, tool calls, and sub-agent activity recorded against it. The root agent's model, instruction, tools, and sub-agents are auto-registered as a manifest.

ADK is Gemini-native; the release gate pairs this adapter with the `google` provider only.

## Install

```bash theme={null}
pip install "decimalai[adk]"
```

## Use

```python theme={null}
import decimalai
decimalai.init(api_key="dai_sk_...", adk=True)

# Every Runner created afterwards is traced
from google.adk.runners import Runner
runner = Runner(agent=my_agent, app_name="support", session_service=svc)
# all runner.run_async(...) invocations are now traced
```

The flag form monkeypatches `Runner.__init__` so a shared DecimalAI plugin is auto-injected into every `Runner` created afterwards — call `init(adk=True)` before constructing Runners.

### Explicit form — add the plugin yourself

No monkeypatch; per-Runner control over naming and trace linking:

```python theme={null}
from decimalai.adk import DecimalaiPlugin
from google.adk.runners import Runner

runner = Runner(
    agent=my_agent, app_name="support", session_service=svc,
    plugins=[DecimalaiPlugin(agent_name="support")],
)
```

`DecimalaiPlugin` also accepts `project=` (trace grouping) and `parent_trace_id=` — pass the parent's trace id when this Runner runs as a sub-agent of another orchestrator, and the child traces link to it in the backend.

## What gets captured

* One trace per invocation: LLM generations, tool calls with inputs/results, and sub-agent activity
* Auto-detected manifest from the root agent: model, instruction (system prompt), tools (names + descriptions), and sub-agents
* Errors: model/tool errors mark their span; the invocation's end status is recorded on the trace

## Caveats

* Manifest tool depth is **names + descriptions**, not full JSON schemas — use [`register_manifest()`](/sdk/python/manifests) if you need schema-aware regression checks.
* The explicit plugin's agent name wins over ADK's internal node name; the global `install()` form falls back to the ADK agent's own `.name`.
* `DECIMAL_AUTO_TRACE=adk` works for zero-code setup, provided `DECIMAL_API_KEY` is also set.
* No skills rail on this adapter yet — skills for ADK agents are a prompt-assembly exercise via [`SkillRouter.build_prompt_fragment()`](/sdk/python/skills).

<Check>
  **Checkpoint:** run one invocation. Startup logs show `DecimalAI ADK tracing installed globally`, and the run appears in [Traces](https://app.decimal.ai/traces) with your Gemini calls and tool spans. The manifest (model + instruction + tools) shows on the agent's page after the first trace.
</Check>

## What's next

<CardGroup cols={2}>
  <Card title="Multi-agent guide" icon="users" href="/guides/multi-agent">
    Linking sub-agent Runners with parent\_trace\_id.
  </Card>

  <Card title="Manifests" icon="layer-group" href="/sdk/python/manifests">
    Register a manifest explicitly to capture tool schemas.
  </Card>
</CardGroup>
