AIAgentFunctionalStrategy

A strategy for implementing AI agent behavior that operates in a loop-based manner.

The AIAgentFunctionalStrategy class allows for the definition of a custom looping logic that processes input and produces output by utilizing an ai.koog.agents.core.agent.context.AIAgentFunctionalContext. This strategy can be used to define iterative decision-making or execution processes for AI agents.

Type Parameters

TInput

The type of input data processed by the strategy.

TOutput

The type of output data produced by the strategy.

Inheritors

Properties

Link copied to clipboard
expect abstract val name: String

The name of the AI agent strategy.

Functions

Link copied to clipboard
abstract suspend fun execute(context: AIAgentFunctionalContext, input: TInput): TOutput?

Executes the AI agent's strategy using the provided context and input.