PlannerAIAgent

class PlannerAIAgent<State, Plan>(val promptExecutor: PromptExecutor, val agentConfig: AIAgentConfig, val strategy: AIAgentPlannerStrategy<State, Plan>, val toolRegistry: ToolRegistry = ToolRegistry.EMPTY, id: String? = null, val clock: Clock = Clock.System, val installFeatures: PlannerAIAgent.FeatureContext.() -> Unit = {}) : StatefulSingleUseAIAgent<State, State, AIAgentFunctionalContext> (source)

Represents an instance of planner agent using AIAgentPlannerStrategy.

Parameters

State

The type of the state.

Plan

The type of the plan.

Constructors

Link copied to clipboard
constructor(promptExecutor: PromptExecutor, agentConfig: AIAgentConfig, strategy: AIAgentPlannerStrategy<State, Plan>, toolRegistry: ToolRegistry = ToolRegistry.EMPTY, id: String? = null, clock: Clock = Clock.System, installFeatures: PlannerAIAgent.FeatureContext.() -> Unit = {})

Types

Link copied to clipboard

Represents a context for managing and configuring features in an AI agent. Provides functionality to install and configure features into a specific instance of an AI agent.

Properties

Link copied to clipboard
open override val agentConfig: AIAgentConfig

The configuration for the agent.

Link copied to clipboard
val clock: Clock

The clock used to calculate message timestamps

Link copied to clipboard
override val id: String
Link copied to clipboard

Lambda for installing additional features within the agent environment.

Link copied to clipboard

The executor responsible for processing prompts.

Link copied to clipboard

The strategy for processing input and generating output.

Link copied to clipboard

The registry of tools available for the agent. Defaults to an empty registry if not specified.

Functions

Link copied to clipboard
suspend override fun close()
Link copied to clipboard
fun <TFeature : Any> feature(featureClass: KClass<TFeature>, feature: AIAgentFeature<*, TFeature>): TFeature?
Link copied to clipboard
suspend override fun getState(): AIAgent.Companion.State<State>
Link copied to clipboard
open suspend override fun prepareContext(agentInput: State, runId: String, eventId: String): AIAgentFunctionalContext
Link copied to clipboard
open suspend fun result(): State
Link copied to clipboard
suspend override fun run(agentInput: State): State