simpleSingleRunAgent

fun simpleSingleRunAgent(executor: PromptExecutor, systemPrompt: String = "", llmModel: LLModel, temperature: Double = 1.0, toolRegistry: ToolRegistry = ToolRegistry.EMPTY, maxIterations: Int = 50, installFeatures: AIAgent.FeatureContext.() -> Unit = {}): AIAgent(source)

Creates and configures a AIAgent instance with a single-run strategy.

Return

A configured instance of AIAgent with a single-run execution strategy.

Parameters

executor

The PromptExecutor responsible for executing the prompts.

systemPrompt

The system-level prompt context for the agent. Default is an empty string.

llmModel

The language model to be used by the agent. Default is OpenAIModels.Chat.GPT4o.

temperature

The sampling temperature for the language model, controlling randomness. Default is 1.0.

toolRegistry

The ToolRegistry containing tools available to the agent. Default is ToolRegistry.EMPTY.

maxIterations

Maximum number of iterations for the agent's execution. Default is 50.

installFeatures

A suspending lambda to install additional features for the agent's functionality. Default is an empty lambda.