Package com.tnsai.reasoning.react
package com.tnsai.reasoning.react
ReAct (Reason + Act + Observe) pattern implementation.
Implements the ReAct framework where an LLM explicitly reasons about what to do, takes an action, observes the result, and iterates until the goal is achieved. This produces interpretable reasoning traces with structured Thought/Action/Observation steps.
Key Classes
ReActExecutor- Main executor that runs the ReAct loopReActResult- Immutable result with final answer and reasoning traceReActStep- Single step in the reasoning processActionHandler- Strategy for executing actionsStopCondition- Configurable loop termination
Research Reference
"ReAct: Synergizing Reasoning and Acting in Language Models" (Yao et al., 2022)
-
ClassDescriptionHandles action execution in a ReAct loop.ReAct (Reason + Act + Observe) executor for agentic reasoning.Builder for ReActExecutor.Result of a ReAct (Reason + Act + Observe) execution.Status of a ReAct execution.Represents a single step in a ReAct (Reason + Act + Observe) loop.Determines when a ReAct loop should stop.Mutable context for stop conditions that need to track state across steps.Format for the thought phase of ReAct.