AIAgentBuilder

Represents a configurational builder for setting up and customizing the execution parameters and components of an AI agent. This builder enables fine-grained control over tools, strategies, and prompts utilized by an AI agent during its execution.

Functions

Link copied to clipboard
expect open override fun agentConfig(config: AIAgentConfig): AIAgentBuilder

Configures the current AIAgentBuilder instance using the provided AIAgentConfig.

actual open override fun agentConfig(config: AIAgentConfig): AIAgentBuilder

Configures the current AIAgentBuilder instance using the provided AIAgentConfig.

actual open override fun agentConfig(config: AIAgentConfig): AIAgentBuilder

Configures the current AIAgentBuilder instance using the provided AIAgentConfig.

Link copied to clipboard
expect open override fun build(): AIAgent<String, String>

Builds and returns an instance of AIAgent configured according to the builder's settings.

actual open override fun build(): AIAgent<String, String>

Builds and returns an instance of AIAgent configured according to the builder's settings.

actual open override fun build(): AIAgent<String, String>

Builds and returns an instance of AIAgent configured according to the builder's settings.

Link copied to clipboard

Sets the functional strategy to be used by the agent builder.

Sets the functional strategy to be used by the agent builder.

fun <Input, Output> functionalStrategy(name: String = "funStrategy", strategy: ERROR CLASS: Symbol not found for BiFunction<ai/koog/agents/core/agent/context/AIAgentFunctionalContext, Input, Output>): FunctionalAgentBuilder<Input, Output>

Creates a functional agent builder using the provided strategy.

Sets the functional strategy to be used by the agent builder.

Link copied to clipboard

Configures and returns a GraphAgentBuilder instance using the specified AIAgentGraphStrategy.

Configures and returns a GraphAgentBuilder instance using the specified AIAgentGraphStrategy.

Configures and returns a GraphAgentBuilder instance using the specified AIAgentGraphStrategy.

Link copied to clipboard
expect open override fun id(id: String?): AIAgentBuilder

Sets the identifier for the builder configuration.

actual open override fun id(id: String?): AIAgentBuilder

Sets the identifier for the builder configuration.

actual open override fun id(id: String?): AIAgentBuilder

Sets the identifier for the builder configuration.

Link copied to clipboard

Installs a graph-specific AI agent feature into the builder with its provided configuration.

Installs a graph-specific AI agent feature into the builder with its provided configuration.

Installs a graph-specific AI agent feature into the builder with its provided configuration.

Link copied to clipboard
expect open override fun llmModel(model: LLModel): AIAgentBuilder

Sets the LLModel instance to be used by the builder.

actual open override fun llmModel(model: LLModel): AIAgentBuilder

Sets the LLModel instance to be used by the builder.

actual open override fun llmModel(model: LLModel): AIAgentBuilder

Sets the LLModel instance to be used by the builder.

Link copied to clipboard
expect open override fun maxIterations(maxIterations: Int): AIAgentBuilder

Sets the maximum number of iterations for the builder.

actual open override fun maxIterations(maxIterations: Int): AIAgentBuilder

Sets the maximum number of iterations for the builder.

actual open override fun maxIterations(maxIterations: Int): AIAgentBuilder

Sets the maximum number of iterations for the builder.

Link copied to clipboard
expect open override fun numberOfChoices(numberOfChoices: Int): AIAgentBuilder

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

actual open override fun numberOfChoices(numberOfChoices: Int): AIAgentBuilder

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

actual open override fun numberOfChoices(numberOfChoices: Int): AIAgentBuilder

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

Link copied to clipboard

Configures the planner strategy to be used by an AI agent planner.

Defines a strategy for the planner using a specified builder chain action.

Configures the planner strategy to be used by an AI agent planner.

Defines a strategy for the planner using a specified builder chain action.

Configures the planner strategy to be used by an AI agent planner.

Defines a strategy for the planner using a specified builder chain action.

Link copied to clipboard
expect open override fun prompt(prompt: Prompt): AIAgentBuilder

Sets the prompt to be used by the builder.

actual open override fun prompt(prompt: Prompt): AIAgentBuilder

Sets the prompt to be used by the builder.

actual open override fun prompt(prompt: Prompt): AIAgentBuilder

Sets the prompt to be used by the builder.

Link copied to clipboard
expect open override fun promptExecutor(promptExecutor: PromptExecutor): AIAgentBuilder

Sets the PromptExecutor to be used by the builder instance.

actual open override fun promptExecutor(promptExecutor: PromptExecutor): AIAgentBuilder

Sets the PromptExecutor to be used by the builder instance.

actual open override fun promptExecutor(promptExecutor: PromptExecutor): AIAgentBuilder

Sets the PromptExecutor to be used by the builder instance.

Link copied to clipboard
expect open override fun systemPrompt(systemPrompt: String): AIAgentBuilder

Sets the system prompt to be used by the builder.

actual open override fun systemPrompt(systemPrompt: String): AIAgentBuilder

Sets the system prompt to be used by the builder.

actual open override fun systemPrompt(systemPrompt: String): AIAgentBuilder

Sets the system prompt to be used by the builder.

Link copied to clipboard
expect open override fun temperature(temperature: Double): AIAgentBuilder

Sets the temperature value for the builder.

actual open override fun temperature(temperature: Double): AIAgentBuilder

Sets the temperature value for the builder.

actual open override fun temperature(temperature: Double): AIAgentBuilder

Sets the temperature value for the builder.

Link copied to clipboard
expect open override fun toolRegistry(toolRegistry: ToolRegistry): AIAgentBuilder

Sets the given ToolRegistry instance to the builder configuration.

actual open override fun toolRegistry(toolRegistry: ToolRegistry): AIAgentBuilder

Sets the given ToolRegistry instance to the builder configuration.

actual open override fun toolRegistry(toolRegistry: ToolRegistry): AIAgentBuilder

Sets the given ToolRegistry instance to the builder configuration.