Package-level declarations

Types

Link copied to clipboard
data class AfterLLMCallContext(val runId: String, val prompt: Prompt, val model: LLModel, val tools: List<ToolDescriptor>, val responses: List<Message.Response>, val moderationResponse: ModerationResult?) : LLMEventHandlerContext

Represents the context for handling an after LLM call event.

Link copied to clipboard
fun interface AfterLLMCallHandler

Represents a functional interface for handling operations or logic that should occur after a call to a large language model (LLM) is made. The implementation of this interface provides a mechanism to perform custom logic or processing based on the provided inputs, such as the prompt, tools, model, and generated responses.

Link copied to clipboard
fun interface AfterNodeHandler

Handler for intercepting node execution after it completes.

Link copied to clipboard
data class AgentBeforeCloseContext(val agentId: String)

Represents the context passed to the handler that is executed before an agent is closed.

Link copied to clipboard

Functional interface for handling logic that needs to be executed before an agent is closed.

Link copied to clipboard

Handler for creating a feature instance in a stage context.

Link copied to clipboard
class AgentCreateContext<FeatureT>(val strategy: AIAgentStrategy<*, *>, val agent: AIAgent<*, *>, val feature: FeatureT)

Functional interface for handling logic that needs to be executed before an agent is closed.

Link copied to clipboard

Handler for transforming an instance of AgentEnvironment.

Link copied to clipboard

Provides the context for handling events specific to AI agents. This interface extends the foundational event handling context, EventHandlerContext, and is specialized for scenarios involving agents and their associated workflows or features.

Link copied to clipboard
data class AgentFinishedContext(val agentId: String, val runId: String, val result: Any?, val resultType: KType) : AgentEventHandlerContext

Represents the context for handling the completion of an agent's execution.

Link copied to clipboard
fun interface AgentFinishedHandler

Functional interface for handling the completion of an agent's operation. This handler is executed when an agent has finished its work, and it provides the name of the strategy that was executed along with an optional result.

Link copied to clipboard
class AgentHandler<TFeature : Any>(val feature: TFeature)

Feature implementation for agent and strategy interception.

Link copied to clipboard
data class AgentRunErrorContext(val agentId: String, val runId: String, val throwable: Throwable) : AgentEventHandlerContext

Represents the context for handling errors that occur during the execution of an agent run.

Link copied to clipboard
fun interface AgentRunErrorHandler

Functional interface for handling errors that occur during the execution of an agent run.

Link copied to clipboard
data class AgentStartContext<TFeature>(val agent: AIAgent<*, *>, val runId: String, val strategy: AIAgentStrategy<*, *>, val feature: TFeature, val context: AIAgentContextBase) : AgentEventHandlerContext

Represents the context available during the start of an AI agent.

Link copied to clipboard
class AgentTransformEnvironmentContext<TFeature>(val strategy: AIAgentStrategy<*, *>, val agent: AIAgent<*, *>, val feature: TFeature) : AgentEventHandlerContext

Provides a context for executing transformations and operations within an AI agent's environment.

Link copied to clipboard

Functional interface to define a handler that is invoked before an agent starts. This handler allows custom pre-start logic to be executed with access to the provided agent start context and associated feature.

Link copied to clipboard
data class BeforeLLMCallContext(val runId: String, val prompt: Prompt, val model: LLModel, val tools: List<ToolDescriptor>) : LLMEventHandlerContext

Represents the context for handling a before LLM call event.

Link copied to clipboard
fun interface BeforeLLMCallHandler

A functional interface implemented to handle logic that occurs before invoking a large language model (LLM). It allows preprocessing steps or validation based on the provided prompt, available tools, targeted LLM model, and a unique run identifier.

Link copied to clipboard
fun interface BeforeNodeHandler

Handler for intercepting node execution before it starts.

Link copied to clipboard

Represents the context in which event handlers operate, providing a foundational interface for all event handling activities within the AI Agent framework.

Link copied to clipboard

A handler responsible for managing the execution flow of a Large Language Model (LLM) call. It allows customization of logic to be executed before and after the LLM is called.

