Sessions are core to every AI Interaction.
open
event is triggered. This is when the AI is ready to start interacting with the user.
context
field when creating your session. Your request payload should look something like this
context
field can be as long as 2500 words.disconnect
SDK function or terminate the session via the Terminate API.
Disconnecting will stop the AI from responding to the user. Successful disconnection leaves the session ACTIVE
but in a PAUSED
state. This means that you can reconnect to the session using the same Session ID and continue the interaction. This is useful if you want to pause the interaction and resume it later.
Terminating a session will end the interaction and the session will be marked as TERMINATED
. This means that you can no longer reconnect to the interaction.