diff --git a/src/google/adk/tools/agent_tool.py b/src/google/adk/tools/agent_tool.py index 46d86166..799f0ea4 100644 --- a/src/google/adk/tools/agent_tool.py +++ b/src/google/adk/tools/agent_tool.py @@ -188,7 +188,9 @@ class AgentTool(BaseTool): if not last_content: return '' - merged_text = '\n'.join(p.text for p in last_content.parts if p.text) + merged_text = '\n'.join( + p.text for p in last_content.parts if p.text and not p.thought + ) if isinstance(self.agent, LlmAgent) and self.agent.output_schema: tool_result = self.agent.output_schema.model_validate_json( merged_text