Skip to main content
Google’s Agent Development Kit (ADK) is a flexible, model-agnostic framework for building and orchestrating agents. While optimized for Gemini, ADK supports any model and both simple tasks and complex multi-agent workflows. CoreWeave Agent Lens automatically traces agents built with ADK, including each agent invocation, sub-agent handoff, model call, and tool call. Agent Lens displays the captured data in the Conversations tab of your project.
This integration uses the Weights & Biases Weave SDK (weave), because the CoreWeave Forge SDK doesn’t support this framework yet. Traces you send with Weave appear in Agent Lens, because both products share the same trace data.

Trace Google ADK agents with Agent Lens

The Weave SDK autopatches Google ADK for Python so you can capture traces from your ADK agents with minimal setup. This guide shows how to initialize Weave and then run a multi-turn research agent built with Google ADK so that Agent Lens captures every agent invocation, model call, and tool call across the session.

Prerequisites

  • A CoreWeave Forge account and API key set as a WANDB_API_KEY environment variable.
  • A Google API key for Gemini.
  • Python 3.10+.

Install packages

Install the following packages in your developer environment. These provide the Weave SDK, the Google ADK framework, and the HTTP client used by the example tool.

Initialize Agent Lens in your code

Add weave.init to the project, along with your Forge team and project names, and then build an agent the way you normally would. The following code creates a research_assistant agent that uses gemini-3.6-flash and a wikipedia_search tool, then runs three questions through a single ADK session while Agent Lens captures the trace.
The example runs three turns in a single ADK session. The first two turns trigger Wikipedia lookups, and the third uses the previous conversation context to produce a summary without a tool call.Every turn passes the same session_id. ADK sets gen_ai.conversation.id from that session, so Agent Lens renders the three turns as one conversation in the Conversations tab. If you create a session per turn instead, each turn appears as a separate conversation.

View your traces in Agent Lens

After the script runs, weave.init() prints a link to your project in Weave. The same traces appear in Agent Lens, because both products share the same trace data. To view them in Agent Lens:
  1. Navigate to CoreWeave Forge and select Agent Lens from the product menu.
  2. Select your project.
  3. In the Agent Lens side menu, select Conversations, and then select your conversation.
Each turn renders as an invoke_agent span with nested chat and execute_tool spans. Each span shows its input, model, output, token usage, and tool results. For more information, see View agent activity.
Last modified on September 30, 2026