MCPcopy Index your code
hub / github.com/google/adk-python / get_node_shape

Function get_node_shape

src/google/adk/cli/agent_graph.py:108–127  ·  view source on GitHub ↗
(tool_or_agent: Union[BaseAgent, BaseTool])

Source from the content-addressed store, hash-verified

106 return f'❓ Unsupported tool type: {type(tool_or_agent)}'
107
108 def get_node_shape(tool_or_agent: Union[BaseAgent, BaseTool]):
109 if isinstance(tool_or_agent, BaseAgent):
110 return 'ellipse'
111 elif retrieval_tool_module_loaded and isinstance(
112 tool_or_agent, BaseRetrievalTool
113 ):
114 return 'cylinder'
115 elif isinstance(tool_or_agent, FunctionTool):
116 return 'box'
117 elif isinstance(tool_or_agent, BaseTool):
118 return 'box'
119 elif hasattr(tool_or_agent, 'name'):
120 return 'box'
121 else:
122 logger.warning(
123 'Unsupported tool, type: %s, obj: %s',
124 type(tool_or_agent),
125 tool_or_agent,
126 )
127 return 'cylinder'
128
129 def should_build_agent_cluster(tool_or_agent):
130 if isinstance(tool_or_agent, Workflow):

Callers 1

draw_nodeFunction · 0.85

Calls 1

typeFunction · 0.85

Tested by

no test coverage detected