AIAgentPlanner
abstract class AIAgentPlanner<Input, Output, State : Any, Plan : Any>(val stateType: TypeToken? = null, val planType: TypeToken? = null)(source)
An abstract base planner component, which can be used to implement different types of AI agent planner execution flows.
An entry point is an execute method, which accepts an Input and returns the Output after the execution.
Planner flow works as follows:
Initialize state from input: initializeState
Build a plan: buildPlan
Execute a step in the plan: executeStep
Repeat steps 2 and 3 until the plan is considered completed.
Extract output from the final state: provideOutput
Parameters
stateType
TypeToken of the State.
Type Parameters
Input
The type of input provided to the planner.
Output
The type of output produced by the planner.
State
The internal state type managed by the planner.
Plan
The type of plan produced by buildPlan.