类 PlanNotebook.Builder
java.lang.Object
io.agentscope.core.plan.PlanNotebook.Builder
- 封闭类:
PlanNotebook
Builder for constructing PlanNotebook instances with customizable settings.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Builds a new PlanNotebook with the configured settings.Sets the key prefix for state storage.maxSubtasks(int maxSubtasks) Sets the maximum number of subtasks allowed per plan.needUserConfirm(boolean needUserConfirm) Sets whether to include "wait for user confirmation" rule in hints.planToHint(PlanToHint planToHint) Sets the strategy for converting plans to hints.storage(PlanStorage storage) Sets the storage backend for persisting historical plans.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
planToHint
Sets the strategy for converting plans to hints.- 参数:
planToHint- The plan-to-hint converter implementation- 返回:
- This builder for method chaining
-
storage
Sets the storage backend for persisting historical plans.- 参数:
storage- The plan storage implementation- 返回:
- This builder for method chaining
-
maxSubtasks
Sets the maximum number of subtasks allowed per plan.- 参数:
maxSubtasks- Maximum subtasks (null for unlimited)- 返回:
- This builder for method chaining
-
needUserConfirm
Sets whether to include "wait for user confirmation" rule in hints.When enabled (default), hints will include a rule requiring the agent to wait for explicit user confirmation before executing plans. When disabled, the agent may proceed with execution immediately after creating a plan.
- 参数:
needUserConfirm- true to require user confirmation, false to allow immediate execution- 返回:
- This builder for method chaining
-
keyPrefix
Sets the key prefix for state storage.Use this when multiple PlanNotebook instances need to coexist in the same session.
- 参数:
keyPrefix- the prefix for storage keys (e.g., "mainPlan", "subPlan")- 返回:
- This builder for method chaining
-
build
Builds a new PlanNotebook with the configured settings.- 返回:
- A new PlanNotebook instance
-