ingest takes a conversation and extracts the facts from it. Use it when the agent has just finished talking to someone and you want whatever mattered to be kept, without deciding in advance what that was.
remember takes one sentence you have already distilled and stores it as written. Use it when your system already knows the fact — a CRM field, a preference the user set, something a human entered.
Both answer 202 Accepted with an operation_id, and the source_id the write is stored as — see Sources. Neither is readable until that operation completes.
Ingest a Session
The body is not a fixed shape.
session_id is a query parameter, so the whole body is stored exactly as it arrives — you can post the transcript your framework already produces, even a bare array or a plain string, rather than reshaping it to carry a key. The messages array above is the conventional form, not a requirement.
Re-sending the same session_id re-ingests that session in place rather than adding a second copy, so a retry after a timeout is safe.
session_id is a query parameter of at most 128 characters, validated on the way in — a longer value is rejected with a 422, the same bound the memories listing filters on.Remember a Fact
text is the whole request. Sending the same text again writes the same memory rather than a second copy, so retries are safe here too.
remember keeps your wording, but it does not freeze it. The service may later restate the same fact in its own prose, so a recall can answer about it in words you never wrote.ingest is not a tool for your agent to call. A tool is something the model invokes during a conversation; ingestion needs the finished transcript, and a model has no useful notion of “the conversation is over” while it is still in it. Call ingest from your application once the session ends. remember is the verb that fits mid-conversation: one distilled fact, stored as written, safe to retry.Track a Write
Both verbs return anoperation_id. Poll it to find out when the memory is recallable:
Related
- Recalling memories — asking questions, and reading a profile whole
- Agent Memory — namespaces, profiles, and how they are created