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

Function _to_app

src/google/adk/cli/cli.py:60–64  ·  view source on GitHub ↗

Wraps a BaseAgent or BaseNode in an App if not already one.

(agent_or_app: Union[BaseAgent, App, Any], app_name: str)

Source from the content-addressed store, hash-verified

58
59
60def _to_app(agent_or_app: Union[BaseAgent, App, Any], app_name: str) -> App:
61 """Wraps a BaseAgent or BaseNode in an App if not already one."""
62 if isinstance(agent_or_app, App):
63 return agent_or_app
64 return App(name=app_name, root_agent=agent_or_app)
65
66
67async def run_input_file(

Callers 3

run_input_fileFunction · 0.85
run_interactivelyFunction · 0.85
run_once_cliFunction · 0.85

Calls 1

AppClass · 0.85

Tested by

no test coverage detected