类 ToolkitConfig
java.lang.Object
io.agentscope.core.tool.ToolkitConfig
Configuration for Toolkit execution behavior.
This class defines how tools are executed: - Parallel vs Sequential execution - Custom ExecutorService (optional) - Execution configuration for timeout and retry
By default, all tool execution is asynchronous using Reactor's Schedulers. The default execution config provides 5-minute timeout with no retry (1 attempt).
-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明static ToolkitConfig.Builderbuilder()Create a new builder for ToolkitConfig.static ToolkitConfigGet the default configuration (sequential execution using Reactor).Get the default tool execution context.Get the execution configuration for timeout and retry.Get the custom executor service if provided.booleanCheck if a custom executor service was provided.booleanCheck if tool deletion is allowed.booleanWhether tools should be executed in parallel.
-
方法详细资料
-
isParallel
public boolean isParallel()Whether tools should be executed in parallel.- 返回:
- true if parallel execution is enabled
-
getExecutorService
Get the custom executor service if provided.- 返回:
- ExecutorService or null if using default Reactor schedulers
-
hasCustomExecutor
public boolean hasCustomExecutor()Check if a custom executor service was provided.- 返回:
- true if custom executor is configured
-
getExecutionConfig
Get the execution configuration for timeout and retry.- 返回:
- ExecutionConfig or null if not configured (defaults will be applied)
-
isAllowToolDeletion
public boolean isAllowToolDeletion()Check if tool deletion is allowed.- 返回:
- true if tool deletion is allowed (default), false otherwise
-
getDefaultContext
Get the default tool execution context.This context is used as the base for all tool calls and can be overridden by agent-level or call-level contexts.
- 返回:
- The default context, or null if not configured
-
builder
Create a new builder for ToolkitConfig.- 返回:
- Builder instance
-
defaultConfig
Get the default configuration (sequential execution using Reactor).- 返回:
- Default ToolkitConfig
-