ReactConfig
ReAct agent reasoning-enhancement configuration.
Description
ReactConfig progressively strengthens the built-in ReAct agent's reasoning through structured chain-of-thought decomposition, post-reasoning self-reflection, and reasoning-aware tool selection. It is exposed as AmritaConfig.builtin.react_config.
Every option defaults to off for backward compatibility: enabling nothing reproduces the plain ReAct loop.
Properties
Structured reasoning
structured_reasoning(bool): DefaultFalse. Enable step-by-step structured reasoning with explicit phase markers (analyze / plan / execute / verify). WhenTrue, the reasoning template guides the model to decompose problems into numbered stepsreasoning_depth(int): Default3, range1..10. Maximum reasoning chain depth (number of sub-problems). Used as a soft hint in the structured reasoning template
Self-reflection
enable_reflection(bool): DefaultFalse. AfterSTOP_TOOL, call averify_reasoningtool to check for contradictions, completeness, and alignment with the user's goal before generating the final answerreflection_depth(int): Default1, range1..5. Maximum number of reflection rounds. Each round may produce a correction that is fed back into the reasoning loop
Reasoning-aware tool selection
reasoning_aware_tools(bool): DefaultFalse. Tools predicted during structured reasoning are placed ahead of other tools in the tool list, nudging the model toward the most relevant tools firsttool_prediction(bool): DefaultFalse. The structured reasoning template asks the model to list which tools it expects to need. Requiresstructured_reasoning=Trueto be effective
Example
python
from amrita_core.config import AmritaConfig, BuiltinAgentConfig, ReactConfig
config = AmritaConfig(
builtin=BuiltinAgentConfig(
react_config=ReactConfig(
structured_reasoning=True,
reasoning_depth=4,
tool_prediction=True,
reasoning_aware_tools=True,
enable_reflection=True,
reflection_depth=2,
)
)
)Related
- BuiltinAgentConfig — the parent object
- ReActAgentStrategy — the strategy this configures
