PlannerAgentBuilder

class PlannerAgentBuilder<Input, Output>(strategy: AIAgentPlannerStrategy<Input, Output>, promptExecutor: PromptExecutor? = null, toolRegistry: ToolRegistry = ToolRegistry.EMPTY, id: String? = null, config: AIAgentConfig, clock: KoogClock = KoogClock.System, featureInstallers: MutableList<PlannerAIAgent.FeatureContext.() -> Unit> = mutableListOf()) : AIAgentBuilderBase<PlannerAgentBuilder<Input, Output>> (source)

Builds an AI-based planning agent by configuring various parameters and defining custom behaviors for the agent. This builder allows flexible setup of an agent's functionality and behavior based on the provided configuration and tools.

Parameters

strategy

The planning strategy used by the agent to process and execute tasks.

promptExecutor

The executor responsible for handling AI prompts.

toolRegistry

The registry of tools available for use by the agent. Defaults to an empty tool registry.

id

The optional identifier of the agent.

config

AIAgentConfig containing initial agent configuration for the builder

clock

The clock instance used to track time-related operations for the agent. Defaults to the system clock.

featureInstallers

A list of feature installers that enhance the agent's behavior with additional functionality.

Constructors

Link copied to clipboard
constructor(strategy: AIAgentPlannerStrategy<Input, Output>, promptExecutor: PromptExecutor? = null, toolRegistry: ToolRegistry = ToolRegistry.EMPTY, id: String? = null, config: AIAgentConfig, clock: KoogClock = KoogClock.System, featureInstallers: MutableList<PlannerAIAgent.FeatureContext.() -> Unit> = mutableListOf())

Functions

Link copied to clipboard

Configures the current builder instance using the provided AIAgentConfig.

Link copied to clipboard

Constructs and returns an instance of AIAgent configured with the provided parameters and features.

Link copied to clipboard

Sets the clock for the agent.

Link copied to clipboard

Sets the identifier for the builder configuration.

Link copied to clipboard

Installs a functional feature into the PlannerAgentBuilder with the specified configuration.

Link copied to clipboard

Sets the LLModel instance to be used by the builder.

Link copied to clipboard

Sets the maximum number of iterations for the builder.

Link copied to clipboard

Sets the number of choices to be utilized by the builder instance.

Link copied to clipboard

Sets the prompt to be used by the builder.

Link copied to clipboard

Sets the PromptExecutor to be used by the builder instance.

Link copied to clipboard

Sets the response processor for the agent.

Link copied to clipboard

Sets the system prompt to be used by the builder.

Link copied to clipboard

Sets the temperature value for the builder.

Link copied to clipboard

Sets the given ToolRegistry instance to the builder configuration.