Link copied to clipboard

Container for node execution handlers. Holds both before and after node execution handlers.

Link copied to clipboard

Handler for executing tools with customizable behaviors for tool calls, validation errors, failures, and results.

Link copied to clipboard

Represents the context for handling LLM-specific events within the framework.

Link copied to clipboard
data class NodeAfterExecuteContext(val context: AIAgentContextBase, val node: AIAgentNodeBase<*, *>, val input: Any?, val output: Any?, val inputType: KType, val outputType: KType) : NodeEventHandlerContext

Represents the context for handling an after node execution event.

Link copied to clipboard
data class NodeBeforeExecuteContext(val context: AIAgentContextBase, val node: AIAgentNodeBase<*, *>, val input: Any?, val inputType: KType) : NodeEventHandlerContext

Represents the context for handling a before node execution event.

Link copied to clipboard

Represents the context for handling node-specific events within the framework.

Link copied to clipboard

Defines the context specifically for handling strategy-related events within the AI agent framework. Extends the base event handler context to include functionality and behavior dedicated to managing the lifecycle and operations of strategies associated with AI agents.

Link copied to clipboard
class StrategyFinishContext<TFeature>(val runId: String, val strategy: AIAgentStrategy<*, *>, val feature: TFeature, val result: Any?, val resultType: KType) : StrategyEventHandlerContext

Represents the context associated with the completion of an AI agent strategy execution.

Link copied to clipboard

Functional interface representing a handler invoked when a strategy execution is finished.

Link copied to clipboard
class StrategyHandler<TFeature : Any>(val feature: TFeature)

A handler class for managing strategy-related events, providing callbacks for when strategies are started or finished. It is designed to operate on a specific feature type and delegate event handling to the assigned handlers.

Link copied to clipboard
class StrategyStartContext<TFeature>(val runId: String, val strategy: AIAgentStrategy<*, *>, val feature: TFeature) : StrategyEventHandlerContext

Represents the context for updating AI agent strategies during execution.

Link copied to clipboard

A functional interface for handling start events of an AI agent strategy.

Link copied to clipboard
data class ToolCallContext(val runId: String, val toolCallId: String?, val tool: Tool<*, *>, val toolArgs: ToolArgs) : ToolEventHandlerContext

Represents the context for handling a tool call event.

Link copied to clipboard
data class ToolCallFailureContext(val runId: String, val toolCallId: String?, val tool: Tool<*, *>, val toolArgs: ToolArgs, val throwable: Throwable) : ToolEventHandlerContext

Represents the context provided to handle a failure during the execution of a tool.

Link copied to clipboard

Functional interface for handling failures that occur during the execution of a tool. This interface provides a mechanism to manage errors resulting from tool operations, including access to the tool, its arguments, and the associated error.

Link copied to clipboard
fun interface ToolCallHandler

Functional interface representing a handler for tool calls. This interface allows the implementation of custom logic to handle the execution of tools and their associated arguments.

Link copied to clipboard
data class ToolCallResultContext(val runId: String, val toolCallId: String?, val tool: Tool<*, *>, val toolArgs: ToolArgs, val result: ToolResult?) : ToolEventHandlerContext

Represents the context used when handling the result of a tool call.

Link copied to clipboard
fun interface ToolCallResultHandler

A functional interface designed for handling the result of tool executions in a structured manner. Implementations can define custom logic for processing the result of a tool based on the provided tool instance, its arguments, and the execution result.

Link copied to clipboard

Represents the context for handling tool-specific events within the framework.

Link copied to clipboard
data class ToolValidationErrorContext(val runId: String, val toolCallId: String?, val tool: Tool<*, *>, val toolArgs: ToolArgs, val error: String) : ToolEventHandlerContext

Represents the context for handling validation errors that occur during the execution of a tool.

Link copied to clipboard

A functional interface to handle validation errors that occur during the execution or configuration of a tool. This interface provides a mechanism for processing or logging errors associated with tools and their arguments.