Record Class TaskTool.Request

java.lang.Object
java.lang.Record
com.alibaba.cloud.ai.graph.agent.tools.task.TaskTool.Request
Enclosing class:
TaskTool

@JsonClassDescription("Request to launch a sub-agent task") public static record TaskTool.Request(String description, String prompt, String subagentType, Boolean runInBackground) extends Record
Request structure for the Task tool.
  • Constructor Details

    • Request

      public Request(@JsonPropertyDescription("Short (3-5 word) description of what the agent will do") String description, @JsonPropertyDescription("The detailed task for the sub-agent to perform") String prompt, @JsonPropertyDescription("The type of specialized agent to use") String subagentType, @JsonPropertyDescription("Set to true to run in background; use TaskOutput to retrieve results") Boolean runInBackground)
      Creates an instance of a Request record class.
      Parameters:
      description - the value for the description record component
      prompt - the value for the prompt record component
      subagentType - the value for the subagentType record component
      runInBackground - the value for the runInBackground record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • description

      @JsonPropertyDescription("Short (3-5 word) description of what the agent will do") public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • prompt

      @JsonPropertyDescription("The detailed task for the sub-agent to perform") public String prompt()
      Returns the value of the prompt record component.
      Returns:
      the value of the prompt record component
    • subagentType

      @JsonPropertyDescription("The type of specialized agent to use") public String subagentType()
      Returns the value of the subagentType record component.
      Returns:
      the value of the subagentType record component
    • runInBackground

      @JsonPropertyDescription("Set to true to run in background; use TaskOutput to retrieve results") public Boolean runInBackground()
      Returns the value of the runInBackground record component.
      Returns:
      the value of the runInBackground record component