Class ReActResult

java.lang.Object
com.tnsai.reasoning.react.ReActResult

public final class ReActResult extends Object
Result of a ReAct (Reason + Act + Observe) execution.

Contains the final answer, all reasoning steps, and execution metadata.

  • Method Details

    • getFinalAnswer

      public String getFinalAnswer()
      Gets the final answer produced by the ReAct loop.
    • getSteps

      public List<ReActStep> getSteps()
      Gets all reasoning steps (thought → action → observation).
    • getStepCount

      public int getStepCount()
      Gets the number of steps executed.
    • getStatus

      public ReActStatus getStatus()
      Gets the execution status.
    • getDuration

      public Duration getDuration()
      Gets the total execution duration.
    • getTotalLLMCalls

      public int getTotalLLMCalls()
      Gets the total number of LLM calls made.
    • isSuccess

      public boolean isSuccess()
      Returns true if the execution completed successfully with a final answer.
    • getReasoningTrace

      public String getReasoningTrace()
      Gets the full reasoning trace as a formatted string.
    • builder

      public static ReActResult.Builder builder()
    • toString

      public String toString()
      Overrides:
      toString in class Object