AIAgentPlannerPipeline

class AIAgentPlannerPipeline(clock: Clock = Clock.System) : AIAgentPipeline(source)

Represents a specific implementation of an AI agent pipeline that uses a planner approach.

Constructors

Link copied to clipboard
constructor(clock: Clock = Clock.System)

Properties

Link copied to clipboard
val clock: Clock

Functions

Link copied to clipboard
fun <TFeature : Any> feature(featureClass: KClass<TFeature>, feature: AIAgentFeature<*, TFeature>): TFeature?
Link copied to clipboard

Installs a non-graph feature into the pipeline with the provided configuration.

Link copied to clipboard
fun interceptAfterLLMCall(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMCallCompletedContext) -> Unit)
Link copied to clipboard
fun interceptAgentBeforeClose(feature: AIAgentFeature<*, *>, handle: suspend (AgentClosingContext) -> Unit)
Link copied to clipboard
fun interceptAgentClosing(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: AgentClosingContext) -> Unit)
Link copied to clipboard
fun interceptAgentCompleted(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: AgentCompletedContext) -> Unit)
Link copied to clipboard
fun interceptAgentExecutionFailed(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: AgentExecutionFailedContext) -> Unit)
Link copied to clipboard
fun interceptAgentFinished(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: AgentCompletedContext) -> Unit)
Link copied to clipboard
fun interceptAgentRunError(feature: AIAgentFeature<*, *>, handle: suspend (AgentExecutionFailedContext) -> Unit)
Link copied to clipboard
fun interceptAgentStarting(feature: AIAgentFeature<*, *>, handle: suspend (AgentStartingContext) -> Unit)
Link copied to clipboard
fun interceptBeforeAgentStarted(feature: AIAgentFeature<*, *>, handle: suspend (AgentStartingContext) -> Unit)
Link copied to clipboard
fun interceptBeforeLLMCall(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMCallStartingContext) -> Unit)
Link copied to clipboard
fun interceptLLMCallCompleted(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMCallCompletedContext) -> Unit)
Link copied to clipboard
fun interceptLLMCallStarting(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMCallStartingContext) -> Unit)
Link copied to clipboard
fun interceptLLMStreamingCompleted(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMStreamingCompletedContext) -> Unit)
Link copied to clipboard
fun interceptLLMStreamingFailed(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMStreamingFailedContext) -> Unit)
Link copied to clipboard
fun interceptLLMStreamingFrameReceived(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMStreamingFrameReceivedContext) -> Unit)
Link copied to clipboard
fun interceptLLMStreamingStarting(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMStreamingStartingContext) -> Unit)
Link copied to clipboard
Link copied to clipboard
fun interceptStrategyFinished(feature: AIAgentFeature<*, *>, handle: suspend (StrategyCompletedContext) -> Unit)
Link copied to clipboard
fun interceptStrategyStart(feature: AIAgentFeature<*, *>, handle: suspend (StrategyStartingContext) -> Unit)
Link copied to clipboard
fun interceptStrategyStarting(feature: AIAgentFeature<*, *>, handle: suspend (StrategyStartingContext) -> Unit)
Link copied to clipboard
fun interceptToolCall(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallStartingContext) -> Unit)
Link copied to clipboard
fun interceptToolCallCompleted(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallCompletedContext) -> Unit)
Link copied to clipboard
fun interceptToolCallFailed(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallFailedContext) -> Unit)
Link copied to clipboard
fun interceptToolCallFailure(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallFailedContext) -> Unit)
Link copied to clipboard
fun interceptToolCallResult(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallCompletedContext) -> Unit)
Link copied to clipboard
fun interceptToolCallStarting(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallStartingContext) -> Unit)
Link copied to clipboard
fun interceptToolValidationError(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolValidationFailedContext) -> Unit)
Link copied to clipboard
fun interceptToolValidationFailed(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolValidationFailedContext) -> Unit)
Link copied to clipboard
suspend fun onAgentClosing(eventId: String, executionInfo: AgentExecutionInfo, agentId: String)
Link copied to clipboard
suspend fun onAgentCompleted(eventId: String, executionInfo: AgentExecutionInfo, agentId: String, runId: String, result: Any?)
Link copied to clipboard
suspend fun onAgentEnvironmentTransforming(eventId: String, executionInfo: AgentExecutionInfo, agent: GraphAIAgent<*, *>, baseEnvironment: AIAgentEnvironment): AIAgentEnvironment
Link copied to clipboard
suspend fun onAgentExecutionFailed(eventId: String, executionInfo: AgentExecutionInfo, agentId: String, runId: String, throwable: Throwable)
Link copied to clipboard
suspend fun <TInput, TOutput> onAgentStarting(eventId: String, executionInfo: AgentExecutionInfo, runId: String, agent: AIAgent<*, *>, context: AIAgentContext)
Link copied to clipboard
suspend fun onLLMCallCompleted(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>, responses: List<Message.Response>, moderationResponse: ModerationResult?)
Link copied to clipboard
suspend fun onLLMCallStarting(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>)
Link copied to clipboard
suspend fun onLLMStreamingCompleted(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>)
Link copied to clipboard
suspend fun onLLMStreamingFailed(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, throwable: Throwable)
Link copied to clipboard
suspend fun onLLMStreamingFrameReceived(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, streamFrame: StreamFrame)
Link copied to clipboard
suspend fun onLLMStreamingStarting(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>)
Link copied to clipboard
suspend fun onStrategyCompleted(eventId: String, executionInfo: AgentExecutionInfo, strategy: AIAgentStrategy<*, *, *>, context: AIAgentContext, result: Any?, resultType: KType)
Link copied to clipboard
suspend fun onStrategyStarting(eventId: String, executionInfo: AgentExecutionInfo, strategy: AIAgentStrategy<*, *, *>, context: AIAgentContext)
Link copied to clipboard
suspend fun onToolCallCompleted(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JsonObject, toolResult: JsonElement?)
Link copied to clipboard
suspend fun onToolCallFailed(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JsonObject, message: String, error: AIAgentError?)
Link copied to clipboard
suspend fun onToolCallStarting(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JsonObject)
Link copied to clipboard
suspend fun onToolValidationFailed(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JsonObject, message: String, error: AIAgentError)