Skip to main content
PATCH
Update Dreams policy

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

memory_store_id
string
required

Memory Store ID.

Body

application/json

The full Dreams policy, including its activity and schedule conditions.

Request body that replaces both Dreams conditions for one Memory Store. The policy is inactive when both conditions are disabled.

activity
object
required

Activity condition. The object is required even when disabled.

Example:
schedule
object
required

Schedule condition. The object is required even when disabled.

Example:
agent_id
string

Agent used by Dreams. If empty, the platform's default Dreams Agent is used.

Maximum string length: 128
Example:

"agent_01h455vb4pex5vsknk084sn02q"

environment_id
string

Environment that hosts Dreams Sessions. Required whenever either condition is enabled.

Maximum string length: 128
Example:

"env_01h455vb4pex5vsknk084sn02q"

Response

The replaced policy, with the resolved agent_id, trigger_id, and updated_at.

Dreams settings for one Memory Store.

Activity and schedule are independent conditions joined with OR. Each fire creates a fresh Session with the store mounted read-write, recorded as a TriggerRun under the policy's Trigger.

memory_store_id
string
required

Memory Store controlled by this policy.

Example:

"mstr_01h455vb4pex5vsknk084sn02q"

activity
object
required

Activity condition. Always present, including when disabled.

Example:
schedule
object
required

Schedule condition. Always present, including when disabled.

Example:
agent_id
string

Agent that runs the Dreams Sessions. Absent means the platform's default Dreams Agent.

Example:

"agent_01h455vb4pex5vsknk084sn02q"

trigger_id
string

Trigger owned by this policy. Absent when no policy is configured.

Example:

"trig_01h455vb4pex5vsknk084sn02q"

environment_id
string

Environment hosting the Dreams Sessions. Absent when no policy is configured.

Example:

"env_01h455vb4pex5vsknk084sn02q"

updated_at
string<date-time>

Time when this policy was last updated. Absent when no policy is configured.

Example:

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