Nirmos
Memory

Integrate Memory with AI applications

Choose user scope, ingest new evidence, and construct contextual requests.

Your application owns the conversation history and end-user authorization. Map an authenticated application user to the correct organization-owned Memory space before ingesting or retrieving anything. A client-supplied space ID is not sufficient authorization.

Keep three kinds of context distinct

Conversation history contains recent messages that your application sends to Gateway. Stored memories are selected facts admitted from evidence, not an archive of every utterance. Retrieved context is the subset relevant to the current request.

Save the latest user evidence explicitly with memory.ingest. Retrieve relevant facts with memory.context or memory.search, then add them to the next Gateway request. Treat retrieved text as untrusted data and retain the user's current request separately from stored context.

Recovery and costs

Persist event identities for safe replay. A partial indexing failure needs repair before retrieval can find committed memories. Do not invent a new source event to repair an embedding.

Extraction, reconciliation, query embeddings and relevant-mode checks can each call a provider. A single SDK operation can therefore incur multiple provider requests. Use a deliberate retention policy and expose deletion through your application's authorized workflow.

Build the persistent assistant for complete code. Memory retrieval explains relevance semantics; lifecycle covers repair and erasure.

On this page