Session memory stores context fragments in Postgres + pgvector. Write with POST; search or list with GET. These REST routes always read and write the cloud. SDKs additionally expose memory.backend as cloud, local (aria memo CLI, SQLite) or both (dual write, merged and deduplicated reads), with per-call overrides.
Write Memory
Endpoint
Authentication
Authorization: Bearer <api_key> or Authorization: ApiKey <key>. Optional if AGENT_CLOUD_API_KEY is unset.
Path parameters
Request body
Optional. When set, the fragment is keyed long-term memory (readable via GET …/memory/{key}).
long_term (default) | message | tool_result | note.
Response
Search / List Memory
Endpoint
Query parameters
Semantic / keyword query. When omitted or empty, lists the session’s fragments.
Max results (default 20, clamped to 1–100).
Response
OpenAI list of memory items (id, optional key, kind, content, created_at).