Class RequestInput

java.lang.Object
com.google.adk.workflow.RequestInput

@Experimental public abstract class RequestInput extends Object
A node's request for user input, which pauses the workflow until the user answers it. A node emits it from Node.runNode(com.google.adk.agents.Context, java.lang.Object), and the runtime records it as a long-running "adk_request_input" function call whose ID is interruptId(). The user answers with a function response that carries the same ID.
  • Field Details

    • FUNCTION_CALL_NAME

      public static final String FUNCTION_CALL_NAME
      The name of the function call that carries a request for input.
      See Also:
  • Constructor Details

    • RequestInput

      public RequestInput()
  • Method Details

    • interruptId

      public abstract String interruptId()
      Returns the ID of the request, which the answering function response carries.
    • message

      public abstract Optional<String> message()
      Returns the message to show the user, if any.
    • payload

      public abstract Optional<Object> payload()
      Returns additional data for rendering the request, if any.
    • responseSchema

      public abstract Optional<com.google.genai.types.Schema> responseSchema()
      Returns the schema the answer must match, if any. An answer of the form {"result": value} is unwrapped first, and a string value is read as JSON unless the schema accepts a string.
    • builder

      public static RequestInput.Builder builder()
      Returns a builder whose interrupt ID is a new random UUID.
    • toBuilder

      public abstract RequestInput.Builder toBuilder()