OptionalafterOptionalafterCallbacks to be called after calling the LLM.
OptionalafterCallbacks to be called after calling the tool.
OptionalbeforeOptionalbeforeCallbacks to be called before calling the LLM.
OptionalbeforeCallbacks to be called before calling the tool.
OptionalcodeInstructs the agent to make a plan and execute it step by step.
OptionalcontextA list of context compactors to evaluate in priority order. Modifies the session history to keep context overhead within limits.
OptionaldescriptionHuman-readable description (used when a node is exposed as a tool).
OptionaldisallowDisallows LLM-controlled transferring to the parent agent.
NOTE: Setting this to true also prevents this agent to continue reply to
the end-user. This behavior prevents one-way transfer, in which end-user
may be stuck with one agent that cannot transfer to other agents in the
agent tree.
OptionaldisallowDisallows LLM-controlled transferring to the peer agents.
OptionalgenerateThe additional content generation configurations.
Three fields are rejected by the constructor, because the agent owns them:
tools (set them through tools), systemInstruction (through
instruction) and responseSchema (through outputSchema). Every other
field is forwarded to the model as given. That includes thinkingConfig,
unless planner is a BuiltInPlanner with its own thinkingConfig: the
planner's thinkingConfig then takes precedence.
For example: use this config to adjust model temperature, configure safety settings, etc.
OptionalglobalInstructions for all the agents in the entire agent tree.
ONLY the globalInstruction in root agent will take effect.
For example: use globalInstruction to make all agents have a stable identity or personality.
OptionalincludeControls content inclusion in model requests.
Options: default: Model receives relevant conversation history none: Model receives no prior history, operates solely on current instruction and input
OptionalinputThe input schema when agent is used as a tool.
OptionalinstructionInstructions for the LLM model, guiding the agent's behavior.
OptionalisolationRuns this node's subtree in an isolated conversation scope: an agent inside
it sees only session events carrying the same scope, plus untagged ones.
true derives a scope per node run; a string is an explicit shared tag.
OptionalmodeThe agent's execution mode when run as a workflow node.
single_turn (default): the agent runs once against the node input.task: the agent is given a finish_task tool and runs a multi-round
loop until it calls finish_task, whose arguments (conforming to
outputSchema) become the node output. Mirrors Python's Agent(mode=...).OptionalmodelThe model to use for the agent.
Canonical, unique-within-a-graph node name.
OptionaloutputThe key in session state to store the output of the agent.
Typically use cases:
OptionaloutputThe output schema when agent replies.
OptionalparentOptionalplannerInstructs the agent to make a plan and execute it step by step.
NOTE: to use the model's built-in thinking features, set thinkingConfig
on a BuiltInPlanner.
OptionalrequestProcessors to run before the LLM request is sent.
OptionalrerunIf true, the node re-executes when a workflow resumes even if it already completed in a prior turn. Default false.
OptionalresponseProcessors to run after the LLM response is received.
OptionalretryOptional retry configuration for transient failures.
OptionalstateOptional schema validating relevant session state (Zod v3/v4 or genai Schema).
OptionalsubOptionaltimeoutMaximum time, in seconds, for this node to complete.
OptionaltoolsTools available to this agent.
OptionalwaitIf true, the node only produces its output once all of its predecessors have triggered it (fan-in / join semantics). Default false.
The configuration options for creating an LLM-based agent.