AIAgentBuilderAPI

A platform-agnostic API describing the full surface of AIAgentBuilder.

Note on return types:

  • Methods that previously returned AIAgentBuilder now return AIAgentBuilderAPI here so that common implementation classes can return this while platform actual classes can covariantly narrow the return type back to AIAgentBuilder.

Inheritors

Functions

Link copied to clipboard

Configures the current AIAgentBuilder instance using the provided AIAgentConfig.

Link copied to clipboard
abstract 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.

Link copied to clipboard

Configures and returns a GraphAgentBuilder instance using the specified AIAgentGraphStrategy.

Link copied to clipboard
abstract fun id(id: String?): AIAgentBuilderAPI

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.

Link copied to clipboard
abstract fun llmModel(model: LLModel): AIAgentBuilderAPI

Sets the LLModel instance to be used by the builder.

Link copied to clipboard
abstract fun maxIterations(maxIterations: Int): AIAgentBuilderAPI

Sets the maximum number of iterations for the builder.

Link copied to clipboard
abstract fun numberOfChoices(numberOfChoices: Int): AIAgentBuilderAPI

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.

Link copied to clipboard
abstract fun prompt(prompt: Prompt): AIAgentBuilderAPI

Sets the prompt to be used by the builder.

Link copied to clipboard
abstract fun promptExecutor(promptExecutor: PromptExecutor): AIAgentBuilderAPI

Sets the PromptExecutor to be used by the builder instance.

Link copied to clipboard
abstract fun systemPrompt(systemPrompt: String): AIAgentBuilderAPI

Sets the system prompt to be used by the builder.

Link copied to clipboard
abstract fun temperature(temperature: Double): AIAgentBuilderAPI

Sets the temperature value for the builder.

Link copied to clipboard
abstract fun toolRegistry(toolRegistry: ToolRegistry): AIAgentBuilderAPI

Sets the given ToolRegistry instance to the builder configuration.