Skip to main content
POST
Create a session
Keep the response id and use the same application, user, and session identifiers for reads, updates, and execution. The server generates an ID when sessionId is omitted; creating an existing explicit ID returns 409 Use state for initial session state and events to import existing events. Omit events when no history needs to be imported. Creating a session does not call the model

Path Parameters

app_name
string
required

Application name

user_id
string
required

User ID

Body

application/json
sessionId
string | null

Session ID to create; generated automatically when omitted

state
State · object | null

Initial session state

events
Event · object[] | null

Events used to initialize the session

Response

Successful response

id
string
required

Identifier

appName
string
required

Application name

userId
string
required

User ID

state
State · object

Session state as key-value pairs

events
Event · object[]

Session events

lastUpdateTime
number
default:0

Last update time as a Unix timestamp in seconds

Last modified on September 19, 2026