Subagents library

list()

api.agents.subagents.list() → Promise<Subagent[]>

Both sources, merged and sorted by name, each item saying where it came from and what it is allowed to use.

freesorted by nameno content
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

const agents = await api.agents.subagents.list();
// [{ name: "explore", description: "…", tools: [...], model: "gemini-3.5-flash", source: "account" }]
agents = api.agents.subagents.list()
# [{"name": "explore", "description": "…", "tools": [...], "model": "gemini-3.5-flash", "source": "account"}]
name · description · source

As in the skills library.

toolsstring[]|null

Its tool selection, or null to inherit.

modelstring|null

Its model, or null to inherit.

An empty list has consequences

No task tool, and no « Subagents » section in the system prompt. Nothing fails — the agent simply does everything itself.

Claude Code names are translated

A file written for that format works as it is: its tool names are mapped, and model names of that family fall back to the agent's own model rather than failing.

The body is not in it

Names, descriptions, tools and models. get() for the instructions.