Optional
config: ClientConfigProtected
apiProtected
asyncProtected
defaultProtected
Optional
onProtected
timeoutID of the thread to be copied
Newly copied thread
Create a new thread.
Optional
payload: { Payload for creating a thread.
Optional
graphGraph ID to associate with the thread.
Optional
ifHow to handle duplicate creation.
"raise"
Optional
metadata?: MetadataMetadata for the thread.
Optional
supersteps?: { Apply a list of supersteps when creating a thread, each containing a sequence of updates.
Used for copying a thread between deployments.
Optional
threadID of the thread to create.
If not provided, a random UUID will be generated.
The created thread.
Protected
fetchOptional
options: RequestInit & { Get a thread by ID.
ID of the thread.
The thread.
Get all past states for a thread.
ID of the thread.
Optional
options: { Additional options.
Optional
before?: ConfigOptional
checkpoint?: Partial<Omit<Checkpoint, "thread_id">>Optional
limit?: numberOptional
metadata?: MetadataList of thread states.
Get state for a thread.
ID of the thread.
Optional
checkpoint: string | CheckpointOptional
options: { Optional
subgraphs?: booleanThread state.
Protected
prepareList threads
Optional
query: { Query options
Optional
limit?: numberMaximum number of threads to return. Defaults to 10
Optional
metadata?: MetadataMetadata to filter threads by.
Optional
offset?: numberOffset to start from.
Optional
sortSort by.
Optional
sortSort order. Must be one of 'asc' or 'desc'.
Optional
status?: ThreadStatusThread status to filter on.
List of threads
Update a thread.
The updated thread.
Add state to a thread.
The ID of the thread.
Optional
asOptional
checkpoint?: CheckpointOptional
checkpoint
Copy an existing thread