createCheckpoint

suspend fun createCheckpoint(agentContext: AIAgentContext, nodePath: String, lastInput: Any?, lastInputType: TypeToken, version: Long, checkpointId: String? = null): AgentCheckpointData?(source)

Deprecated

Use `createCheckpointAfterNode` instead

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

nodePath

The path to the node where the checkpoint is created

lastInput

The latest node input data to include in the checkpoint

checkpointId

Optional ID for the checkpoint; a random UUID is generated if not provided