AgentConfig

inner class AgentConfig(source)

Configuration class for managing agent-specific settings and tools.

The AgentConfig class allows customization of the agent's behavior, including:

  • Setting the prompt and language model to use

  • Managing tools available to the agent

  • Defining strategies for handling missing tools

  • Installing additional features

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Specifies the maximum number of iterations an agent is permitted to perform during its execution cycle.

Link copied to clipboard

Defines the strategy for handling tool calls present in the prompt that do not have corresponding tool definitions registered in the current context. This is used to convert missing tool information into a format suitable for processing by the model.

Functions

Link copied to clipboard
fun <TConfig : FeatureConfig> install(feature: AIAgentGraphFeature<TConfig, *>, configure: TConfig.() -> Unit = {})

Adds an AI agent feature to the current configuration by applying the specific configuration logic.

Link copied to clipboard

Configures the MCP (Modular Configuration Protocol) tools for the agent with the provided configuration block.

Link copied to clipboard
fun prompt(name: String = "agent", llmParams: LLMParams = LLMParams(), clock: Clock = Clock.System, build: PromptBuilder.() -> Unit)

Configures and sets the prompt for the agent using the provided parameters and a prompt-building function.

Link copied to clipboard

Registers tools into the tool registry using the provided configuration lambda.