From 8bed01cbdc5961c0d219fd6389f492f1a4235de5 Mon Sep 17 00:00:00 2001 From: Mimi Sun Date: Mon, 5 Jan 2026 11:20:51 -0800 Subject: [PATCH] fix: make the BigQuery analytics plugin work with agents that don't have instructions such as the LoopAgent PiperOrigin-RevId: 852382657 --- src/google/adk/plugins/bigquery_agent_analytics_plugin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/google/adk/plugins/bigquery_agent_analytics_plugin.py b/src/google/adk/plugins/bigquery_agent_analytics_plugin.py index 1583026b..8e0f646d 100644 --- a/src/google/adk/plugins/bigquery_agent_analytics_plugin.py +++ b/src/google/adk/plugins/bigquery_agent_analytics_plugin.py @@ -1736,7 +1736,9 @@ class BigQueryAgentAnalyticsPlugin(BasePlugin): TraceManager.init_trace(callback_context) TraceManager.push_span(callback_context) await self._log_event( - "AGENT_STARTING", callback_context, raw_content=agent.instruction + "AGENT_STARTING", + callback_context, + raw_content=getattr(agent, "instruction", ""), ) async def after_agent_callback(