Skip to main content
PATCH
Update a Session

Headers

kimi-api-version
enum<string>

API version for this request, in YYYY-MM-DD form. Send 2026-09-01-beta for the version documented here. Required outside /v1/files*: a missing header there is rejected with 400 invalid_request_error; on /v1/files* its absence selects the compatibility behavior. An unknown value is rejected with 400 invalid_request_error on every endpoint. API versions served by the platform. New dated versions are added as they ship; a version is removed after its announced Sunset date.

Available options:
2026-09-01-beta

Path Parameters

id
string
required

Session ID.

Body

application/json

Session title and any Agent override fields to update.

Fields to update on a Session. Only title and agent_overrides can be changed.

title
string

New human-readable title.

Maximum string length: 256
Example:

"Updated Session"

agent_overrides
object

Replacement session-local agent overrides: each present collection replaces that collection's override wholesale (an empty array clears it and falls back to the frozen agent value). Absent collections keep their current override. An effective toolset incompatible with a self-hosted Environment is rejected before any update with 400 invalid_parameter_error and param=agent_overrides.tools. This also applies when clearing overrides would restore an incompatible inherited toolset.

Example:

Response

The Session with the applied changes.

A Session running an immutable Agent version.

id
string
required

Session ID.

Example:

"sesn_01h455vb4pex5vsknk084sn02q"

agent_id
string
required

Agent this session is running.

Example:

"agent_01h455vb4pex5vsknk084sn02q"

environment_id
string
required

Environment hosting this session.

Example:

"env_01h455vb4pex5vsknk084sn02q"

status
enum<string>
required

Current lifecycle status.

Available options:
idle,
running,
stopping,
terminated
Example:

"idle"

created_at
string<date-time>
required

Creation timestamp.

Example:

"2026-01-01T00:00:00Z"

updated_at
string<date-time>
required

Last-update timestamp.

Example:

"2026-01-01T00:00:00Z"

interrupted
boolean

Whether a committed stop pauses execution. A new message or explicit continue can resume it.

Example:

false

control_epoch
string

Current Session control generation.

Maximum string length: 19
Pattern: ^(0|[1-9][0-9]{0,18})$
Example:

"1"

continue_pending
boolean

A continue was accepted but execution has not started yet.

Example:

false

title
string

Human-readable title.

Example:

"Example Session"

metadata
object

Caller-defined metadata with up to 16 entries.

Example:
agent_overrides
object

Session-local agent configuration overrides. Absent when none are stored.

Example:
archived_at
string<date-time>

Archive timestamp. Absent while active.

Example:

"2026-01-03T00:00:00Z"

resources
(File · object | Vault · object | Memory Store · object | GitHub repository · object)[]

Resources bound to this session. Omitted from GET /v1/sessions list items.

An uploaded file available to a Session.

Example:
agent
object

Agent version snapshot used by the coordinator thread.

Example:
resolved_skills
object[]

Effective Skills after applying Session overrides and merging roster and shared workspace Skills. Present only when Get Session explicitly uses include=resolved_skills. An explicitly requested empty set is []. Otherwise this field is omitted, including from Session list items. Entries are sorted by name.

Example:
usage
object

Cumulative token usage of this Session across all Threads. Grows in real time as model calls complete. Also returned in list items, filled with one batch aggregate query per page.

Example: