Gateway Session Protocol • AI Agent SDK
GatewaySessionProtocol: Protocol for gateway session management.
GatewaySessionProtocol
Defined in the protocols module.
AI Agent
Protocol for gateway session management.
Sessions track conversations between clients and agents, maintaining state and message history.
Methods
session_id()
Unique session identifier.
agent_id()ID of the agent handling this session.
client_id()ID of the client in this session.
is_active()Whether the session is currently active.
created_at()Session creation timestamp.
last_activity()Last activity timestamp.
get_state()Get session state.
set_state()Set a session state value.
add_message()Add a message to the session history.
get_messages()Get session message history.
close()Close the session.
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 1243