memory.write

Store a new memory entry in a workspace. The engine automatically embeds the text, assigns importance, and classifies temporal context.

POST /v1/memory/write

Request parameters

ParameterTypeRequiredDescription
workspace_idstringREQTarget workspace. Must belong to your account.
textstringREQThe memory content. Plain text, max 4,000 chars.
importanceintegerOverride importance score 1–10. If omitted, the engine scores it automatically.
expires_atstringISO 8601 UTC. Memory decays to near-zero relevance after this date.
tagsstring[]Optional string tags for filtering. Max 10 tags, 64 chars each.
metaobjectArbitrary JSON metadata attached to the memory. Max 2KB.

Response

{
  "id": "mem_7xKzP3qR",
  "workspace_id": "ws_abc123",
  "text": "Client XYZ prefers async comms and morning meetings",
  "importance": 8,
  "tags": [],
  "temporal_type": "persistent",
  "created_at": "2025-03-14T09:41:00Z",
  "request_id": "req_Kx8mN7..."
}

Deduplication

Before storing, the engine checks for semantic duplicates. If a memory with cosine similarity ≥ 0.97 already exists, the existing record is returned with status: "duplicate" and a duplicate_of field pointing to the original ID.