Evaluating Google ADK Applications
You can set up Openlayer tests to evaluate your Google ADK applications in monitoring and development.Monitoring
To use the monitoring mode, you must instrument your code to publish the requests your AI system receives to the Openlayer platform. To set it up, you must follow the steps in the code snippet below:Python
See full Python example
- Agent execution with agent names, descriptions, and instructions
- LLM calls to Gemini models with messages and configurations
- Token usage including prompt tokens, completion tokens, and totals
- Tool calls with function names, arguments, and results
- Agent transfers and handoffs between sub-agents with proper hierarchy
- Session context including user IDs, session IDs, and invocation tracking
- Metadata such as latency and timestamps for all operations
The Google ADK integration automatically captures the full agent workflow,
including sub-agent handoffs and tool usage. You can use this together with
tracing to monitor complex multi-agent systems as part
of larger AI workflows. Make sure to call
trace_google_adk() before
creating any agents.Development
In development mode, Openlayer becomes a step in your CI/CD pipeline, and your tests get automatically evaluated after being triggered by some events. Openlayer tests often rely on your AI system’s outputs on a validation dataset. As discussed in the Configuring output generation guide, you have two options:- either provide a way for Openlayer to run your AI system on your datasets, or
- before pushing, generate the model outputs yourself and push them alongside your artifacts.
GOOGLE_API_KEY or appropriate service account credentials).
If you don’t add the required API credentials, you’ll encounter a “Missing API key” error when Openlayer tries to run your AI system to get its outputs.
