Class AgentConfig.Builder

java.lang.Object
com.google.genkit.ai.AgentConfig.Builder
Enclosing class:
AgentConfig

public static class AgentConfig.Builder extends Object
Builder for AgentConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public AgentConfig.Builder name(String name)
      Sets the agent name.
      Parameters:
      name - the name
      Returns:
      this builder
    • description

      public AgentConfig.Builder description(String description)
      Sets the description.
      Parameters:
      description - the description
      Returns:
      this builder
    • system

      public AgentConfig.Builder system(String system)
      Sets the system prompt.
      Parameters:
      system - the system prompt
      Returns:
      this builder
    • model

      public AgentConfig.Builder model(String model)
      Sets the model name.
      Parameters:
      model - the model name
      Returns:
      this builder
    • tools

      public AgentConfig.Builder tools(List<Tool<?,?>> tools)
      Sets the tools available to this agent.
      Parameters:
      tools - the tools
      Returns:
      this builder
    • agents

      public AgentConfig.Builder agents(List<AgentConfig> agents)
      Sets the sub-agents.
      Parameters:
      agents - the sub-agents
      Returns:
      this builder
    • config

      public AgentConfig.Builder config(GenerationConfig config)
      Sets the generation config.
      Parameters:
      config - the generation config
      Returns:
      this builder
    • output

      public AgentConfig.Builder output(OutputConfig output)
      Sets the output config.
      Parameters:
      output - the output config
      Returns:
      this builder
    • build

      public AgentConfig build()
      Builds the AgentConfig.
      Returns:
      the built config