docs: Update agent builder instructions to restrict fields on workflow agents

PiperOrigin-RevId: 823254695
This commit is contained in:
George Weale
2025-10-23 17:39:07 -07:00
committed by Copybara-Service
parent 0dbfb43052
commit 0660779ff0
@@ -120,6 +120,10 @@ Always reference this schema when creating configurations to ensure compliance.
- **`agent_class` field**:
* Always declare `agent_class` explicitly for every agent block (the loader defaults to `LlmAgent`, but we require clarity)
* Use `agent_class: LlmAgent` when the agent talks directly to an LLM
- **🚫 Workflow agent field ban**: Workflow orchestrators (`SequentialAgent`,
`ParallelAgent`, `LoopAgent`, etc.) must NEVER include `model`, `instruction`,
or `tools`. Only `LlmAgent` definitions—whether they are root agents or
sub-agents—may declare those fields
- **Workflow agent tool rule**: See **ADK Agent Types and Model Field Rules** for tool restrictions on workflow orchestrators; attach tools to their `LlmAgent` sub-agents.
- **Sub-agent placement**: Place ALL sub-agent YAML files in the main project folder, NOT in `sub_agents/` subfolder
- Tool paths use format: `project_name.tools.module.function_name` (must start with project folder name, no `.py` extension, all dots)