AIAgentGraphPipelineAPI

Public API surface for graph-specific pipeline operations (nodes and subgraphs).

Implemented by both the common expect AIAgentGraphPipeline and the concrete implementation AIAgentGraphPipelineImpl, and used by all platform actual classes via delegation.

Inheritors

Properties

Link copied to clipboard
abstract val clock: Clock
Link copied to clipboard
abstract val config: AIAgentConfig

Functions

Link copied to clipboard
abstract suspend fun closeAllFeaturesMessageProcessors()
Link copied to clipboard
abstract fun <TFeature : Any> feature(featureClass: KClass<TFeature>, feature: AIAgentFeature<*, TFeature>): TFeature?
Link copied to clipboard
abstract fun <TConfig : FeatureConfig, TFeatureImpl : Any> install(featureKey: AIAgentStorageKey<TFeatureImpl>, featureConfig: TConfig, featureImpl: TFeatureImpl)
Link copied to clipboard
abstract fun interceptAfterLLMCall(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMCallCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptAgentBeforeClose(feature: AIAgentFeature<*, *>, handle: suspend (AgentClosingContext) -> Unit)
Link copied to clipboard
abstract fun interceptAgentClosing(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: AgentClosingContext) -> Unit)
Link copied to clipboard
abstract fun interceptAgentCompleted(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: AgentCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptAgentExecutionFailed(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: AgentExecutionFailedContext) -> Unit)
Link copied to clipboard
abstract fun interceptAgentFinished(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: AgentCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptAgentRunError(feature: AIAgentFeature<*, *>, handle: suspend (AgentExecutionFailedContext) -> Unit)
Link copied to clipboard
abstract fun interceptAgentStarting(feature: AIAgentFeature<*, *>, handle: suspend (AgentStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptBeforeAgentStarted(feature: AIAgentFeature<*, *>, handle: suspend (AgentStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptBeforeLLMCall(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMCallStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptEnvironmentCreated(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: AgentEnvironmentTransformingContext, environment: AIAgentEnvironment) -> AIAgentEnvironment)
Link copied to clipboard
abstract fun interceptLLMCallCompleted(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMCallCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptLLMCallStarting(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMCallStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptLLMStreamingCompleted(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMStreamingCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptLLMStreamingFailed(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMStreamingFailedContext) -> Unit)
Link copied to clipboard
abstract fun interceptLLMStreamingFrameReceived(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMStreamingFrameReceivedContext) -> Unit)
Link copied to clipboard
abstract fun interceptLLMStreamingStarting(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: LLMStreamingStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptNodeExecutionCompleted(feature: AIAgentGraphFeature<*, *>, handle: suspend (eventContext: NodeExecutionCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptNodeExecutionFailed(feature: AIAgentGraphFeature<*, *>, handle: suspend (eventContext: NodeExecutionFailedContext) -> Unit)
Link copied to clipboard
abstract fun interceptNodeExecutionStarting(feature: AIAgentGraphFeature<*, *>, handle: suspend (eventContext: NodeExecutionStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptStrategyCompleted(feature: AIAgentFeature<*, *>, handle: suspend (StrategyCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptStrategyFinished(feature: AIAgentFeature<*, *>, handle: suspend (StrategyCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptStrategyStart(feature: AIAgentFeature<*, *>, handle: suspend (StrategyStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptStrategyStarting(feature: AIAgentFeature<*, *>, handle: suspend (StrategyStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptSubgraphExecutionCompleted(feature: AIAgentGraphFeature<*, *>, handle: suspend (eventContext: SubgraphExecutionCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptSubgraphExecutionFailed(feature: AIAgentGraphFeature<*, *>, handle: suspend (eventContext: SubgraphExecutionFailedContext) -> Unit)
Link copied to clipboard
abstract fun interceptSubgraphExecutionStarting(feature: AIAgentGraphFeature<*, *>, handle: suspend (eventContext: SubgraphExecutionStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptToolCall(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptToolCallCompleted(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptToolCallFailed(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallFailedContext) -> Unit)
Link copied to clipboard
abstract fun interceptToolCallFailure(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallFailedContext) -> Unit)
Link copied to clipboard
abstract fun interceptToolCallResult(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallCompletedContext) -> Unit)
Link copied to clipboard
abstract fun interceptToolCallStarting(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolCallStartingContext) -> Unit)
Link copied to clipboard
abstract fun interceptToolValidationError(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolValidationFailedContext) -> Unit)
Link copied to clipboard
abstract fun interceptToolValidationFailed(feature: AIAgentFeature<*, *>, handle: suspend (eventContext: ToolValidationFailedContext) -> Unit)
Link copied to clipboard
abstract suspend fun onAgentClosing(eventId: String, executionInfo: AgentExecutionInfo, agentId: String)
Link copied to clipboard
abstract suspend fun onAgentCompleted(eventId: String, executionInfo: AgentExecutionInfo, agentId: String, runId: String, result: Any?, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onAgentEnvironmentTransforming(eventId: String, executionInfo: AgentExecutionInfo, agent: GraphAIAgent<*, *>, baseEnvironment: AIAgentEnvironment): AIAgentEnvironment
Link copied to clipboard
abstract suspend fun onAgentExecutionFailed(eventId: String, executionInfo: AgentExecutionInfo, agentId: String, runId: String, throwable: Throwable, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun <TInput, TOutput> onAgentStarting(eventId: String, executionInfo: AgentExecutionInfo, runId: String, agent: AIAgent<*, *>, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onLLMCallCompleted(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>, responses: List<Message.Response>, moderationResponse: ModerationResult? = null, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onLLMCallStarting(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onLLMStreamingCompleted(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onLLMStreamingFailed(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, throwable: Throwable, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onLLMStreamingFrameReceived(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, streamFrame: StreamFrame, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onLLMStreamingStarting(eventId: String, executionInfo: AgentExecutionInfo, runId: String, prompt: Prompt, model: LLModel, tools: List<ToolDescriptor>, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onNodeExecutionCompleted(eventId: String, executionInfo: AgentExecutionInfo, node: AIAgentNodeBase<*, *>, context: AIAgentGraphContextBase, input: Any?, inputType: TypeToken, output: Any?, outputType: TypeToken)
Link copied to clipboard
abstract suspend fun onNodeExecutionFailed(eventId: String, executionInfo: AgentExecutionInfo, node: AIAgentNodeBase<*, *>, context: AIAgentGraphContextBase, input: Any?, inputType: TypeToken, throwable: Throwable)
Link copied to clipboard
abstract suspend fun onNodeExecutionStarting(eventId: String, executionInfo: AgentExecutionInfo, node: AIAgentNodeBase<*, *>, context: AIAgentGraphContextBase, input: Any?, inputType: TypeToken)
Link copied to clipboard
abstract suspend fun onStrategyCompleted(eventId: String, executionInfo: AgentExecutionInfo, strategy: AIAgentStrategy<*, *, *>, context: AIAgentContext, result: Any?, resultType: TypeToken)
Link copied to clipboard
abstract suspend fun onStrategyStarting(eventId: String, executionInfo: AgentExecutionInfo, strategy: AIAgentStrategy<*, *, *>, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onSubgraphExecutionCompleted(eventId: String, executionInfo: AgentExecutionInfo, subgraph: AIAgentSubgraphBase<*, *>, context: AIAgentGraphContextBase, input: Any?, inputType: TypeToken, output: Any?, outputType: TypeToken)
Link copied to clipboard
abstract suspend fun onSubgraphExecutionFailed(eventId: String, executionInfo: AgentExecutionInfo, subgraph: AIAgentSubgraphBase<*, *>, context: AIAgentGraphContextBase, input: Any?, inputType: TypeToken, throwable: Throwable)
Link copied to clipboard
abstract suspend fun onSubgraphExecutionStarting(eventId: String, executionInfo: AgentExecutionInfo, subgraph: AIAgentSubgraphBase<*, *>, context: AIAgentGraphContextBase, input: Any?, inputType: TypeToken)
Link copied to clipboard
abstract suspend fun onToolCallCompleted(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JSONObject, toolResult: JSONElement?, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onToolCallFailed(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JSONObject, message: String, error: AIAgentError?, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onToolCallStarting(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JSONObject, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun onToolValidationFailed(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JSONObject, message: String, error: AIAgentError, context: AIAgentContext)
Link copied to clipboard
abstract suspend fun prepareFeatures()
Link copied to clipboard
abstract suspend fun uninstall(featureKey: AIAgentStorageKey<*>)