Package com.tnsai.events
Record Class RunStartEvent
java.lang.Object
java.lang.Record
com.tnsai.events.RunStartEvent
- Record Components:
eventId- unique identifier for this eventtimestamp- when the event occurredrunId- unique identifier for this runthreadId- optional thread/conversation identifieragentId- identifier of the agent handling the runagentName- name of the agentinput- the user input that triggered the run
- All Implemented Interfaces:
TnsAIEvent
public record RunStartEvent(String eventId, Instant timestamp, String runId, String threadId, String agentId, String agentName, String input)
extends Record
implements TnsAIEvent
Event indicating that an agent run has started.
RunStartEvent is emitted at the beginning of a chat/run execution and contains the run identifier used to track the entire execution.
This event is paired with RunEndEvent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.Returns the value of theagentNamerecord component.final booleanIndicates whether some other object is "equal to" this one.eventId()Returns the value of theeventIdrecord component.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.static RunStartEventCreates a run start event with auto-generated run ID.static RunStartEventCreates a run start event.runId()Returns the value of therunIdrecord component.threadId()Returns the value of thethreadIdrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface com.tnsai.events.TnsAIEvent
eventType
-
Constructor Details
-
RunStartEvent
public RunStartEvent(String eventId, Instant timestamp, String runId, String threadId, String agentId, String agentName, String input) Creates an instance of aRunStartEventrecord class.- Parameters:
eventId- the value for theeventIdrecord componenttimestamp- the value for thetimestamprecord componentrunId- the value for therunIdrecord componentthreadId- the value for thethreadIdrecord componentagentId- the value for theagentIdrecord componentagentName- the value for theagentNamerecord componentinput- the value for theinputrecord component
-
-
Method Details
-
of
public static RunStartEvent of(String runId, String threadId, String agentId, String agentName, String input) Creates a run start event.- Parameters:
runId- the run identifierthreadId- optional thread identifieragentId- the agent identifieragentName- the agent nameinput- the user input- Returns:
- new RunStartEvent
-
of
Creates a run start event with auto-generated run ID.- Parameters:
agentId- the agent identifieragentName- the agent nameinput- the user input- Returns:
- new RunStartEvent
-
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). -
eventId
Returns the value of theeventIdrecord component.- Specified by:
eventIdin interfaceTnsAIEvent- Returns:
- the value of the
eventIdrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceTnsAIEvent- Returns:
- the value of the
timestamprecord component
-
runId
Returns the value of therunIdrecord component.- Returns:
- the value of the
runIdrecord component
-
threadId
Returns the value of thethreadIdrecord component.- Returns:
- the value of the
threadIdrecord component
-
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
agentName
Returns the value of theagentNamerecord component.- Returns:
- the value of the
agentNamerecord component
-
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-