Agent Chat

Get Active Session For Segment

Return the latest non-terminal session for segment_id, or null.

The frontend calls this on mount of the segment workspace so that refreshing the page reconnects to an in-flight agent session instead of showing the IDLE state. Ownership is verified via segment→project→org.

get/api/agent-chat/sessions/active

Query parameters

segment_idstring required

Cookies

ex_accessstring nullable
ex_orgstring nullable

Response

Successful Response

{"stackTrail":"paths:/api/agent-chat/sessions/active:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes