* Deleted redundant files. * Deleted redundant files. * Deleted redundant files. * Deleted redundant files. * Deleted redundant files. * Deleted redundant files. * Delete .gitignore Deleted redundant files. * Delete .gitignore Deleted redundant files. * Delete .gitignore * Delete .gitignore * Delete .gitignore * Revert changes to .gitignore * Revert changes to .gitignore * Revert changes to .gitignore * Revert changes to .gitignore * Revert changes to .gitignore * Revert changes to .gitignore * Add MCP Tools TS example * Removed unnecessary changes * Removed extra slashes * Added the custom agent sample. * Corrected an error in the package.json file. * Updated custom-agent.md * Made small fixes. * Add Session TS examples * Added the typescript code snippets for multi agent. * added the code sample for loop agent * Added the code sample for loop agent * Added the code sample for parallel agent * Fixed a few issues and bugs * Added the code sample for sequential agent * Renamed run back to runAsync * Updated the capital agent code sample. * Corrected the snippet * Renamed run() to runAsync() * Add Runtime TS examples * Fixed the snippets after library updates. * Fixed the sample code after library changes. * Added final touchups and fixes. * Updated the code based on recent library changes. * Updated package.json * Updated package.json * Updated package.json * Updated the code with runAsync and package.json * Updated the typescript sample. * Updated after_tool_callback.ts with runAsync * Updated after_model_callback.ts * Updated before_model_callback.ts * Updated before_tool_callback.ts * Created before_agent_callback.ts * Update before_agent_callback.ts Changed the condition * Update before_model_callback.ts Changed the condition * Update after_model_callback.ts Changed the condition * Update after_tool_callback.ts Changed the condition * Update after_agent_callback.ts Changed the condition * Update callback_basic.ts Changed the condition * Update storyflow_agent.ts Changed the condition * Update sequential_agent_code_development_agent.ts Changed the condition * Updated before_agent_callback.ts * Removed unnecessary comment. * Updated comment * Renamed run to runAsync * Added artifact code snippets. * Fixed .link-checker-config.json * Added tsconfig.json * Update .gitignore with node modules files * Added 7 typescript code snippets * Cleaned up and corrected the snippets for plugins * Update index.md Undid the changes in artifacts/index.md * Escaped properly. * Add Long Running Function Tool TS examples * Resolved code review feedback * Fixed the code sample per git comments. * Fixed the code per git comments. * Fixed the md file per git comments. * Fixed the issues per git comments. * Fixed issues per github comments. * Fixed the issues per PR comments. * Fixed issues per PR comments. * Added a code sample for HITL * Fixed the indentations in the typescript code * Used createPartFromBase64 when appropriate. * Switched to use createUserContent. * docs: Add JavaScript Quickstart, short unified format * Added a simulated user delay to the code sample. * Made some cosmetic improvements * Added the code snippet with HITL with policy * Made cosmetic modifications to multi-agents.md * Added more tutorial for the HITL with policy * Modularized the main function and added helper functions. * Resolved code review feedback * Resolved code review feedback * Resolved code review feedback * Fixed minor things in the typescript code per PR comments. * Fixed the import for Event and used createEventActions. * Simplified functionResponse code. * Corrected the Event import and used createEventActions. * Updated ADK versions in package.json. * Final review of all changes & Add Safety TS example * Make tsconfig.json files consistent * Generated the API Reference for typescript * Resolved code review feedback * feat: Add Typescript API reference to docs This commit adds the generated TypeDoc documentation for the Typescript ADK to the documentation site. It also updates the main API reference page to include a link to the new Typescript API reference. * docs: update TypeScript quickstart * docs: Add version tags for Build Agents topics - add version tags - move TS content to second position (after Python) * docs: Add MCP Toolbox for databases TS SDK Documentation * Update mcp-toolbox-for-databases.md * use typescript code block * minor changes * Update mcp-toolbox-for-databases.md * Auto generated the typescript API reference. * Added the TS code snippets for context. * Fixed TS code snippets for context. * Modified the sample based on the comment. * docs: adding TypeScript language tags (2 of 3) - Update all Run Agents section topics - change all TS tags to v0.2.0 per eng agreement * docs: Add TypeScript language support tags, Components (3 of 3) - add TS language support tags - re-order TS examples to be second - minor fixes: remove trailing spaces * Added callback samples for typescript to the markdown files. * Updated adk version in quickstart * Updated google/adk version for typescript. --------- Co-authored-by: manchan <manchan@google.com> Co-authored-by: Mandy Chan <75594070+slothwriter@users.noreply.github.com> Co-authored-by: Joe Fernandez <joefernandez@google.com> Co-authored-by: Joe Fernandez <joefernandez@users.noreply.github.com> Co-authored-by: Twisha Bansal <58483338+twishabansal@users.noreply.github.com>
2.4 KiB
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, 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:
-
:material-console-line: Sequential Agents
Executes sub-agents one after another, in sequence.
-
:material-console-line: Loop Agents
Repeatedly executes its sub-agents until a specific termination condition is met.
-
:material-console-line: Parallel Agents
Executes multiple sub-agents in parallel.
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 LLM Agent instances. This allows you to combine structured process control with flexible, LLM-powered task execution.