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:

  1. Initialize state from input: initializeState

  2. Build a plan: buildPlan

  3. Execute a step in the plan: executeStep

  4. Repeat steps 2 and 3 until the plan is considered completed.

  5. Extract output from the final state: provideOutput

Parameters

stateType

TypeToken of the State.

planType

TypeToken of the Plan.

stateType and planType are required for features which require serialization, e.g. persistence. if you use such features, you should provide the type tokens for the state and plan types. otherwise these parameters can be omitted.

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.

Inheritors

Constructors

Link copied to clipboard
constructor(stateType: TypeToken? = null, planType: TypeToken? = null)

Properties

Link copied to clipboard
val planType: TypeToken?
Link copied to clipboard
val stateType: TypeToken?