Skip to content

Get Checkpoint Tuple

client.checkpoints.getTuple(CheckpointGetTupleParams { thread_id, checkpoint_id, checkpoint_ns } body, RequestOptionsoptions?): CheckpointGetTupleResponse { checkpoint, checkpoint_id, checkpoint_ns, 5 more } | null
POST/checkpoints/get-tuple

Get Checkpoint Tuple

ParametersExpand Collapse
body: CheckpointGetTupleParams { thread_id, checkpoint_id, checkpoint_ns }
thread_id: string
checkpoint_id?: string | null
checkpoint_ns?: string
ReturnsExpand Collapse
CheckpointGetTupleResponse { checkpoint, checkpoint_id, checkpoint_ns, 5 more }
checkpoint: Record<string, unknown>
checkpoint_id: string
checkpoint_ns: string
metadata: Record<string, unknown>
thread_id: string
blobs?: Array<Blob>
channel: string
type: string
version: string
blob?: string | null
parent_checkpoint_id?: string | null
pending_writes?: Array<PendingWrite>
channel: string
idx: number
task_id: string
blob?: string | null
type?: string | null

Get Checkpoint Tuple

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.getTuple({ thread_id: 'thread_id' });

console.log(response.checkpoint_id);
{
  "checkpoint": {
    "foo": "bar"
  },
  "checkpoint_id": "checkpoint_id",
  "checkpoint_ns": "checkpoint_ns",
  "metadata": {
    "foo": "bar"
  },
  "thread_id": "thread_id",
  "blobs": [
    {
      "channel": "channel",
      "type": "type",
      "version": "version",
      "blob": "blob"
    }
  ],
  "parent_checkpoint_id": "parent_checkpoint_id",
  "pending_writes": [
    {
      "channel": "channel",
      "idx": 0,
      "task_id": "task_id",
      "blob": "blob",
      "type": "type"
    }
  ]
}
Returns Examples
{
  "checkpoint": {
    "foo": "bar"
  },
  "checkpoint_id": "checkpoint_id",
  "checkpoint_ns": "checkpoint_ns",
  "metadata": {
    "foo": "bar"
  },
  "thread_id": "thread_id",
  "blobs": [
    {
      "channel": "channel",
      "type": "type",
      "version": "version",
      "blob": "blob"
    }
  ],
  "parent_checkpoint_id": "parent_checkpoint_id",
  "pending_writes": [
    {
      "channel": "channel",
      "idx": 0,
      "task_id": "task_id",
      "blob": "blob",
      "type": "type"
    }
  ]
}