Session Observer Protocol • AI Agent SDK

SessionObserverProtocol: Protocol for attaching multiple observers to one live session.

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

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 315


Related Documentation