AIAgentConfig

class AIAgentConfig(val prompt: Prompt, val model: LLModel, val maxAgentIterations: Int, val missingToolsConversionStrategy: MissingToolsConversionStrategy = MissingToolsConversionStrategy.Missing(ToolCallDescriber.JSON)) : AIAgentConfigBase(source)

Configuration class for an AI agent that specifies the prompt, execution parameters, and behavior.

This class is responsible for defining the various settings and components required for an AI agent to operate. It includes the prompt configuration, iteration limits, and strategies for handling missing tools during execution.

Parameters

prompt

The initial prompt configuration for the agent, encapsulating messages, model, and parameters.

model

The model to use for the agent's prompt execution

maxAgentIterations

The maximum number of iterations allowed for an agent during its execution to prevent infinite loops.

missingToolsConversionStrategy

Strategy used to determine how tool calls, present in the prompt but lacking definitions, are handled during agent execution. This property provides a mechanism to convert or format missing tool calls and result messages when they occur, typically due to differences in tool sets between steps or subgraphs while the same history is reused. This ensures the prompt remains consistent and readable for the model, even with undefined tools.

Constructors

Link copied to clipboard
constructor(prompt: Prompt, model: LLModel, maxAgentIterations: Int, missingToolsConversionStrategy: MissingToolsConversionStrategy = MissingToolsConversionStrategy.Missing(ToolCallDescriber.JSON))

Types

Link copied to clipboard
object Companion

Companion object for providing utility methods related to AIAgentConfig.

Properties

Link copied to clipboard
Link copied to clipboard
open override val model: LLModel
Link copied to clipboard
open override val prompt: Prompt