Memory

Ingest a session's messages into a profile

Store a session. Facts are extracted from whatever you send — the body is taken as any JSON value and stored whole, so a framework's own transcript shape works unchanged. messages of role/content is the conventional shape, not a requirement. An empty object or a null body is refused. Carry a session_id to name the session: re-ingesting the same one replaces what it held. Omit it and a session is opened and returned. Extraction runs asynchronously — poll the returned operation.

post/ai/memory/namespaces/{namespace}/profiles/{profile_id}/ingest

Path parameters

profile_idstring required
namespacestring required

Query parameters

session_idstring nullable

Names the session. Re-ingesting the same session replaces what it held and keeps its source_id. Omit it to have one derived from the content and returned. No whitespace, control characters, or any of / \ # ? %.

Names the session. Re-ingesting the same session replaces what it held and keeps its source_id. Omit it to have one derived from the content and returned. No whitespace, control characters, or any of / \ # ? %.

Request body

IngestPayload required

The session's messages, in whatever shape your framework produces. Any JSON value but null is accepted and stored whole, as long as it holds something to remember: a body with no content anywhere in it -- {}, [], "", {"messages": []} -- is a 422.

Response

Successful Response

Changes

Changed in 1 of the 99 revisions of this API.1

Of the 99 revisions, 1 has no diff computed.