v2

latestOpenAPI 3.1.02026-08-05267431678.1 KB
agent-chat-sessions

Update Session

Update a chat session's title or archive status.

Args: request: FastAPI request used by the rate-limiter. session_id: Chat session primary key. body: Partial update payload. auth: Authenticated caller. service: Chat-session service.

Returns: ChatSessionResponse after the update.

Raises: HTTPException: 404 when the session is missing or not owned.

patch/mle-agent/sessions/{session_id}

Path parameters

session_idstring required

Request body

titlestring nullable

New title for the session

is_archivedboolean nullable

Archive status of the session

images_retention_daysinteger nullable

Per-session image retention window in days. 0 means keep forever (the UI 'forever' option). Omit to leave unchanged; when never set, the session inherits the 30-day default. Note: once any value is persisted the session keeps that explicit value even if the system default later changes — this endpoint has no path back to the NULL/inherit state (send 30 to match today's default).

Response

Successful Response

idstring required
user_idstring required
titlestring required
created_atstring required
updated_atstring required
is_archivedboolean
project_idstring nullable
images_retention_daysinteger nullable

Per-session image retention window in days for this chat's image attachments. NULL inherits the 30-day default; 0 means keep forever. Drives image eviction by the nightly cleanup job.

modal_sandbox_idstring nullable

Modal sandbox id for the persistent MLE agent runtime, if a sandbox is associated with this session. Surfaced for nightly smoke tests and observability — never used for client routing.