Package com.tnsai.agents.execution
Record Class MemoryManager.AgentCheckpoint
java.lang.Object
java.lang.Record
com.tnsai.agents.execution.MemoryManager.AgentCheckpoint
- Record Components:
agentId- the agent that created this checkpointlabel- descriptive labeltimestamp- when the checkpoint was createdconversationHistory- snapshot of conversation history
- Enclosing class:
MemoryManager
public static record MemoryManager.AgentCheckpoint(String agentId, String label, Instant timestamp, List<Map<String,Object>> conversationHistory)
extends Record
Represents a captured checkpoint of agent state.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.Returns the value of theconversationHistoryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the size of the conversation history at this checkpoint.label()Returns the value of thelabelrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
historySize
public int historySize()Returns the size of the conversation history at this checkpoint.- Returns:
- number of messages
-
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). -
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
conversationHistory
Returns the value of theconversationHistoryrecord component.- Returns:
- the value of the
conversationHistoryrecord component
-