Package com.alibaba.cloud.ai.graph.agent
Class DefaultBuilder
java.lang.Object
com.alibaba.cloud.ai.graph.agent.Builder
com.alibaba.cloud.ai.graph.agent.DefaultBuilder
-
Field Summary
FieldsFields inherited from class com.alibaba.cloud.ai.graph.agent.Builder
advisorObservationConvention, chatClient, chatOptions, compileConfig, customObservationConvention, description, enableLogging, executor, hooks, includeContents, inputSchema, inputType, instruction, interceptors, maxParallelTools, model, modelInterceptors, name, observationRegistry, outputKey, outputKeyStrategy, outputSchema, outputType, parallelToolExecution, releaseThread, resolver, returnReasoningContents, saver, stateSerializer, systemPrompt, templateRenderer, toolCallbackProviders, toolContext, toolExecutionExceptionProcessor, toolExecutionTimeout, toolInterceptors, toolNames, tools, wrapSyncToolsAsAsync -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.alibaba.cloud.ai.graph.agent.Builder
advisorObservationConvention, buildConfig, chatClient, chatOptions, compileConfig, customObservationConvention, description, enableLogging, executor, hooks, hooks, includeContents, inputSchema, inputType, instruction, interceptors, interceptors, maxParallelTools, methodTools, model, name, observationRegistry, outputKey, outputKeyStrategy, outputSchema, outputType, parallelToolExecution, releaseThread, resolver, returnReasoningContents, saver, stateSerializer, stateSerializer, systemPrompt, templateRenderer, toolCallbackProviders, toolContext, toolExecutionExceptionProcessor, toolExecutionTimeout, toolNames, tools, tools, wrapSyncToolsAsAsync
-
Field Details
-
POSSIBLE_LLM_TOOL_NAME_CHANGE_WARNING
- See Also:
-
-
Constructor Details
-
DefaultBuilder
public DefaultBuilder()
-
-
Method Details
-
build
-
separateInterceptorsByType
protected void separateInterceptorsByType()Separate unified interceptors by type into modelInterceptors and toolInterceptors. -
gatherLocalTools
Collect all tools from various sources.This method gathers tools from multiple sources in the following order:
- Direct tools provided via
tools - Tools from
toolCallbackProviders - Tools resolved by name via
toolNames - Tools extracted from
resolver(if no regular tools collected yet) - Tools from interceptors (
modelInterceptors) - Tools from hooks (
hooks)
The final combined list prioritizes hook tools first, then interceptor tools, followed by regular tools.
- Returns:
- a combined list of all tools from hooks, interceptors and user-provided sources
- Direct tools provided via
-