1. Tasks
  2. Snapshot Save

Tasks

Snapshot Save

The Snapshot Save task is used to create a snapshot of a stub or GPT chat task in its current state, allowing you to return to that state at some point in the future.

Use cases

  • Create a backup of a stub's state for faster development iterations
  • Preserve the state of GPT chat tasks associated with a stub
  • Track changes in a stub's lifecycle through multiple snapshots
  • Save only specific GPT chat task states

Basic usage

loading...

Parameters

snapshot_type
required
string

The type of snapshot to create. Valid values are:

  • "stub": Creates a snapshot of the current stub
  • "gpt_chat_task": Creates a snapshot of a specific GPT chat task

snapshot_name
optional
string

A name to identify this snapshot. If not provided, a default name will be used. Snapshots with the same type and name will overwrite previous snapshots.

Default: "_default"


snapshot_gpt_chat_tasks
optional
boolean

When snapshot_type is "stub", setting this to true will automatically create snapshots of all GPT chat tasks associated with the stub.

Default: false


child_snapshots
optional
object

Allows you to specify specific GPT chat tasks to snapshot when snapshot_type is "stub". Each key in the object represents a chat name, and the value contains the snapshot configuration for that chat.

Example:

editor
        {
  "child_snapshots": {
    "customer_chat": {
        "snapshot_type": "gpt_chat_task",
        "chat_name": "customer_support"
    }
    "advanced_support": {
        "snapshot_type": "gpt_chat_task",
        "chat_name": "advanced_support"
    }
  }
}

      

Result

loading...

Properties

snapshot.stubber_snapshot_uuid

string

The unique identifier for this snapshot.


snapshot.child_snapshot_references

array

Array of UUIDs referencing any child snapshots created (e.g., GPT chat task snapshots).


snapshot.createdAt

string

Timestamp when the snapshot was created.


snapshot.orguuid

string

The organization UUID associated with the snapshot.


snapshot.snapshot

object

Contains the actual snapshot data of the stub or GPT chat task.


snapshot.snapshot_name

string

The name given to this snapshot.


snapshot.snapshot_type

string

The type of snapshot ("stub" or "gpt_chat_task").


snapshot.stubref

string

The reference to the stub that was snapshotted.


snapshot.updatedAt

string

Timestamp when the snapshot was last updated.

Examples

Basic Stub Snapshot

Create a snapshot of the current stub state:

loading...

Stub Snapshot with GPT Chat Tasks

Create a snapshot of the stub and all its associated GPT chat tasks:

loading...

Named Snapshot with Specific Chat Tasks

Create a named snapshot of the stub and specific GPT chat tasks:

loading...