Adding agent nodes
Agent patterns can be implemented by using both ADK and UI-based agentic workflows. You can build these patterns by combining agent nodes with agentic workflow constructs such as foreach loops, branches, logic blocks, and parallel flows (ADK only). For more information about agent patterns, see Agentic workflows.
To add an agent node, select an agent from the palette and place it on the canvas. Configure the agent node by entering a natural language prompt, and optionally insert variables into the prompt. You can also configure the node to return either natural language text (default) or a structured object. For more information, see Configure agent nodes.
To add an agent node to the workflow:
Do one of the following:
Click add flow items
and select the Agents tab.Click the connector line between the start and end nodes, and select Call an agent.
Select an agent from your local instance.
Runtime Behavior of agent nodes
Agent node behavior is about how the agent reasons over inputs, interacts with the workflow, and responds during runtime.
At run time, the agent node receives inputs from upstream nodes and resolves variables before sending the prompt to the agent. If the agent needs more information to complete the task, it can request details from the workflow. The workflow first uses information that is already available or the session context. If required information is still missing, the user is prompted to provide the details through the chat channel.
The agent can request additional information for a number of times before the agent node returns a failure response. By default, an agent can request input for a maximum of 20 iterations.
The agent node produces an output that can be mapped to flow variables, used as input for subsequent nodes, or defined as an output parameter.
Configure agents nodes
After you add an agent node to the agentic workflow, you can configure the agent to handle task‑specific actions by using model instructions and variables within the workflow.
To configure an agent node in an agentic workflow:
Select an agent in the agentic workflow.
Click
in the AI agent settings section.In the configuration dialog, define the user prompt to specify the task‑specific instructions for the agent. You can include variables from the workflow in the user prompt field.
To define object output, set the Output as Object toggle switch to on. For more information on defining object output, see Adding properties to an object data type.
Click Edit object to update the created object.
Click Done.