Update session metadata.
Only user_memory can be updated. To change agent configuration, create a new session.
Args: request: FastAPI request with tenant context session_id: Session identifier payload: Update request
Returns: PatchSessionResponse with update timestamp
Raises: NotFoundError: If session not found
Example:
curl -X PATCH http://localhost:8000/v1/agents/sessions/ses_abc123 \
-H "Authorization: Bearer {api_key}" \
-H "X-Namespace: {namespace_id}" \
-H "Content-Type: application/json" \
-d '{
"user_memory": {
"preferences": {"language": "en", "domain": "tech"}
}
}'
REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.
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'
Session ID
Request payload for updating session metadata.
Only user_memory can be updated after session creation. To change agent_config or quotas, create a new session.
Attributes: user_memory: Updated user memory/preferences
Example:
python request = PatchSessionRequest( user_memory={ "preferences": {"language": "es", "domain": "science"}, "learned_context": {"favorite_topics": ["AI", "robotics"]} } )
Updated user memory (REQUIRED)