Class AguiResume

java.lang.Object
io.agentscope.core.agui.model.AguiResume

public class AguiResume extends Object
Represents one official AG-UI resume response for a previous interrupt.

Resume entries are sent on the next RunAgentInput for the same thread and are correlated with the interrupted run by interruptId.

Important distinction: A user response that explicitly denies the request (e.g., { "approved": false }) is still considered resolved, not cancelled. The cancelled status is reserved for cases where the user provides no meaningful input and the payload is omitted.

  • Field Details

  • Constructor Details

    • AguiResume

      public AguiResume(String interruptId, String status, Object payload)
      Creates a new AG-UI resume entry.
      Parameters:
      interruptId - The interrupt ID from RunFinished.outcome.interrupts[]
      status - The resume status, usually resolved or cancelled
      payload - Optional response payload for resolved interrupts
  • Method Details

    • getInterruptId

      public String getInterruptId()
      Get the interrupt ID this resume entry answers.
      Returns:
      The interrupt ID
    • getStatus

      public String getStatus()
      Get the resume status.
      Returns:
      The status
    • getPayload

      public Object getPayload()
      Get the resume payload.
      Returns:
      The payload, or null if not supplied
    • isResolved

      public boolean isResolved()
      Check whether this resume entry resolved the interrupt.
      Returns:
      true if status is resolved
    • isCancelled

      public boolean isCancelled()
      Check whether this resume entry cancelled the interrupt.
      Returns:
      true if status is cancelled
    • toString

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object