Skip to content

Get Checkpoint Tuple

checkpoints.get_tuple(CheckpointGetTupleParams**kwargs) -> CheckpointGetTupleResponse
POST/checkpoints/get-tuple

Get Checkpoint Tuple

ParametersExpand Collapse
thread_id: str
checkpoint_id: Optional[str]
checkpoint_ns: Optional[str]
ReturnsExpand Collapse
class CheckpointGetTupleResponse: …
checkpoint: Dict[str, object]
checkpoint_id: str
checkpoint_ns: str
metadata: Dict[str, object]
thread_id: str
blobs: Optional[List[Blob]]
channel: str
type: str
version: str
blob: Optional[str]
parent_checkpoint_id: Optional[str]
pending_writes: Optional[List[PendingWrite]]
channel: str
idx: int
task_id: str
blob: Optional[str]
type: Optional[str]

Get Checkpoint Tuple

import os
from agentex import Agentex

client = Agentex(
    api_key=os.environ.get("AGENTEX_SDK_API_KEY"),  # This is the default and can be omitted
)
response = client.checkpoints.get_tuple(
    thread_id="thread_id",
)
print(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"
    }
  ]
}