Agent Development Kit
Agent Development Kit (ADK) is a flexible and modular framework for developing and deploying AI agents. ADK can be used with popular LLMs and open-source generative AI tools and is designed with a focus on tight integration with the Google ecosystem and Gemini models. ADK makes it easy to get started with simple agents powered by Gemini models and Google AI tools while providing the control and structure needed for more complex agent architectures and orchestration.
Opik integrates with ADK to log traces for all ADK agent executions.
Getting started
First, ensure you have both opik
and google-adk
installed:
You can also set up Opik by using the opik configure command. This will ask you to enter either your local server address or your API key if you’re using the Cloud version:
Logging ADK agent executions
To track your ADK agent’s activity, use OpikTracer
. This tracker records everything your agent does and saves it to Opik:
Each agent execution will now be automatically logged to the Opik platform:

Troubleshooting: Missing Trace
When using Runner.run_async
, make sure to process all events completely, even after finding the final response (when event.is_final_response()
is True
). If you exit the loop too early, OpikTracer won’t log the final response and your trace will be incomplete. Don’t use code that stops processing events prematurely:
There is an upstream discussion about how to best solve this source of confusion: https://github.com/google/adk-python/issues/1695.
Multi-agent instrumentation
Adding OpikTracer callbacks to a multi-agent system can be time-consuming. To make this simpler, we’ve created an experimental feature that lets you add OpikTracer callbacks to all agents at once track_adk_agent_recursive
:
opik.integrations.adk.track_adk_agent_recursive
is an experimental feature. If you find any problems while using it, please report them so they can be fixed. Logging threads
The Opik integration automatically retrieves key information from ADK Session:
- It uses the session ID as Opik Thread ID, allowing you to easily group and review traces from the same thread
- It logs the app_name and userId as metadata