AgentSubgraphBuilder

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)(source)

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

This class provides methods to configure the subgraph's properties such as tool selection strategy, LLM (Language Model) parameters,

Inheritors

Constructors

Link copied to clipboard
constructor(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)

Functions

Link copied to clipboard
fun limitedTools(tools: List<ERROR CLASS: Symbol not found for ToolBase<*, *>>): SubgraphBuilder

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

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.

Link copied to clipboard
fun usingLLM(llmModel: ERROR CLASS: Symbol not found for LLModel): SubgraphBuilder

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

Link copied to clipboard

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
fun withLLMParams(llmParams: ERROR CLASS: Symbol not found for LLMParams): SubgraphBuilder

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

Link copied to clipboard
fun withResponseProcessor(responseProcessor: ERROR CLASS: Symbol not found for ResponseProcessor): SubgraphBuilder

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.