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 agents 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 agents.
In an agent-based workspace, create an agent once before sending traces. Use agent addressing to select its identifier and environment. If an integration requires project_name, use the selected environment’s tracer_session_name as a compatibility value.

Installation

Install the required packages using your preferred package manager:

Setup

Sending traces to an agent requires langsmith>=0.14.9. Set your API keys, agent identifier, and environment:
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 before creating any ADK agents:
The function accepts the following optional parameters:
  • address: An agent address to send traces to instead of the one LANGSMITH_AGENT_ID and LANGSMITH_AGENT_ENVIRONMENT name, for example ls.agent_address("my-agent", "production"). Cannot be combined with project_name. Requires langsmith>=0.14.14.
  • project_name: Compatibility override for project-based tracing. Leave it unset to use the configured agent and environment.
  • 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 agent, 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: