Package-level declarations

Types

Link copied to clipboard

A builder class for creating and managing edges between AI agent nodes in a graph. This class serves as an entry point to initiate the construction of directed edges by associating a starting node with subsequent interconnected nodes.

Link copied to clipboard
open class AgentSubgraphBuilder<SubgraphBuilder : AgentSubgraphBuilder<SubgraphBuilder>>(name: String?, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: ERROR CLASS: Symbol not found for LLModel?? = null, llmParams: ERROR CLASS: Symbol not found for LLMParams?? = null, responseProcessor: ERROR CLASS: Symbol not found for ResponseProcessor?? = null)

A builder class for configuring and constructing subgraphs in an AI agent graph strategy.

Link copied to clipboard

Represents a directed edge connecting two nodes in the graph of an AI agent strategy. This edge facilitates the transmission of data between a source node and a destination node, allowing transformation or filtering of output values from the source node before they reach the destination node.

Represents a directed edge connecting two nodes in the graph of an AI agent strategy. This edge facilitates the transmission of data between a source node and a destination node, allowing transformation or filtering of output values from the source node before they reach the destination node.

Represents a directed edge connecting two nodes in the graph of an AI agent strategy. This edge facilitates the transmission of data between a source node and a destination node, allowing transformation or filtering of output values from the source node before they reach the destination node.

Link copied to clipboard

Represents a strategy for managing and executing AI agent workflows built as subgraphs of interconnected nodes.

Represents a strategy for managing and executing AI agent workflows built as subgraphs of interconnected nodes.

Represents a strategy for managing and executing AI agent workflows built as subgraphs of interconnected nodes.

Link copied to clipboard
open class AIAgentGraphStrategyBase<TInput, TOutput>(val name: String, val nodeStart: StartNode<TInput>, val nodeFinish: FinishNode<TOutput>, toolSelectionStrategy: ToolSelectionStrategy, serializer: Json = Json { prettyPrint = true }) : AIAgentStrategy<TInput, TOutput, AIAgentGraphContextBase> , AIAgentSubgraphBase<TInput, TOutput>

Base class for AIAgentStrategy.

Link copied to clipboard

Represents a simple implementation of an AI agent node, encapsulating a specific execution logic that processes the input data and produces an output.

Represents a simple implementation of an AI agent node, encapsulating a specific execution logic that processes the input data and produces an output.

Represents a simple implementation of an AI agent node, encapsulating a specific execution logic that processes the input data and produces an output.

Link copied to clipboard
abstract class AIAgentNodeBase<in TInput, TOutput>

Represents an abstract node in an AI agent strategy graph, responsible for executing a specific operation and managing directed edges to other nodes.

Link copied to clipboard

A Java builder class for creating AIAgentNode with a specified name. This allows the configuration of the node's input type.

Link copied to clipboard
class AIAgentNodeBuilderWithInput<Input : Any>(name: String?, inputTypeToken: ERROR CLASS: Symbol not found for TypeToken)

A Java builder class for creating AIAgentNode with a specified input type.

Link copied to clipboard
class AIAgentState(iterations: Int = 0) : AutoCloseable

Represents the state of an AI agent.

Link copied to clipboard
class AIAgentStateManager(state: AIAgentState = AIAgentState())

Manages the state of an AI agent by providing thread-safe access and mechanisms to update the internal state using a locking mechanism.

Link copied to clipboard

Concurrent-safe key-value storage for an agent. You can create typed keys for your data using the createStorageKey function and set and retrieve data using it by calling set and get.

Represents a storage key used for identifying and accessing data associated with an AI agent.

Concurrent-safe key-value storage for an agent. You can create typed keys for your data using the createStorageKey function and set and retrieve data using it by calling set and get.

Link copied to clipboard
Link copied to clipboard
class AIAgentStorageKey<T : Any>(val name: String)

Represents a storage key used for identifying and accessing data associated with an AI agent.

Link copied to clipboard

An interface representing the execution strategy of an AI agent.

An interface representing the execution strategy of an AI agent.

An interface representing the execution strategy of an AI agent.

Link copied to clipboard

Represents a subgraph within an AI agent execution strategy capable of processing input and producing output.

Represents a subgraph within an AI agent execution strategy capable of processing input and producing output.

Represents a subgraph within an AI agent execution strategy capable of processing input and producing output.

Link copied to clipboard
open class AIAgentSubgraphBase<TInput, TOutput>(val name: String, val start: StartNode<TInput>, val finish: FinishNode<TOutput>, toolSelectionStrategy: ToolSelectionStrategy, llmModel: LLModel? = null, llmParams: LLMParams? = null, responseProcessor: ResponseProcessor? = null) : AIAgentNodeBase<TInput, TOutput> , ExecutionPointNode

Base class for AIAgentSubgraph.

