AIAgentPlannerStrategy

class AIAgentPlannerStrategy<Input, Output, State : Any>(val name: String, planner: AIAgentPlanner<State, *>, initializeState: (Input) -> State, provideOutput: (State) -> Output) : AIAgentStrategy<Input, Output, AIAgentPlannerContext> (source)

A strategy implementation that utilizes a planner to manage and execute AI agent workflows.

This class integrates an AI planning component (AIAgentPlanner) with a defined initialization and output handling mechanism, creating a customizable strategy for AI agents.

Parameters

Input

The type of input data required as the starting point for the strategy execution.

Output

The type of output data produced as the result of the strategy execution.

State

The type representing the state managed and transformed by the underlying planner.

Constructors

Link copied to clipboard
constructor(name: String, planner: AIAgentPlanner<State, *>, initializeState: (Input) -> State, provideOutput: (State) -> Output)

Types

Link copied to clipboard
object Companion

Companion object with factories for AIAgentPlannerStrategy

Properties

Link copied to clipboard
open override val name: String

The name of the strategy, allowing it to be identifiable in execution contexts.

Functions

Link copied to clipboard
open suspend override fun execute(context: AIAgentPlannerContext, input: Input): Output

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