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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.prompt()Returns the value of thepromptrecord component.Returns the value of therunInBackgroundrecord component.Returns the value of thesubagentTyperecord component.final StringtoString()Returns a string representation of this record class.
-
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 aRequestrecord class.- Parameters:
description- the value for thedescriptionrecord componentprompt- the value for thepromptrecord componentsubagentType- the value for thesubagentTyperecord componentrunInBackground- the value for therunInBackgroundrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
description
@JsonPropertyDescription("Short (3-5 word) description of what the agent will do") public String description()Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
prompt
Returns the value of thepromptrecord component.- Returns:
- the value of the
promptrecord component
-
subagentType
Returns the value of thesubagentTyperecord component.- Returns:
- the value of the
subagentTyperecord component
-
runInBackground
@JsonPropertyDescription("Set to true to run in background; use TaskOutput to retrieve results") public Boolean runInBackground()Returns the value of therunInBackgroundrecord component.- Returns:
- the value of the
runInBackgroundrecord component
-