Introduction
Manage user sessions used to group related tasks and context. Notes:- Soft delete only.
DELETEmarks a session as deleted (keeps data) and returns 204. - Deleted sessions are excluded from reads and cannot be fetched (404).
List Sessions
limit(1–100, default 20)offset(>= 0, default 0)
Get Session
sessionId(UUID or external_id string)
Session ID Format
Shannon supports dual-ID pattern for sessions:- UUID Format (internal):
a0c2b1e2-fd3e-4567-890a-bcdef1234567 - External ID Format (custom strings):
"user-123-chat","analytics-session-456"
session_id, Shannon:
- Creates an internal UUID for database storage
- Stores your custom ID in
context.external_id - Accepts either format in all session API calls
Get Session History
sessionId(UUID or external_id string)
Get Session Events (Grouped by Turn)
sessionId(UUID or external_id string)
LLM_PARTIAL).
Query params:
limit(1–100, default 10) — number of turns to returnoffset(>= 0, default 0) — number of turns to skip
final_outputfalls back to the firstLLM_OUTPUTevent if the task result is empty.turnnumbers are global (offset+index).- Returns 404 if the session is deleted or not owned by the requester.
Update Session Title
sessionId(UUID or external_id)
- Title is trimmed; control characters removed.
- Max 60 characters (UTF-8 safe). Longer titles are rejected.
- 200 OK with updated title
- 400 Invalid request (empty or too long title)
- 401 Unauthorized
- 403 Forbidden (not the owner)
- 404 Not Found
Delete Session (Soft Delete)
sessionId(UUID or external_id string)
- Marks the session as deleted (
deleted_at,deleted_by), does not remove data. - Idempotent: always returns 204 for the owner.
- Clears session cache to prevent stale reads.
- 204 No Content
- 401 Unauthorized
- 403 Forbidden (not the owner)
- 404 Not Found