Interface: ReactOptions
@providerprotocol/agents / index / ReactOptions
Interface: ReactOptions
Section titled “Interface: 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
Example
Section titled “Example”const agent = createAgent({ // ... other config strategy: react({ maxSteps: 10, reasoningPrompt: 'Think carefully about what to do next.', }),});Properties
Section titled “Properties”maxSteps?
Section titled “maxSteps?”
optionalmaxSteps:number
Defined in: src/execution/types.ts:389
Maximum number of reason-act-observe cycles before stopping.
Default Value
Section titled “Default Value”Infinity (no limit)reasoningPrompt?
Section titled “reasoningPrompt?”
optionalreasoningPrompt:string
Defined in: src/execution/types.ts:395
Custom prompt appended to trigger the reasoning phase.
Default Value
Section titled “Default Value”'Think step by step about what you need to do next...'