active-memory

Ingest a memory fragment into the active episodic store

Embed body.text and write the vector + text to the Cloudflare Active Memory Worker (KV for text, Durable Object for vector).

The fragment is keyed by fragment_id (idempotent upsert). If fragment_id is not provided, a deterministic UUID is generated from (org_id, episode_id, text) so duplicate POSTs with the same text are idempotent.

post/active-memory/ingest

Request

Request body

agent_idstring required

Agent identifier

user_hashstring nullable

Hashed user ID (never raw PII). If omitted, backend derives it from authenticated org_id + user_id.

episode_idstring required

Logical episode/conversation ID

fragment_idstring nullable

Idempotency key; auto-generated UUID if omitted

textstring required

Raw fragment text (1–4096 chars, not blank)

entitiesstring[] nullable

Extracted entity strings

skip_enrichmentboolean

Skip LLM enrichment (entities/inference) for benchmark throughput runs

timestamp_msinteger nullable

Fragment timestamp (ms since epoch); server time if omitted

metadataobject nullable

Opaque metadata forwarded to the vector store

scopestring nullable

Optional explicit write scope "<kind>:<value>" (kinds: user/team/org/project). Must be within the caller's visible scopes; defaults to user:<user_id>.

inactivity_timeout_secondsinteger nullable

Idle time in seconds after which this active-memory episode is closed and consolidated into long-term memory. Stored on the episode (later writes without it keep it). Omitted: the org default, else 1800 (30 min). Bounds: 300-86400.

Response

Successful Response

okboolean required
fragment_idstring required
episode_idstring required

Changes

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