EdgeAssertionsBuilder

A builder class used to facilitate the creation and management of edge assertions in a stage context. Delegates functionality to a local agent stage context mock builder for shared behaviors.

Constructors

Link copied to clipboard
constructor(stageBuilder: Testing.Config.SubgraphAssertionsBuilder<*, *>, context: AIAgentContextMockBuilder = stageBuilder.context.copy())

Types

Link copied to clipboard
inner class EdgeOutputPair<I, O>(val node: NodeReference<I, O>, val output: O)

Represents a pair consisting of a node and its corresponding output within an edge assertion context. This is used to define expected edge behavior in a graph of nodes.

Properties

Link copied to clipboard
open override var agentInput: String?
Link copied to clipboard

A mutable list that holds all the defined EdgeAssertion instances for the current context.

Link copied to clipboard
open override var config: AIAgentConfigBase?
Link copied to clipboard
open override var environment: AIAgentEnvironment?
Link copied to clipboard
open override var llm: AIAgentLLMContext?
Link copied to clipboard
open override var sessionUuid: Uuid?
Link copied to clipboard
open override var stateManager: AIAgentStateManager?
Link copied to clipboard
open override var storage: AIAgentStorage?
Link copied to clipboard
open override var strategyId: String?
Link copied to clipboard

A collection that stores assertions ensuring an unconditional connection between nodes in a graph testing context. Each assertion represents a defined relationship where a node always leads to a specified target node.

Functions

Link copied to clipboard
infix fun NodeReference<*, *>.alwaysGoesTo(targetNode: NodeReference<*, *>)

Creates an assertion to verify that the current node always leads to the given target node.

Link copied to clipboard
open override fun build(): AIAgentContextBase
Link copied to clipboard

Creates a deep copy of the current EdgeAssertionsBuilder instance, duplicating its state and context.

Link copied to clipboard

Executes a given block of logic within the context of a copied instance of the current EdgeAssertionsBuilder.

Link copied to clipboard

Associates the given output with the current node reference, creating a pair that represents the node and its corresponding output.