fix: make the BigQuery analytics plugin work with agents that don't have instructions such as the LoopAgent

PiperOrigin-RevId: 852382657
This commit is contained in:
Mimi Sun
2026-01-05 11:21:25 -08:00
committed by Copybara-Service
parent e32f017979
commit 8bed01cbdc
@@ -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(