类的使用
io.agentscope.core.ReActAgent.Builder
使用ReActAgent.Builder的程序包
-
io.agentscope.core中ReActAgent.Builder的使用
修饰符和类型方法说明static ReActAgent.BuilderReActAgent.builder()ReActAgent.Builder.checkRunning(boolean checkRunning) 已过时。No longer enforced; per-session serialization handles concurrency.ReActAgent.Builder.defaultSessionId(String sessionId) Sets the builder-time fallbacksessionIdused to persistagent_statewhen a call does not supply asessionIdon itsRuntimeContext.ReActAgent.Builder.description(String description) ReActAgent.Builder.dynamicSkillsEnabled(boolean enabled) Toggles automatic installation ofDynamicSkillMiddleware.ReActAgent.Builder.enableMetaTool(boolean enableMetaTool) Enables or disables the meta-tool functionality.ReActAgent.Builder.enablePendingToolRecovery(boolean enable) Enables or disables automatic recovery from orphaned pending tool calls.ReActAgent.Builder.enableTaskList()Enables the built-in task-list capability (todo_writetool + per-turn reminder).ReActAgent.Builder.enableTaskList(boolean enabled) Enables or disables the built-in task-list capability.ReActAgent.Builder.fallbackModel(Model fallbackModel) Sets the fallback model invoked after the primary model exhausts its retry budget.ReActAgent.Builder.fallbackModel(String modelId) Convenience overload that resolvesmodelIdviaModelRegistry.resolve(String)(named registration orprovider:modelpattern likeopenai:gpt-5.5,dashscope:qwen-max).static ReActAgent.BuilderReActAgent.Builder.fromAgent(ReActAgent agent) Returns a newReActAgent.Builderpre-populated with the given agent's observable configuration: name, description, system prompt, model, maxIters, generateOptions, and a defensive copy of the toolkit.ReActAgent.Builder.generateOptions(GenerateOptions generateOptions) Sets the generation options for model API calls.Adds a hook for monitoring and intercepting agent execution events.Adds multiple hooks for monitoring and intercepting agent execution events.已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0.ReActAgent.Builder.knowledges(List<Knowledge> knowledges) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0.ReActAgent.Builder.longTermMemory(LongTermMemory longTermMemory) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0.ReActAgent.Builder.longTermMemoryAsyncRecord(boolean asyncRecord) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0.ReActAgent.Builder.longTermMemoryMode(LongTermMemoryMode mode) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0.ReActAgent.Builder.maxIters(int maxIters) Sets the maximum number of reasoning-acting iterations.ReActAgent.Builder.maxRetries(int maxRetries) Sets the model-call retry budget (max attempts including the first try).ReActAgent.Builder.middleware(MiddlewareBase middleware) Adds a middleware for intercepting agent execution.ReActAgent.Builder.middlewares(List<? extends MiddlewareBase> middlewares) Adds multiple middlewares for intercepting agent execution.Sets the language model for this agent.Configures the model from a string id resolved viaModelRegistry: a named registration (ModelRegistry.register(String, Model)) or an extension provider pattern such asopenai:gpt-5.5,dashscope:qwen-max,anthropic:claude-sonnet-4-5,gemini:gemini-2.0-flash, orollama:llama3.ReActAgent.Builder.modelExecutionConfig(ExecutionConfig modelExecutionConfig) Sets the execution configuration for model API calls.Sets the name for this agent.ReActAgent.Builder.permissionContext(PermissionContextState permissionContext) Sets thePermissionContextStateconsulted by thePermissionEngineduring tool execution.已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0.ReActAgent.Builder.retrieveConfig(RetrieveConfig config) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0.已过时。since 2.0.0.ReActAgent.Builder.skillCodeExecutionEnabled(boolean enabled) Enables the code-execution prompt block emitted byAgentSkillPromptProvider.ReActAgent.Builder.skillFilter(SkillFilter filter) Builder-timeSkillFilterapplied by the auto-installedDynamicSkillMiddleware.ReActAgent.Builder.skillRepositories(List<AgentSkillRepository> repos) Replaces the current repository list with the supplied collection.ReActAgent.Builder.skillRepository(AgentSkillRepository repo) Adds a singleAgentSkillRepositoryto the layered skill stack.ReActAgent.Builder.skillWorkDir(Path dir) Sets a stable working directory used byDynamicSkillMiddlewareforuploadSkillFiles.ReActAgent.Builder.stateStore(AgentStateStore stateStore) Sets theAgentStateStorebacking automatic AgentState load (at construction) and save (after every successfulcall()and on graceful shutdown).ReActAgent.Builder.stopOnReject(boolean stopOnReject) Controls whether a permission rejection of any tool call terminates the reasoning loop (instead of feeding the rejection back into the next reasoning round).Sets the system prompt for this agent.ReActAgent.Builder.toolExecutionConfig(ExecutionConfig toolExecutionConfig) Sets the execution configuration for tool executions.ReActAgent.Builder.toolExecutionContext(ToolExecutionContext toolExecutionContext) 已过时。UseRuntimeContextwithagent.call(msg, runtimeContext)or register POJOs directly viaRuntimeContext.builder().put(Type, value).Sets the toolkit containing available tools for this agent.