Sessions
Sessions group related queries into conversations, maintaining context across multiple questions.
Creating a session
Sessions are created automatically when you make a query without a session_id. The response includes the new session ID.
Listing sessions
GET /api/v1/sessions/
Authorization: Api-Key ek_live_...
Session detail
GET /api/v1/sessions/{session_id}/
Authorization: Api-Key ek_live_...
Returns the session metadata and all queries within the session.
Deleting a session
DELETE /api/v1/sessions/{session_id}/
Authorization: Api-Key ek_live_...
Session context
When you continue a session, Egret includes previous query/answer pairs as context for the LLM. This enables follow-up questions like "What about the penalties for non-compliance?" without restating the full regulatory context.