Package-level declarations

Types

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.

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.

Link copied to clipboard
abstract class AIAgentNodeBase<Input, Output>

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

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.

Link copied to clipboard
data 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
class AIAgentStrategy<Input, Output>(val name: String, val nodeStart: StartNode<Input>, val nodeFinish: FinishNode<Output>, toolSelectionStrategy: ToolSelectionStrategy, serializer: Json = Json { prettyPrint = true }) : AIAgentSubgraph<Input, Output>

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

Link copied to clipboard
open class AIAgentSubgraph<Input, Output>(val name: String, val start: StartNode<Input>, val finish: FinishNode<Output>, toolSelectionStrategy: ToolSelectionStrategy, llmModel: LLModel? = null, llmParams: LLMParams? = null) : AIAgentNodeBase<Input, Output> , ExecutionPointNode

AIAgentSubgraph represents a structured subgraph within an AI agent workflow. It serves as a logical segment containing a defined starting and ending point. The subgraph is responsible for executing tasks in a step-by-step manner, managing iterations, and handling tool selection strategies.

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

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
sealed interface ToolSelectionStrategy

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

Functions

Link copied to clipboard

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