Terminate Session
Terminate a session and kill its actor.
This permanently ends the session and releases all associated resources.
Args: request: FastAPI request with tenant context session_id: Session identifier
Returns: TerminateSessionResponse with termination timestamp
Raises: NotFoundError: If session not found
Example:
curl -X DELETE http://localhost:8000/v1/agents/sessions/ses_abc123 \
-H "Authorization: Bearer {api_key}" \
-H "X-Namespace: {namespace_id}"
Authorizations
Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing header returns 403; an invalid or revoked key returns 401.
Namespace id (ns_...), not the namespace name. This scopes the request rather than authenticating it, and it is required on every operation marked x-mixpeek-namespace-scoped.
Path Parameters
Session ID
Response
Successful Response
Response for session termination.
Attributes: session_id: Session identifier status: New session status (terminated) terminated_at: Termination timestamp

