AIAgentSubgraphBuilderWithInput

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

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

This class extends AgentSubgraphBuilder and provides additional functionality to define an input type for the subgraph, enabling the creation of typed subgraphs where the input to the graph is explicitly defined.

Constructors

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

Functions

Link copied to clipboard
fun limitedTools(vararg toolSets: ERROR CLASS: Symbol not found for ToolSet): SubgraphBuilder

Configures the builder with a selection of tools defined by the provided tool sets. The tools will be extracted from each ToolSet and applied to the builder's tool selection strategy.

Configures the builder to use a specific list of tools for the AI agent's subgraph.

Link copied to clipboard

Sets the specified Large Language Model (LLM) for the agent subgraph builder.

Link copied to clipboard

Configures the subgraph with a specified finish tool to process the output. This allows the subgraph to conclude by transforming the output using the provided tool.

Link copied to clipboard
fun <Input : Any> withInput(outputClass: ERROR CLASS: Symbol not found for Class<Input>): AIAgentSubgraphBuilderWithInput<Input, *>

Configures the builder with the specified input type and returns a new instance of AIAgentSubgraphBuilderWithInput, allowing further configuration for the specified input type.

Link copied to clipboard

Sets the parameters for the Language Learning Model (LLM) in the current builder.

Link copied to clipboard
fun <Output : Any> withOutput(outputClass: ERROR CLASS: Symbol not found for Class<Output>): TypedAIAgentSubgraphBuilder<Input, Output>

Specifies the output type for the subgraph and transitions to a builder capable of handling the provided input and output types. This method returns a new instance of the builder, with the output type defined as the given class.

Link copied to clipboard

Sets the specified response processor to handle and modify LLM responses.

Link copied to clipboard

Sets the tool selection strategy for the subgraph builder and returns the updated builder instance.

Link copied to clipboard

Responsible for building a subgraph that can perform verification tasks within the AI agent graph. Resulting subgraph woult take an instance of Input and produce an instance of CriticResult<Input>