🤖 ChatKit Official Documentation

â‹™ Create ChatKit Session

Create a ChatKit session for a deployed Agent Builder workflow.

The session payload must include a stable user identifier and a workflow.id for the published workflow you want to expose.

msg.payload Properties

user string
User identifier that scopes the session and related ChatKit history.
workflow object
Workflow reference and runtime overrides.
workflow.id string
The published workflow id.
workflow.version string
Optional workflow version. Defaults to the latest deployed version.
workflow.state_variables object
Primitive state variables forwarded into the workflow.
workflow.tracing object
Optional tracing overrides, for example { "enabled": true }.
chatkit_configuration object
Optional ChatKit feature overrides for automatic thread titling, uploads, and history.
expires_after object
Optional session expiration config, for example { "anchor": "created_at", "seconds": 600 }.
rate_limits object
Optional request-rate overrides, such as { "max_requests_per_1_minute": 10 }.

Successful responses are returned in msg.payload and include a ChatKit client_secret plus resolved workflow/session metadata.

Hand the returned client_secret to your ChatKit frontend/client library immediately; it is the credential used to open or refresh the chat session.

â‹™ Cancel ChatKit Session

Cancel an active ChatKit session so the issued client secret can no longer be used.

msg.payload Properties

session_id string
The ChatKit session id.

â‹™ Retrieve ChatKit Thread

Retrieve a ChatKit thread by id.

msg.payload Properties

thread_id string
The ChatKit thread id.

â‹™ List ChatKit Threads

List ChatKit threads, optionally scoped to one user.

msg.payload Properties

after string
Pagination cursor to return items after this thread id.
before string
Pagination cursor to return items before this thread id.
limit integer
Maximum number of threads to return.
order string
Sort order by creation time. Default is desc.
user string
Filter threads to one user identifier.

The node returns the current page's thread objects as an array in msg.payload.

â‹™ Delete ChatKit Thread

Delete a ChatKit thread, including its items and stored attachments.

msg.payload Properties

thread_id string
The ChatKit thread id.

â‹™ List ChatKit Thread Items

List the items that belong to a ChatKit thread.

msg.payload Properties

thread_id string
The ChatKit thread id.
after string
Pagination cursor to return items after this thread item id.
before string
Pagination cursor to return items before this thread item id.
limit integer
Maximum number of thread items to return.
order string
Sort order by creation time. Default is desc.

The node returns the current page's thread item objects as an array in msg.payload.