Write a memory
POST /api/v1/memories — persist content for later recall.
APIKeyHeaderX-API-Key<token>Idempotency-Key?string|nullapplication/json- body
tenant_id?Tenant IdTenant to operate on. Omit it and the tenant is resolved from the credential, which is what a tenant- or agent-scoped key already identifies — no prior /whoami call is needed. Supply it to act on a different tenant your credential may read (and for an admin key, which belongs to no single tenant, it is required).
""fleet_id?string|nullagent_id?|nullmemory_type?|Memory type. Auto-classified by LLM if omitted. Valid values: fact, episode, decision, preference, task, plan, action.
content*Content1 <= length <= 10000weight?|nullsource_uri?|nullrun_id?|nullmetadata?|Free-form metadata stored with the memory. Keys you send are yours: enrichment never overwrites a summary or tags you supply here, on this write or on any later one — the platform's own versions go to system_metadata instead. Platform-reserved keys (timings, governance verdicts, provenance) are stripped from this dict; send them and they are dropped, not stored.
origin?|Value metering: tokens and turns the session spent since its previous write, as a hook, plugin or SDK read them from the provider. Leave unset rather than estimate.
entity_links?array<>[]expires_at?|Optional retention hint. Once this time passes, the row moves to status outdated on the next lifecycle tick and drops out of default search results. Not a hard cutoff: the row remains readable until that tick runs. Distinct from ts_valid_end, which closes a temporal-validity interval rather than expressing retention.
subject_entity_id?|nullpredicate?|nullobject_value?|nullts_valid_start?|nullts_valid_end?|nullreference_datetime?|nullstatus?|nullvisibility?|nullpersist?Persisttruewrite_mode?|Write-mode dial. 'fast' = embed-only, LLM enrichment deferred to the background; 'strong' = full pipeline inline; 'auto' = the system picks. 'strong' also embeds inline regardless of the deployment's embedding mode, which makes it the supported opt-out when a caller must search for what it just wrote — see MemoryOut.metadata.embedding_pending. It costs the embedding provider call on the request path, which is exactly what fast mode's sub-2s p99 visibility SLA exists to avoid, so it is a per-write choice rather than a default to flip.
Successful Response
application/json- response
id*Iduuidtenant_id*Tenant Idfleet_id?string|nullagent_id*Agent Idagent_display_name?string|nullagent_trust_level?integer|nullmemory_type*Memory Typetitle?string|nullcontent*Contentweight*Weightsource_uri*string|nullrun_id*string|nullmetadata*|nullsystem_metadata?|nullcreated_at*Created Atdate-timeexpires_at*|nullentity_links?array<>[]similarity?number|nullscore?number|nullscore_parts?|nullinjected?Injectedfalsesubject_entity_id?|nullpredicate?string|nullobject_value?string|nullts_valid_start?|nullts_valid_end?|nullstatus?Status"active"visibility?Visibility"scope_team"recall_count?Recall Count0last_recalled_at?|nullsupersedes_id?|nullsuperseded_by?array<>|nullconfidence?number|nullis_inferred?Is Inferredfalsescope?|nullusage?|nullcurl -X POST 'https://example.com/api/v1/memories' \ -H 'Content-Type: application/json' \ -d '{ "content": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "tenant_id": "string", "fleet_id": "string", "agent_id": "string", "agent_display_name": "string", "agent_trust_level": 0, "memory_type": "string", "title": "string", "content": "string", "weight": 0, "source_uri": "string", "run_id": "string", "metadata": {}, "system_metadata": {}, "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "entity_links": [], "similarity": 0, "score": 0, "score_parts": { "vec_sim": 0, "fts_score": 0, "freshness": 0, "entity_boost": 0, "recall_boost": 0, "temporal_boost": 0, "status_penalty": 0, "rerank": 0 }, "injected": false, "subject_entity_id": "2f43e1a1-7cec-4ccf-9421-4ab19090ca45", "predicate": "string", "object_value": "string", "ts_valid_start": "2019-08-24T14:15:22Z", "ts_valid_end": "2019-08-24T14:15:22Z", "status": "active", "visibility": "scope_team", "recall_count": 0, "last_recalled_at": "2019-08-24T14:15:22Z", "supersedes_id": "8149cd94-4e90-4a99-91f5-a3e0f9b829dc", "superseded_by": [ { "old_memory_id": "07606bd2-b9bc-468a-8200-790e8b7345cf", "old_status": "string", "reason": "string", "old_content_preview": "string", "direction": "canonical" } ], "confidence": 0, "is_inferred": false, "scope": {}, "usage": { "memories_stored": 0, "memories_limit": 0, "writes_remaining": 0 }}