Link copied to clipboard
open class AIAgentSubgraphBuilderWithInput<Input : Any, SubgraphBuilder : AgentSubgraphBuilder<SubgraphBuilder>>(name: String?, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: ERROR CLASS: Symbol not found for LLModel?? = null, llmParams: ERROR CLASS: Symbol not found for LLMParams?? = null, responseProcessor: ERROR CLASS: Symbol not found for ResponseProcessor?? = null, inputClass: Class<Input>) : AgentSubgraphBuilder<SubgraphBuilder>

A builder class for constructing AI agent subgraphs with a specified input type.

Link copied to clipboard

Constructs a compatible full agent edge between two AI agent nodes, enabling the flow and transformation of data from the output of one node to the input of another.

Link copied to clipboard

Builder class for creating a compress history node in an AI agent graph strategy.

Link copied to clipboard
fun interface ContextualAction<Input, Output>

Represents a functional interface that defines a contextual action for processing an input and producing an output within a specific AI agent graph context.

Link copied to clipboard

ContextualCondition is a functional interface designed to evaluate a condition based on an output value and the given AI agent graph context.

Link copied to clipboard

A functional interface representing a transformation operation that processes an input output of type Output in the context of AIAgentGraphContextBase and produces a transformed result of type NewOutput.

Link copied to clipboard
class DefinedAIAgentNodeBuilder<Input : Any, Output : Any>(name: String?, inputTypeToken: ERROR CLASS: Symbol not found for TypeToken, outputTypeToken: ERROR CLASS: Symbol not found for TypeToken, nodeAction: ContextualAction<Input, Output>)

A builder class responsible for constructing instances of AIAgentNode with specific input and output types, a unique node name, and a defined contextual action to be executed within an AI agent graph context.

Link copied to clipboard
class DefinedAIAgentSubgraphBuilder<Input : Any, Output : Any>(name: String?, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: ERROR CLASS: Symbol not found for LLModel?? = null, llmParams: ERROR CLASS: Symbol not found for LLMParams?? = null, responseProcessor: ERROR CLASS: Symbol not found for ResponseProcessor?? = null, inputClass: Class<Input>, outputClass: Class<Output>, buildSubgraph: GraphBuilderAction<Input, Output>) : TypedAIAgentSubgraphBuilderBase<Input, Output, TypedAIAgentSubgraphBuilder<Input, Output>>

Builder class for creating a defined AI Agent subgraph with specific input and output types.

Link copied to clipboard
data class ExecutionPoint(val node: AIAgentNodeBase<*, *>, val input: Any? = null)

Represents a point of execution within the AI agent's strategy graph. An execution point consists of a specific node and an optional input value.

Link copied to clipboard

Represents a node in the execution graph of an AI agent that can explicitly enforce execution at a specified node with optional input data. This interface provides the ability to define a forced node and input, overriding default execution behavior.

Link copied to clipboard

Represents a specialized node within an AI agent strategy graph that marks the endpoint of a subgraph. This node serves as a "finish" node and directly passes its input to its output without modification.

Link copied to clipboard

A builder class for constructing a specialized edge in an AI agent strategy graph. This edge enables data flow between two nodes while supporting a composition of the output transformation logic.

Link copied to clipboard
fun interface GraphBuilderAction<Input : Any, Output : Any>

Functional interface representing an action that builds a graph using a provided TypedGraphStrategyBuilder. This action allows the customization and configuration of a graph strategy based on specific requirements for input and output types.

Link copied to clipboard
class GraphStrategyBuilder(strategyName: String)

A builder class used for constructing strategies related to graph processing. This serves as the entry point for configuring a graph strategy, allowing you to define the input type for the graph.

Link copied to clipboard
class GraphStrategyBuilderWithInput<Input : Any>(strategyName: String, inputClass: KClass<Input>)

A builder class for constructing graph strategies that start with a specific input type.

Link copied to clipboard

A builder class used to define a transitional directed edge in an AI agent strategy graph.

Link copied to clipboard
fun interface PromptBuilderAction

Represents an action that defines how a PromptBuilder is configured.

Link copied to clipboard
fun interface SimpleAction<Input, Output>

Represents a functional interface designed for performing a simple action that takes an input of type Input and produces an output of type Output.

Link copied to clipboard

Represents a simple implementation of an AI agent node within a graph-based structure.

Link copied to clipboard
fun interface SimpleCondition<Output>

Represents a simple, stateless functional interface that evaluates a condition on a given output. This is particularly tailored for Java compatibility, enabling usage in contexts where Java code interacts with Kotlin.

Link copied to clipboard

A functional interface representing a transformation operation from a given input type to a new output type.

Link copied to clipboard

Represents the base node for starting a subgraph in an AI agent strategy graph. This node acts as an entry point for executing subgraphs.

