Interface: PlanOptions
@providerprotocol/agents / index / PlanOptions
Interface: PlanOptions
Section titled “Interface: PlanOptions”Defined in: src/execution/types.ts:416
Configuration options for the plan execution strategy.
The plan strategy first generates a structured execution plan with dependencies between steps, then executes each step in topological order. This is useful for complex multi-step tasks.
Example
Section titled “Example”const agent = createAgent({ // ... other config strategy: plan({ maxPlanSteps: 10, allowReplan: true, }),});Properties
Section titled “Properties”allowReplan?
Section titled “allowReplan?”
optionalallowReplan:boolean
Defined in: src/execution/types.ts:427
Whether to allow replanning when a step fails.
Default Value
Section titled “Default Value”truemaxPlanSteps?
Section titled “maxPlanSteps?”
optionalmaxPlanSteps:number
Defined in: src/execution/types.ts:421
Maximum number of steps allowed in the generated plan.
Default Value
Section titled “Default Value”Infinity (no limit)planSchema?
Section titled “planSchema?”
optionalplanSchema:Record<string,unknown>
Defined in: src/execution/types.ts:433
JSON Schema for validating the plan structure. Override to customize the expected plan format.