Package-level declarations

Types

Link copied to clipboard
@TestOnly
sealed interface AssertionResult

Represents the result of an assertion used within the testing framework.

Link copied to clipboard
@TestOnly
data class EdgeAssertion<Input, Output>(val node: NodeReference<Input, Output>, val context: AIAgentContextBase, val output: Output, val expectedNode: NodeReference<*, *>)

Represents the assertion of an edge in a graph structure related to AI agent operations.

Link copied to clipboard
@TestOnly
data class GraphAssertions(val name: String, val start: NodeReference.Start<*>, val finish: NodeReference.Finish<*>, val nodes: Map<String, NodeReference<*, *>>, val nodeOutputAssertions: List<NodeOutputAssertion<*, *>>, val edgeAssertions: List<EdgeAssertion<*, *>>, val unconditionalEdgeAssertions: List<UnconditionalEdgeAssertion>, val reachabilityAssertions: List<ReachabilityAssertion>, val subgraphAssertions: MutableList<SubGraphAssertions>)

Represents a set of assertions for validating the structure and behavior of a graph-based system.

Link copied to clipboard
@TestOnly
data class NodeOutputAssertion<Input, Output>(val node: NodeReference<Input, Output>, val context: DummyAIAgentContext, val input: Input, val expectedOutput: Output)

Represents an assertion for testing the output of a specific node within an AI agent's subgraph.

Link copied to clipboard
@TestOnly
sealed class NodeReference<Input, Output>

Represents a reference to a specific type of node within an AI agent subgraph. This sealed class provides a way to resolve and identify nodes for various processing operations in the context of a subgraph.

Link copied to clipboard
@TestOnly
data class ReachabilityAssertion(val from: NodeReference<*, *>, val to: NodeReference<*, *>)

Represents an assertion for testing the reachability between two specific nodes in a graph.

Link copied to clipboard
@TestOnly
data class SubGraphAssertions(val subgraphRef: NodeReference.SubgraphNode<*, *>, val graphAssertions: GraphAssertions)

Encapsulates assertions for a subgraph within a graph testing framework.

Link copied to clipboard
@TestOnly
class Testing

Provides functionality for testing graph-related stages in an AI agent pipeline.

Link copied to clipboard
@TestOnly
data class UnconditionalEdgeAssertion(val node: NodeReference<*, *>, val expectedNode: NodeReference<*, *>)

Represents an assertion for an unconditional edge in a graph structure.

Functions

Link copied to clipboard

Creates an assistant message with the provided text and finish reason.

Link copied to clipboard

Configures the Testing feature for graph testing.

Link copied to clipboard

Installs the Testing feature with graph testing enabled and executes the provided test block.

Link copied to clipboard

Creates a Message.Tool.Call instance for the given tool and its arguments.

Link copied to clipboard

Constructs a ReceivedToolResult object using the provided tool and result string.

Converts a tool and its corresponding result into a ReceivedToolResult object.

Link copied to clipboard

Enables and configures the Testing feature for a Kotlin AI Agent instance.