How to Trace and Evaluate a Google ADK Agent with Opik
Blog post from Comet
A practical example builds a two-agent customer-support system with Google’s Agent Development Kit and instruments it using Opik to capture agent handoffs, Gemini calls, tool calls, inputs, outputs, token usage, costs, and conversation threads. The setup uses a recursive Opik tracer for all agents and tools, while a wrapper around each customer turn keeps multi-agent handoffs within a single trace and associates turns with an ADK session thread. The project evaluates 23 challenging support scenarios, including prohibited refunds, prompt-injection-style requests, damaged products, vague requests, and multi-part questions, scoring required tool use, handoffs, refund-policy compliance, grounded order IDs, and answer relevance. It emphasizes that safety checks should inspect tool-call arguments in code rather than rely solely on an LLM judge, which incorrectly downgraded one valid refusal. In a one-trial comparison, Gemini 3.5 Flash-Lite matched Gemini 3.8 Flash on refund safety and handoffs while costing roughly five times less and responding about six times faster, though each model made different errors. The guidance extends to production use through session-based tracing, environment and model metadata, retries, version compatibility, and converting problematic production traces into future evaluation cases.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Gemini 3.8 Flash | 6 | 291 | 40 | 23 | +42% |
| LLM | 6 | 3,918 | 880 | 205 | -40% |
| Agent Evaluations | 5 | 121 | 57 | 29 | -28% |
| Gemini 3.5 Flash | 4 | 69 | 11 | 10 | -19% |
| Observability | 2 | 2,554 | 551 | 160 | -17% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.