statewave_ingest_episode
Write a single episode to Statewave's raw memory log for a subject. Captures durable facts or decisions, stored immediately; compile afterward to make retrievable.
Instructions
Write a single normalized event ('episode') into Statewave's raw memory log for a subject. This is a write: the episode is stored immediately but is NOT yet retrievable as durable memory — call statewave_compile_subject afterward to distil episodes into the compiled memories that statewave_get_context and statewave_search_memories read. Idempotent: re-ingesting an idempotency_key already seen for the subject does not create a duplicate. Returns the stored episode id, its idempotency_key, and a duplicate boolean indicating whether an existing episode was matched. Use it to capture a durable fact, decision, message, or system event you want remembered.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Event type in dotted lowercase namespace form, used to group and filter episodes. Examples: `github.issue.opened`, `chat.note`, `deploy.succeeded`. | |
| text | Yes | Human-readable content of the event — the fact, note, or message to remember. This is the primary text distilled into compiled memory. | |
| source | Yes | Provenance of the episode — where it originated. | |
| subject | Yes | Memory subject the episode belongs to, as `scope:identifier` using only letters, digits, and the characters . _ - : (no slashes). Examples: `repo:owner.name`, `customer:acme`, `workspace:team`. | |
| metadata | No | Optional free-form key/value object for structured attributes (labels, ids, scores) carried alongside the episode. | |
| occurred_at | Yes | When the event actually occurred, as an ISO 8601 / RFC 3339 timestamp, e.g. `2026-06-30T15:00:00Z`. | |
| idempotency_key | Yes | Caller-supplied unique key for this episode. Re-ingesting the same key for the same subject is a no-op (deduplicated), so retries are safe. |