Skip to main content
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

string
required
Session identifier.

Request body

string
Optional. When set, the fragment is keyed long-term memory (readable via GET …/memory/{key}).
string
required
Text content to store.
string
long_term (default) | message | tool_result | note.

Response

string
Fragment id.
string
Key, if provided.
string
Fragment kind.
string
Stored text.
integer
Epoch milliseconds.

Search / List Memory

Endpoint

Query parameters

string
Semantic / keyword query. When omitted or empty, lists the session’s fragments.
integer
Max results (default 20, clamped to 1–100).

Response

OpenAI list of memory items (id, optional key, kind, content, created_at).