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

Function is_single_agent_directory

src/google/adk/cli/utils/agent_loader.py:43–49  ·  view source on GitHub ↗

Returns True if the directory contains a single agent configuration or file.

(path: Path | str)

Source from the content-addressed store, hash-verified

41
42
43def is_single_agent_directory(path: Path | str) -> bool:
44 """Returns True if the directory contains a single agent configuration or file."""
45 p = Path(path).resolve()
46 return (
47 p.joinpath("agent.py").is_file()
48 or p.joinpath("root_agent.yaml").is_file()
49 )
50
51
52# Special agents directory for agents with names starting with double underscore

Callers 3

get_fast_api_appFunction · 0.85
__init__Method · 0.85

Calls 1

resolveMethod · 0.45

Tested by 1