fix(open-8974): detect all tool types in Google ADK agent traces#601
Open
viniciusdsmello wants to merge 1 commit intomainfrom
Open
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9294d26 to
6fd9725
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extract_agent_attributesfor Google ADK tracing, which was missing raw function tools and failing to unwrapAgentToolinstances_extract_tool_info()helper that handles all three ADK tool types: raw callables,BaseToolsubclasses, andAgentTool(agent-as-a-tool pattern)AgentToolentries now includetype: "agent_tool"and recursively expose the wrapped agent's own tools viaagent_toolsRoot Cause
The
extract_agent_attributesfunction checkedhasattr(tool, "name")to detect tools, but ADK stores raw Python functions inagent.tools— functions use__name__, notname. This caused all plain function tools to be silently skipped. Additionally,AgentToolwrappers were never unwrapped to discover the inner agent's tools.Before (broken)
{ "tools": [ {"name": "WeatherAgent", "description": "..."}, {"name": "CalculatorAgent", "description": "..."} ] }get_current_time) missing entirelyAfter (fixed)
{ "tools": [ {"name": "get_current_time", "description": "Returns the current time."}, { "name": "WeatherAgent", "type": "agent_tool", "description": "...", "agent_tools": [ {"name": "get_weather", "description": "Retrieves weather..."} ] }, { "name": "CalculatorAgent", "type": "agent_tool", "description": "...", "agent_tools": [ {"name": "calculate", "description": "Evaluates math..."} ] } ] }Test plan
sub_agents+AgentToolpattern works correctlyCloses OPEN-8974
🤖 Generated with Claude Code