Package com.tnsai.agents.interrupt
Class AgentCheckpoint
java.lang.Object
com.tnsai.agents.interrupt.AgentCheckpoint
- All Implemented Interfaces:
Serializable
Represents a checkpoint of agent state for interrupt/resume functionality.
A checkpoint captures the complete state of an agent at a point in time, including BDI state, conversation history, and execution context.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for AgentCheckpoint. -
Method Summary
Modifier and TypeMethodDescriptionstatic AgentCheckpoint.Builderbuilder()Creates a new builder for AgentCheckpoint.static AgentCheckpointfromBytes(byte[] data) Deserializes a checkpoint from bytes.Gets the agent identifier.Gets the beliefs at checkpoint time.Gets the checkpoint identifier.Gets the conversation history.Gets the creation timestamp.Gets the current action being executed (if any).Gets the desires at checkpoint time.intGets the execution step number.Gets the intentions at checkpoint time.Gets the pending prompt (if execution was interrupted mid-prompt).Gets the trigger event that caused this checkpoint.<T> Optional<T> getVariable(String name, Class<T> type) Gets a specific variable.Gets custom variables.byte[]toBytes()Serializes this checkpoint to bytes.toString()
-
Method Details
-
getCheckpointId
Gets the checkpoint identifier. -
getAgentId
Gets the agent identifier. -
getCreatedAt
Gets the creation timestamp. -
getTrigger
Gets the trigger event that caused this checkpoint. -
getBeliefs
Gets the beliefs at checkpoint time. -
getDesires
Gets the desires at checkpoint time. -
getIntentions
Gets the intentions at checkpoint time. -
getConversationHistory
Gets the conversation history. -
getPendingPrompt
Gets the pending prompt (if execution was interrupted mid-prompt). -
getVariables
Gets custom variables. -
getVariable
Gets a specific variable. -
getExecutionStep
public int getExecutionStep()Gets the execution step number. -
getCurrentAction
Gets the current action being executed (if any). -
toBytes
Serializes this checkpoint to bytes.- Throws:
IOException
-
fromBytes
Deserializes a checkpoint from bytes.- Throws:
IOExceptionClassNotFoundException
-
builder
Creates a new builder for AgentCheckpoint. -
toString
-