Skip to main content
This guide shows you how to trace Google Agent Development Kit (ADK) agents in LangSmith. You’ll configure automatic tracing for your ADK applications to capture agent invocations, tool calls, and LLM interactions.
This guide covers ADK’s standard execution paths (text agents, tools, and multi-agent workflows). To trace a Gemini Live voice agent, which uses ADK’s Runner.run_live streaming loop, see Trace Gemini Live applications.

Installation

Install the required packages using your preferred package manager:

Setup

Set your API keys:
To create a Google API key, refer to Google AI Studio.

Configure tracing

To trace ADK agents, use configure_google_adk() from the LangSmith SDK. Call this function once at the start of your application before creating any ADK agents:
The function accepts the following optional parameters:
  • project_name: LangSmith project to send traces to. Defaults to the LANGSMITH_PROJECT environment variable.
  • name: Name for the root trace. Defaults to "google_adk.session".
  • metadata: Dictionary of key-value pairs for additional context.
  • tags: List of strings to categorize traces.

Example

This example creates a weather agent with a tool, then runs it with tracing enabled:

View traces in LangSmith

After running your application, you can view traces in the LangSmith UI that include:
  • Agent invocations: Complete flows through your ADK agents
  • Tool calls: Individual function calls made by agents
  • LLM interactions: Requests and responses from Gemini models
  • Multi-agent workflows: Traces from sequential and parallel agent compositions

Custom metadata and tags

Add metadata and tags when configuring tracing to categorize and filter traces:

Multi-agent workflows

The integration automatically traces multi-agent workflows including sequential and parallel agent compositions: