active-memory

Explicitly close an active episode (triggers consolidation)

Mark the episode as closed in the Durable Object.

The Worker's DO alarm handler will pick up the closed episode on the next decay check and enqueue it for consolidation. Alternatively, the caller can pass reason="explicit" to signal an intentional close vs. timeout.

post/active-memory/close-episode

Request

Request body

agent_idstring required
user_hashstring nullable

Hashed user ID. If omitted, backend derives it from authenticated org_id + effective user scope.

scope_user_idstring nullable

Optional effective user_id for agent/service tokens. If provided, user_hash must match server-derived hash for this user.

episode_idstring required
reasonstring nullable

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.