attach • AI Agent SDK

attach: Attach “client_id“ to “session_id“ with the given role.

attach

Method

</div>

This is a method of the SessionObserverProtocol class in the protocols module.

Attach `client_id to session_id` with the given role.

Adds an observer rather than re-pointing ownership, so a second client can watch a session without hijacking it.

Signature

python
def attach(session_id: str, client_id: str, role: SessionSharingRole) -> None

Parameters

ParamField str

No description available.

ParamField str

No description available.

ParamField SessionSharingRole

No description available.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 328