functionalStrategy

Sets the functional strategy to be used by the agent builder.

The provided strategy defines the behavior and processing logic for the AI agent in a loop-based execution model. This method configures the builder to utilize the specified strategy and returns an instance of FunctionalAgentBuilder for further configuration.

Return

An instance of FunctionalAgentBuilder configured with the provided functional strategy.

Parameters

Input

The type of the input data to be processed by the strategy.

Output

The type of the output data to be produced by the strategy.

strategy

An instance of AIAgentFunctionalStrategy that contains the custom logic used by the AI agent for decision-making or execution processes.

fun <Input, Output> functionalStrategy(name: String = "funStrategy", strategy: ERROR CLASS: Symbol not found for BiFunction<ai/koog/agents/core/agent/context/AIAgentFunctionalContext, Input, Output>): FunctionalAgentBuilder<Input, Output>(source)

Creates a functional agent builder using the provided strategy.

This method allows defining a custom functional strategy for the AI agent.

Return

A FunctionalAgentBuilder configured with the specified functional strategy.

Parameters

Input

The type of the input parameter for the strategy's execution logic.

Output

The type of the output returned by the strategy's execution logic.

name

The name identifying the functional strategy. Defaults to "funStrategy".

strategy

The implementation of the functional strategy's execution logic.


Sets the functional strategy to be used by the agent builder.

The provided strategy defines the behavior and processing logic for the AI agent in a loop-based execution model. This method configures the builder to utilize the specified strategy and returns an instance of FunctionalAgentBuilder for further configuration.

Return

An instance of FunctionalAgentBuilder configured with the provided functional strategy.

Parameters

Input

The type of the input data to be processed by the strategy.

Output

The type of the output data to be produced by the strategy.

strategy

An instance of AIAgentFunctionalStrategy that contains the custom logic used by the AI agent for decision-making or execution processes.

Sets the functional strategy to be used by the agent builder.

The provided strategy defines the behavior and processing logic for the AI agent in a loop-based execution model. This method configures the builder to utilize the specified strategy and returns an instance of FunctionalAgentBuilder for further configuration.

Return

An instance of FunctionalAgentBuilder configured with the provided functional strategy.

Parameters

Input

The type of the input data to be processed by the strategy.

Output

The type of the output data to be produced by the strategy.

strategy

An instance of AIAgentFunctionalStrategy that contains the custom logic used by the AI agent for decision-making or execution processes.