Get Session
Get session metadata by ID.
Args: request: FastAPI request with tenant context session_id: Session identifier
Returns: GetSessionResponse with session metadata
Raises: NotFoundError: If session not found
Example:
curl -X GET http://localhost:8000/v1/agents/sessions/ses_abc123 \
-H "Authorization: Bearer {api_key}" \
-H "X-Namespace: {namespace_id}"
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Session ID
Response
Successful Response
Response for retrieving session metadata.
Attributes: session_id: Session identifier namespace_id: Namespace identifier internal_id: Organization internal ID user_id: Optional user identifier session_name: Auto-generated session name (null until first message) agent_config: Agent configuration user_memory: User memory/preferences status: Session status message_count: Total messages in session stats: Session statistics created_at: Creation timestamp updated_at: Last update timestamp last_activity_at: Last activity timestamp expires_at: Expiration timestamp
Example:
python response = GetSessionResponse( session_id="ses_abc123", namespace_id="ns_xyz789", internal_id="int_abc123", session_name="Video search for ML tutorials", agent_config=AgentConfig(...), status="active", message_count=10, stats=SessionStats(...) )
Session identifier
Namespace identifier
Organization internal ID
Agent configuration
Session status
active, idle, archived, terminated Total messages in session
Session statistics
Creation timestamp
Last update timestamp
Last activity timestamp
Expiration timestamp
User identifier
Auto-generated session name based on first conversation
User memory/preferences

