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

Method list_agents

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

Lists all agents available in the agent loader (sorted alphabetically).

(self)

Source from the content-addressed store, hash-verified

410
411 @override
412 def list_agents(self) -> list[str]:
413 """Lists all agents available in the agent loader (sorted alphabetically)."""
414 if self._is_single_agent:
415 return [self._single_agent_name]
416 base_path = Path.cwd() / self.agents_dir
417 agent_names = [
418 x
419 for x in os.listdir(base_path)
420 if os.path.isdir(os.path.join(base_path, x))
421 and not x.startswith(".")
422 and x != "__pycache__"
423 ]
424 agent_names.sort()
425 return agent_names
426
427 def list_agents_detailed(self) -> list[dict[str, Any]]:
428 """Lists all agents with detailed metadata (name, description, type)."""

Callers 5

get_fast_api_appFunction · 0.95
list_agents_detailedMethod · 0.95
agent.pyFile · 0.45
list_appsMethod · 0.45

Calls 2

sortMethod · 0.80
joinMethod · 0.45

Tested by 1