Skip to content

Interface: ReactOptions

@providerprotocol/agents


@providerprotocol/agents / index / ReactOptions

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

Configuration options for the ReAct execution strategy.

The ReAct (Reason-Act-Observe) strategy adds an explicit reasoning phase before each action, improving the model’s decision-making by encouraging step-by-step thinking.

https://arxiv.org/abs/2210.03629 - ReAct: Synergizing Reasoning and Acting

const agent = createAgent({
// ... other config
strategy: react({
maxSteps: 10,
reasoningPrompt: 'Think carefully about what to do next.',
}),
});

optional maxSteps: number

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

Maximum number of reason-act-observe cycles before stopping.

Infinity (no limit)

optional reasoningPrompt: string

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

Custom prompt appended to trigger the reasoning phase.

'Think step by step about what you need to do next...'