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
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspace_id | string | REQ | Target workspace. Must belong to your account. |
| text | string | REQ | The memory content. Plain text, max 4,000 chars. |
| importance | integer | Override importance score 1–10. If omitted, the engine scores it automatically. | |
| expires_at | string | ISO 8601 UTC. Memory decays to near-zero relevance after this date. | |
| tags | string[] | Optional string tags for filtering. Max 10 tags, 64 chars each. | |
| meta | object | Arbitrary 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.