Create a new session
Create (or resume) a session for a given agent and workspace.
At most one session exists per (user_id, agent_id, workspace_id)
triple — a second call with the same triple updates the existing session
rather than creating a duplicate.
Args:
body (CreateSessionRequest): Agent, workspace, and model config.
user_id (str): Injected authenticated user ID.
storage (StorageBase): Injected storage backend.
Returns:
CreateSessionResponse: The session identifier.
Raises:
HTTPException: 404 if the agent or credential does not exist or
does not belong to the authenticated user.
Documentation Index
Fetch the complete documentation index at: https://docs.agentscope.io/llms.txt
Use this file to discover all available pages before exploring further.
Headers
Caller's user ID. Temporary header-based identity; will be replaced by JWT auth.
Body
Request body for creating a new session.
Response
Successful Response
Response body after creating a session.
Server-assigned session identifier.