episode_write
Record session journal entries for transient run-state, blockers, and iteration takeaways that durable fact storage rejects, then surface them via handoff or search.
Instructions
Append a journal-shaped entry for the current session — for run-state, iteration takeaways, 'what we tried'. Episodes are NOT durable facts; the durability gate that rejects transient memory_write content (TRANSIENT_PHRASE_MARKERS) does not apply here. Stored at /episodes//.md with a default 30-day TTL.
Use this for content memory_write would reject as transient:
'iteration N tried X, fell over at step 3'
'currently blocked on Y; next step is Z'
'this branch's release plan' (state that changes weekly)
Episodes are invisible to memory_search / memory_health / memory_list — they are a sibling tier, not a memory category. Surface them via episode_handoff at iteration entry or episode_search for cross-session lookup. Promote a takeaway to durable memory via episode_promote (routes through memory_write, durability gate fires as normal).
Parameters:
body: free-form markdown. Required, non-empty. Capped bymax_content_bytes(default 1 MB).swarm_id(optional): cohort id for multi-agent fan-in — a sub-agent passes the coordinator's session id so the coordinator can gather every sub-agent's takeaways viaepisode_search(swarm_id=…). A cross-cutting label, not a move: the episode still lives under this writer's own session, and it is distinct fromepisode_handoff's predecessor link.takeaway(optional): one-sentence summary. Surfaced preferentially at episode_handoff; when None, handoff falls back to the first line of body. Capped bymax_takeaway_bytes(default 4 KB).scopes(optional): list of scope tags. Empty list is valid (handoff keys on session_id, not scope). Capped bymax_scopes_per_write(default 64).
Both caps guard one thing: takeaway and scopes serialise into the YAML frontmatter (64 KB ceiling), so an over-cap value corrupts the file and the episode vanishes from every read surface despite the write returning committed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| scopes | No | ||
| swarm_id | No | ||
| takeaway | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||