Create Session • AI Agent SDK

create_session: Create a new session.

create_session

Method

</div>

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

Create a new session.

Signature

python
def create_session(agent_id: str, client_id: Optional[str], session_id: Optional[str]) -> GatewaySessionProtocol

Parameters

ParamField str

The agent to handle this session

ParamField Optional[str]

Optional client ID

ParamField Optional[str]

Optional custom session ID

Returns

ResponseField GatewaySessionProtocol

The created session

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 1409


Related Documentation