Package io.agentscope.harness.agent.bus
Record Class AsyncToolRecord
java.lang.Object
java.lang.Record
io.agentscope.harness.agent.bus.AsyncToolRecord
- Record Components:
id- unique identifier for this async tool executionsessionId- the session that initiated the tool calltoolName- name of the tool being executedtoolCallId- the original tool_call id from the LLMstatus- current status: RUNNING, COMPLETED, FAILED, or TIMEOUTcreatedAt- when the async execution was registered
public record AsyncToolRecord(String id, String sessionId, String toolName, String toolCallId, String status, Instant createdAt)
extends Record
Tracks the lifecycle of an async tool execution that has been offloaded to the background.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thesessionIdrecord component.status()Returns the value of thestatusrecord component.Returns the value of thetoolCallIdrecord component.toolName()Returns the value of thetoolNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
RUNNING
- See Also:
-
COMPLETED
- See Also:
-
FAILED
- See Also:
-
TIMEOUT
- See Also:
-
-
Constructor Details
-
AsyncToolRecord
public AsyncToolRecord(String id, String sessionId, String toolName, String toolCallId, String status, Instant createdAt) Creates an instance of aAsyncToolRecordrecord class.- Parameters:
id- the value for theidrecord componentsessionId- the value for thesessionIdrecord componenttoolName- the value for thetoolNamerecord componenttoolCallId- the value for thetoolCallIdrecord componentstatus- the value for thestatusrecord componentcreatedAt- the value for thecreatedAtrecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
toolName
Returns the value of thetoolNamerecord component.- Returns:
- the value of the
toolNamerecord component
-
toolCallId
Returns the value of thetoolCallIdrecord component.- Returns:
- the value of the
toolCallIdrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-