Skip to content

Interface: PlanOptions

@providerprotocol/agents


@providerprotocol/agents / index / 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.

const agent = createAgent({
// ... other config
strategy: plan({
maxPlanSteps: 10,
allowReplan: true,
}),
});

optional allowReplan: boolean

Defined in: src/execution/types.ts:427

Whether to allow replanning when a step fails.

true

optional maxPlanSteps: number

Defined in: src/execution/types.ts:421

Maximum number of steps allowed in the generated plan.

Infinity (no limit)

optional planSchema: Record<string, unknown>

Defined in: src/execution/types.ts:433

JSON Schema for validating the plan structure. Override to customize the expected plan format.