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}"
REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.
"Bearer YOUR_API_KEY"
"Bearer YOUR_STRIPE_API_KEY"
REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'
"ns_abc123def456"
"production"
"my-namespace"
Session ID
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
{
"available_tools": [
"list_retrievers",
"get_retriever",
"execute_retriever",
"list_collections",
"get_collection"
],
"max_tokens": 4096,
"model": "claude-3-5-sonnet-20241022",
"system_prompt": "You are a video analysis assistant that helps users find and analyze video content.",
"temperature": 0.7
}{
"available_tools": ["list_retrievers", "execute_retriever"],
"max_tokens": 2048,
"model": "claude-3-haiku-20240307",
"system_prompt": "You are a quick search assistant. Be concise.",
"temperature": 0.3
}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