createCheckpoint
suspend fun createCheckpoint(agentContext: AIAgentContextBase, nodeId: String, lastInput: Any?, lastInputType: KType, checkpointId: String? = null): AgentCheckpointData?(source)
Creates a checkpoint of the agent's current state.
This method captures the agent's message history, current node, and input data and stores it as a checkpoint using the configured storage provider.
Return
The created checkpoint data
Parameters
agentContext
The context of the agent containing the state to checkpoint
nodeId
The ID of the node where the checkpoint is created
lastInput
The input data to include in the checkpoint
checkpointId
Optional ID for the checkpoint; a random UUID is generated if not provided