rollbackToCheckpoint

suspend fun rollbackToCheckpoint(checkpointId: String, agentContext: AIAgentContextBase): AgentCheckpointData?(source)

Rolls back an agent's state to a specific checkpoint.

This method retrieves the checkpoint with the specified ID and, if found, sets the agent's context to the state captured in that checkpoint.

Return

The checkpoint data that was restored or null if the checkpoint was not found

Parameters

checkpointId

The ID of the checkpoint to roll back to

agentContext

The context of the agent to roll back