Link copied to clipboard
data class SubgraphMetadata(val nodesMap: Map<String, AIAgentNodeBase<*, *>>, val uniqueNames: Boolean = false)

Represents metadata associated with a subgraph in an AI agent strategy graph.

Link copied to clipboard
class SubgraphWithFinishToolBuilder<Input : Any, Output : Any, OutputTransformed : Any>(name: String?, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: ERROR CLASS: Symbol not found for LLModel?? = null, llmParams: ERROR CLASS: Symbol not found for LLMParams?? = null, responseProcessor: ERROR CLASS: Symbol not found for ResponseProcessor?? = null, inputClass: Class<Input>, finishTool: ERROR CLASS: Symbol not found for Tool<Output, OutputTransformed>)

Builder class for constructing a subgraph with a finish tool in a graph strategy.

Link copied to clipboard
class SubgraphWithTaskBuilder<Input : Any, Output : Any>(name: String?, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: ERROR CLASS: Symbol not found for LLModel?? = null, llmParams: ERROR CLASS: Symbol not found for LLMParams?? = null, responseProcessor: ERROR CLASS: Symbol not found for ResponseProcessor?? = null, inputClass: Class<Input>, outputOption: OutputOption<Output>, defineTask: ContextualAction<Input, String>, runMode: ToolCalls = ToolCalls.SEQUENTIAL, assistantResponseRepeatMax: Int? = null) : TypedAIAgentSubgraphBuilderBase<Input, Output, SubgraphWithTaskBuilder<Input, Output>>

A builder class for creating an AI agent subgraph that incorporates task definition as part of its configuration. This builder allows customizing the construction of a subgraph while defining how tasks are specified and executed within the subgraph.

Link copied to clipboard
sealed interface ToolSelectionStrategy

Represents a strategy to select a subset of tools to be used in a subgraph during its execution.

Link copied to clipboard
class TypedAIAgentNodeBuilder<Input : Any, Output : Any>(name: String?, inputTypeToken: ERROR CLASS: Symbol not found for TypeToken, outputTypeToken: ERROR CLASS: Symbol not found for TypeToken)

A Java builder class for creating instances of AIAgentNode with strongly typed input and output data.

Link copied to clipboard
class TypedAIAgentSubgraphBuilder<Input : Any, Output : Any>(name: String?, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: ERROR CLASS: Symbol not found for LLModel?? = null, llmParams: ERROR CLASS: Symbol not found for LLMParams?? = null, responseProcessor: ERROR CLASS: Symbol not found for ResponseProcessor?? = null, inputClass: Class<Input>, outputClass: Class<Output>) : TypedAIAgentSubgraphBuilderBase<Input, Output, TypedAIAgentSubgraphBuilder<Input, Output>>

Builder class for creating and configuring a typed AI agent subgraph.

Link copied to clipboard
abstract class TypedAIAgentSubgraphBuilderBase<Input : Any, Output : Any, SubgraphBuilder : TypedAIAgentSubgraphBuilderBase<Input, Output, SubgraphBuilder>>(name: String?, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, llmModel: ERROR CLASS: Symbol not found for LLModel?? = null, llmParams: ERROR CLASS: Symbol not found for LLMParams?? = null, responseProcessor: ERROR CLASS: Symbol not found for ResponseProcessor?? = null, inputClass: Class<Input>, outputOption: OutputOption<Output>) : AgentSubgraphBuilder<SubgraphBuilder>

A base class for constructing a typed AI agent subgraph builder with strongly defined input and output types. This class is designed for creating subgraphs within an AI agent graph structure, enabling the configuration of node interactions, tool usage, and the integration of language models (LLMs).

Link copied to clipboard
class TypedCompressHistoryNodeBuilder<Input : Any>(name: String, inputTypeToken: ERROR CLASS: Symbol not found for TypeToken, retrievalModel: ERROR CLASS: Symbol not found for LLModel?? = null, strategy: HistoryCompressionStrategy = HistoryCompressionStrategy.WholeHistory, preserveMemory: Boolean = true)

A builder class for configuring and creating a typed compression history node within an AI agent graph.

Link copied to clipboard
class TypedGraphStrategyBuilder<Input : Any, Output : Any>(strategyName: String, inputClass: KClass<Input>, outputClass: KClass<Output>, toolSelectionStrategy: ToolSelectionStrategy = ToolSelectionStrategy.ALL, builder: AIAgentGraphStrategyBuilder<Input, Output> = AIAgentGraphStrategyBuilder( strategyName, typeToken(inputClass), typeToken(outputClass), toolSelectionStrategy ), edgeBuilders: MutableList<AIAgentGraphStrategyBuilder<Input, Output>.() -> Unit> = mutableListOf())

Builder class used for constructing and configuring an AIAgentGraphStrategy.

Functions

Link copied to clipboard

Creates a storage key for a specific type, allowing identification and retrieval of values associated with it.