Class LoopAgent.Builder
- Enclosing class:
LoopAgent
Builder for
LoopAgent.-
Field Summary
Fields inherited from class BaseAgent.Builder
afterAgentCallback, beforeAgentCallback, description, name, subAgentsModifier and TypeFieldDescriptionprotected com.google.common.collect.ImmutableList<Callbacks.AfterAgentCallback> protected com.google.common.collect.ImmutableList<Callbacks.BeforeAgentCallback> protected Stringprotected Stringprotected com.google.common.collect.ImmutableList<BaseAgent> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()maxIterations(@Nullable Integer maxIterations) Sets the maximum number of loop iterations.Methods inherited from class BaseAgent.Builder
afterAgentCallback, afterAgentCallback, beforeAgentCallback, beforeAgentCallback, description, name, self, subAgents, subAgentsModifier and TypeMethodDescriptionafterAgentCallback(Callbacks.AfterAgentCallback afterAgentCallback) afterAgentCallback(List<com.google.adk.agents.Callbacks.AfterAgentCallbackBase> afterAgentCallback) beforeAgentCallback(Callbacks.BeforeAgentCallback beforeAgentCallback) beforeAgentCallback(List<com.google.adk.agents.Callbacks.BeforeAgentCallbackBase> beforeAgentCallback) description(String description) protected LoopAgent.Builderself()This is a safe cast to the concrete builder type.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxIterations
Sets the maximum number of loop iterations. If not set, the loop runs until a sub-agent escalates. A value of zero or less runs the sub-agents no times at all. -
build
- Specified by:
buildin classBaseAgent.Builder<LoopAgent.Builder>
-