Retrieve a session
Updated
Retrieves the status of a session.
Preview documentation
https://preview.ai.agora.io/conversational-ai/v1/projects/{appid}/sessions/{agent_session_id}Starting and stopping a session happen asynchronously. Retrieve the session to follow its status. After the session ends, the response includes stop_ts.
appidstringThe App ID of your project.
agent_session_idstringThe ID of the session, returned in agent_session_id when you start the session.
Response Body
The request was successful. The response body contains the session.
Response Headers
agent_session_idstringThe ID of the session.
agent_namestringThe name of the agent that the session runs.
statusstringThe status of the session:
IDLE: The session is idle.STARTING: The session is starting.RUNNING: The session is running.STOPPING: The session is stopping.STOPPED: The session has ended.FAILED: The session failed.
start_tsintegerThe time the session was created, as a Unix timestamp in seconds.
stop_tsinteger | nullThe time the session ended, as a Unix timestamp in seconds. null while the session is active.
messagestring | nullAdditional details about the status, such as a failure diagnosis. null when there are none.
Request examples
curl -X GET 'https://preview.ai.agora.io/conversational-ai/v1/projects/string/sessions/string'Response example
{ "agent_session_id": "a42ac95tp25py49fc37hp94vm67ht52h", "agent_name": "Customer Support Agent", "status": "RUNNING", "start_ts": 1735035893, "stop_ts": null, "message": null}