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.

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.

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

Configures the current builder instance using the provided AIAgentConfig.

Configures the current builder instance using the provided AIAgentConfig.

Configures the current builder instance using the provided AIAgentConfig.

Link copied to clipboard

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

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

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

Link copied to clipboard
expect fun clock(clock: KoogClock): AIAgentBuilder

Sets the clock for the agent.

fun clock(clock: ai/koog/utils/time/KoogClock): AIAgentBuilder

Sets the clock for the agent.

Sets the clock for the agent.

Link copied to clipboard

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

Creates a functional agent builder using the provided strategy configuration.

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

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.

Creates a graph agent builder using the provided strategy configuration.

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 fun id(id: String?): AIAgentBuilder

Sets the identifier for the builder configuration.

Sets the identifier for the builder configuration.

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 fun llmModel(model: LLModel): AIAgentBuilder

Sets the LLModel instance to be used by the builder.

fun llmModel(model: ai/koog/prompt/llm/LLModel): AIAgentBuilder

Sets the LLModel instance to be used by the builder.

Sets the LLModel instance to be used by the builder.

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

Sets the maximum number of iterations for the builder.

fun maxIterations(maxIterations: Int): AIAgentBuilder

Sets the maximum number of iterations for the builder.

fun maxIterations(maxIterations: Int): AIAgentBuilder

Sets the maximum number of iterations for the builder.

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

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

fun numberOfChoices(numberOfChoices: Int): AIAgentBuilder

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

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.

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

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

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

Sets the prompt to be used by the builder.

fun prompt(prompt: ai/koog/prompt/Prompt): AIAgentBuilder

Sets the prompt to be used by the builder.

Sets the prompt to be used by the builder.

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

Sets the PromptExecutor to be used by the builder instance.

fun promptExecutor(promptExecutor: ai/koog/prompt/executor/model/PromptExecutor): AIAgentBuilder

Sets the PromptExecutor to be used by the builder instance.

Sets the PromptExecutor to be used by the builder instance.

Link copied to clipboard
expect fun responseProcessor(responseProcessor: ResponseProcessor): AIAgentBuilder

Sets the response processor for the agent.

fun responseProcessor(responseProcessor: ai/koog/prompt/processor/ResponseProcessor): AIAgentBuilder

Sets the response processor for the agent.

Sets the response processor for the agent.

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

Sets the system prompt to be used by the builder.

fun systemPrompt(systemPrompt: String): AIAgentBuilder

Sets the system prompt to be used by the builder.

fun systemPrompt(systemPrompt: String): AIAgentBuilder

Sets the system prompt to be used by the builder.

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

Sets the temperature value for the builder.

fun temperature(temperature: Double): AIAgentBuilder

Sets the temperature value for the builder.

fun temperature(temperature: Double): AIAgentBuilder

Sets the temperature value for the builder.

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

Sets the given ToolRegistry instance to the builder configuration.

fun toolRegistry(toolRegistry: ai/koog/agents/core/tools/ToolRegistry): AIAgentBuilder

Sets the given ToolRegistry instance to the builder configuration.

Sets the given ToolRegistry instance to the builder configuration.