Class BaseAgent.Builder<B extends BaseAgent.Builder<B>>

java.lang.Object
com.google.adk.agents.BaseAgent.Builder<B>
Type Parameters:
B - The concrete builder type.
Direct Known Subclasses:
LlmAgent.Builder, LoopAgent.Builder, ParallelAgent.Builder, SequentialAgent.Builder
Enclosing class:
BaseAgent

public abstract static class BaseAgent.Builder<B extends BaseAgent.Builder<B>> extends Object
Base Builder for all agents.
  • Field Details

    • name

      protected String name
    • description

      protected String description
    • subAgents

      protected com.google.common.collect.ImmutableList<BaseAgent> subAgents
    • beforeAgentCallback

      protected com.google.common.collect.ImmutableList<Callbacks.BeforeAgentCallback> beforeAgentCallback
    • afterAgentCallback

      protected com.google.common.collect.ImmutableList<Callbacks.AfterAgentCallback> afterAgentCallback
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • self

      protected B self()
      This is a safe cast to the concrete builder type.
    • name

      @CanIgnoreReturnValue public B name(String name)
    • description

      @CanIgnoreReturnValue public B description(String description)
    • subAgents

      @CanIgnoreReturnValue public B subAgents(List<? extends BaseAgent> subAgents)
    • subAgents

      @CanIgnoreReturnValue public B subAgents(BaseAgent... subAgents)
    • beforeAgentCallback

      @CanIgnoreReturnValue public B beforeAgentCallback(Callbacks.BeforeAgentCallback beforeAgentCallback)
    • beforeAgentCallback

      @CanIgnoreReturnValue public B beforeAgentCallback(List<com.google.adk.agents.Callbacks.BeforeAgentCallbackBase> beforeAgentCallback)
    • afterAgentCallback

      @CanIgnoreReturnValue public B afterAgentCallback(Callbacks.AfterAgentCallback afterAgentCallback)
    • afterAgentCallback

      @CanIgnoreReturnValue public B afterAgentCallback(List<com.google.adk.agents.Callbacks.AfterAgentCallbackBase> afterAgentCallback)
    • build

      public abstract BaseAgent build()