Skip to main content

SessionObserverProtocol

Defined in the protocols module.
AI Agent Protocol for attaching multiple observers to one live session. Extends the single-owner :class:GatewaySessionProtocol model so that a session can fan its live turn stream (tokens, tool calls, results, final) out to more than one authorised client. Implementations live in the wrapper Gateway; the contract lives here so every client agrees on the attach/detach/enumerate surface. Default behaviour is unchanged: a PRIVATE session keeps a single OWNER observer (today’s 1:1 model).

Methods

attach()

Attach client_id to session_id with the given role.

detach()

Detach client_id from session_id (stop observing).

observers()

Return (client_id, role) pairs currently attached to the session.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 312

Session Management

Sessions Feature

Session Persistence