Class Action.SuspendAction

java.lang.Object
dev.langchain4j.agentic.planner.Action.SuspendAction
All Implemented Interfaces:
Action
Enclosing interface:
Action

public static class Action.SuspendAction extends Object implements Action
Signals that the agentic system should suspend. The execution loop checkpoints the scope state and throws AgenticSystemSuspendedException (or returns a suspended ResultWithAgenticScope) to release the calling thread.
  • Constructor Details

    • SuspendAction

      public SuspendAction()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isDone

      public boolean isDone()
      Description copied from interface: Action
      Returns true if this action signals that the planner has finished (either completed or suspended) and the execution loop should exit.
      Specified by:
      isDone in interface Action
      Returns:
      true if the planner is done or suspended
    • isSuspended

      public boolean isSuspended()
      Description copied from interface: Action
      Returns true if this action represents a suspension of the agentic system. A suspended action is also done (Action.isDone() returns true).
      Specified by:
      isSuspended in interface Action
      Returns:
      true if the agentic system should suspend