mirror of
https://github.com/google/adk-docs.git
synced 2026-09-14 16:16:59 +08:00
48 lines
2.1 KiB
Markdown
48 lines
2.1 KiB
Markdown
# Workflow Agents
|
|
|
|
This section introduces "*workflow agents*" - **specialized agents that control the execution flow of its sub-agents**.
|
|
|
|
Workflow agents are specialized components in ADK designed purely for **orchestrating the execution flow of sub-agents**. Their primary role is to manage *how* and *when* other agents run, defining the control flow of a process.
|
|
|
|
Unlike [LLM Agents](../llm-agents.md), which use Large Language Models for dynamic reasoning and decision-making, Workflow Agents operate based on **predefined logic**. They determine the execution sequence according to their type (e.g., sequential, parallel, loop) without consulting an LLM for the orchestration itself. This results in **deterministic and predictable execution patterns**.
|
|
|
|
ADK provides three core workflow agent types, each implementing a distinct execution pattern:
|
|
|
|
<div class="grid cards" markdown>
|
|
|
|
- :material-console-line: **Sequential Agents**
|
|
|
|
---
|
|
|
|
Executes sub-agents one after another, in **sequence**.
|
|
|
|
[:octicons-arrow-right-24: Learn more](sequential-agents.md)
|
|
|
|
- :material-console-line: **Loop Agents**
|
|
|
|
---
|
|
|
|
**Repeatedly** executes its sub-agents until a specific termination condition is met.
|
|
|
|
[:octicons-arrow-right-24: Learn more](loop-agents.md)
|
|
|
|
- :material-console-line: **Parallel Agents**
|
|
|
|
---
|
|
|
|
Executes multiple sub-agents in **parallel**.
|
|
|
|
[:octicons-arrow-right-24: Learn more](parallel-agents.md)
|
|
|
|
</div>
|
|
|
|
## Why Use Workflow Agents?
|
|
|
|
Workflow agents are essential when you need explicit control over how a series of tasks or agents are executed. They provide:
|
|
|
|
* **Predictability:** The flow of execution is guaranteed based on the agent type and configuration.
|
|
* **Reliability:** Ensures tasks run in the required order or pattern consistently.
|
|
* **Structure:** Allows you to build complex processes by composing agents within clear control structures.
|
|
|
|
While the workflow agent manages the control flow deterministically, the sub-agents it orchestrates can themselves be any type of agent, including intelligent `LlmAgent` instances. This allows you to combine structured process control with flexible, LLM-powered task execution.
|