Skip to content

Put Checkpoint

client.checkpoints.put(CheckpointPutParams { checkpoint, checkpoint_id, thread_id, 4 more } body, RequestOptionsoptions?): CheckpointPutResponse { checkpoint_id, checkpoint_ns, thread_id }
POST/checkpoints/put

Put Checkpoint

ParametersExpand Collapse
body: CheckpointPutParams { checkpoint, checkpoint_id, thread_id, 4 more }
checkpoint: Record<string, unknown>
checkpoint_id: string
thread_id: string
blobs?: Array<Blob>
channel: string
type: string
version: string
blob?: string | null
checkpoint_ns?: string
metadata?: Record<string, unknown>
parent_checkpoint_id?: string | null
ReturnsExpand Collapse
CheckpointPutResponse { checkpoint_id, checkpoint_ns, thread_id }
checkpoint_id: string
checkpoint_ns: string
thread_id: string

Put Checkpoint

import Agentex from 'agentex';

const client = new Agentex({
  apiKey: process.env['AGENTEX_SDK_API_KEY'], // This is the default and can be omitted
});

const response = await client.checkpoints.put({
  checkpoint: { foo: 'bar' },
  checkpoint_id: 'checkpoint_id',
  thread_id: 'thread_id',
});

console.log(response.checkpoint_id);
{
  "checkpoint_id": "checkpoint_id",
  "checkpoint_ns": "checkpoint_ns",
  "thread_id": "thread_id"
}
Returns Examples
{
  "checkpoint_id": "checkpoint_id",
  "checkpoint_ns": "checkpoint_ns",
  "thread_id": "thread_id"
}