Skip to main content
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

Use

A Runner on its own emits nothing — the trace is cut by the invocation, so the run_async loop is the part that has to run. Both create_session and run_async are async, hence the asyncio.run(); runner.run(...) is the synchronous equivalent and is traced the same way. types comes from google-genai, which google-adk already depends on. 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.
Model ids: Gemini 2.x model ids are retired upstream — use gemini-3.5-flash or newer. For non-Gemini models, ADK routes through LiteLLM: pip install "google-adk[extensions]", then from google.adk.models.lite_llm import LiteLlm and pass model=LiteLlm(model="openai/gpt-5-mini").

Explicit form — add the plugin yourself

No monkeypatch; per-Runner control over naming and trace linking:
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.

Skills (opt-in)

With the loader on, every model turn is routed through the SkillRouter and the routed menu plus skill body are appended to llm_request.config.system_instruction — the same field ADK’s own GlobalInstructionPlugin writes — so what is appended is what Gemini is sent. Bodies are injected by default here (no tool loop); decimalai.init(inject_skill_body=False) opts out. The explicit form is DecimalaiPlugin(agent_name="support", enable_skill_loader=True).

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() if you need schema-aware regression checks.
  • The explicit plugin’s agent name wins over ADK’s internal node name; the global instrument() 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.
  • Skills rail (0.12.0+): prompt injection. ADK registers no load_skill tool, so the strongest rung this rail reaches is delivered; enable_load_skill_tool=True is accepted but dormant (0.13.1). The injected prompt is recorded on the trace from 0.13.1 — earlier releases delivered it and showed nothing.
Checkpoint: run one invocation. Startup logs show DecimalAI ADK tracing installed globally, and the run appears in Traces with your Gemini calls and tool spans. The manifest (model + instruction + tools) shows on the agent’s page after the first trace.

What’s next

Multi-agent guide

Linking sub-agent Runners with parent_trace_id.

Manifests

Register a manifest explicitly to capture tool schemas.