AIAgentServiceBuilder

Builder for creating AIAgentService instances.

Mirrors AIAgentBuilder but returns service-level objects:

  • GraphAIAgentService

  • FunctionalAIAgentService

Functions

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

Configures the AI agent service builder using the specified agent configuration.

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

Configures the AI agent service builder using the specified agent configuration.

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

Configures the AI agent service builder using the specified agent configuration.

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

Convenience build for GraphAIAgentService using singleRunStrategy.

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

Convenience build for GraphAIAgentService using singleRunStrategy.

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

Convenience build for GraphAIAgentService using singleRunStrategy.

Link copied to clipboard

Configure a functional strategy and continue with a functional service builder.

Configure a functional strategy and continue with a functional service 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>): FunctionalAgentServiceBuilder<Input, Output>

Creates a functional agent service builder using the provided strategy.

Configure a functional strategy and continue with a functional service builder.

Link copied to clipboard

Configure a graph strategy and continue with a graph service builder.

Configure a graph strategy and continue with a graph service builder.

Configure a graph strategy and continue with a graph service builder.

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

Sets the Large Language Model (LLM) instance to be used by the service builder.

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

Sets the Large Language Model (LLM) instance to be used by the service builder.

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

Sets the Large Language Model (LLM) instance to be used by the service builder.

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

Sets the maximum number of iterations for the AI agent's process.

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

Sets the maximum number of iterations for the AI agent's process.

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

Sets the maximum number of iterations for the AI agent's process.

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

Sets the number of choices to be used in the AI agent service.

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

Sets the number of choices to be used in the AI agent service.

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

Sets the number of choices to be used in the AI agent service.

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

Sets the prompt to be used for the AI Agent service and returns the builder instance.

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

Sets the prompt to be used for the AI Agent service and returns the builder instance.

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

Sets the prompt to be used for the AI Agent service and returns the builder instance.

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

Sets the prompt executor for the AIAgentServiceBuilder.

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

Sets the prompt executor for the AIAgentServiceBuilder.

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

Sets the prompt executor for the AIAgentServiceBuilder.

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

Sets a system-level instruction or context for the AI agent. The provided string serves as the system prompt, defining the role or behavior of the AI within the generated service.

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

Sets a system-level instruction or context for the AI agent. The provided string serves as the system prompt, defining the role or behavior of the AI within the generated service.

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

Sets a system-level instruction or context for the AI agent. The provided string serves as the system prompt, defining the role or behavior of the AI within the generated service.

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

Sets the temperature parameter, which adjusts the randomness of the model's outputs. A higher temperature value results in more varied and creative responses, whereas a lower temperature value yields more focused and deterministic responses.

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

Sets the temperature parameter, which adjusts the randomness of the model's outputs. A higher temperature value results in more varied and creative responses, whereas a lower temperature value yields more focused and deterministic responses.

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

Sets the temperature parameter, which adjusts the randomness of the model's outputs. A higher temperature value results in more varied and creative responses, whereas a lower temperature value yields more focused and deterministic responses.

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

Configures the ToolRegistry for the AIAgentServiceBuilder.

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

Configures the ToolRegistry for the AIAgentServiceBuilder.

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

Configures the ToolRegistry for the AIAgentServiceBuilder.