Overview
Agent sessions are conversation threads backed by the Gizzi runtime. The Agent Sessions API translates the frontend session contract (/api/agent-sessions) into the Gizzi runtime contract (/v1/session/*), so the Rust API remains a thin gateway rather than a competing session database.
Sessions support messages, abort, revert/unrevert, compaction, ephemeral incognito chats, and real-time event synchronization via SSE.
Base URL
Authentication
All requests must include a valid bearer token in theAuthorization header. Gizzi-specific Basic auth is handled internally by the gateway when GIZZI_PASSWORD / GIZZI_SERVER_PASSWORD is configured.
Session object
Endpoints
List sessions
Query parameters
Example request
Example response
Create a session
Request body
Example request
Example response
The surface
design is normalized to chat for Gizzi compatibility; the original value is preserved in metadata.originSurface.Get a session
Example request
Example response
Same shape as the create response.Update a session
Request body
Example request
Example response
Same shape as the create response, withactive: false.
Delete a session
Example response
204 No Content
List messages
Example response
Send a message
role: "user" messages are forwarded to the runtime; other roles are accepted locally and echoed back immediately.
Request body
Example request
Example response
Same shape as a message fromlist messages.
Abort a session
Example response
Revert a session
Request body
Example response
Same shape asget session.
Unrevert a session
Example response
Same shape asget session.
Compact a session
Example response
Sync sessions (SSE)
Last-Event-ID reconnection.