Skip to main content
Install the Python SDK:

Clients

  • Sync client: Memory
  • Async client: AsyncMemory
  • Universal cross-agent client: UniversalMemory
There is no separate SDK for domain schemas. If your tenant enables EdTech or Support, add() and get() remain the main integration path. Optional domain helper methods expose structured profile data for dashboards.

Tenant-scoped memory

Use Memory from your backend with a tenant API key.

For solo builders: simple mode

Start here if you are building an MVP, small SaaS app, single chatbot, or solo product. You do not need event_id, run_id, service writers, or authority rules. MemoryOS creates safe internal source metadata automatically.

add()

add() queues a conversation for extraction. It returns quickly; extraction runs in the background.

For multi-service companies: source-aware mode

Use this when Billing, Support, CRM, Product, or another backend service can write facts about the same user. Source metadata enables auditability, deduplication, conflict handling, and authority rules.
Use Memory.source(...) so your app does not have to manually generate every ID while testing.
For testing, one tenant API key plus Memory.source("billing-service") is enough. For production multi-service traffic, register billing-service once from the Tenant Dashboard and bind a dedicated API key/service writer.

Parameters

Return fields

Check extraction job status

The Python SDK does not yet wrap job polling. Use the REST endpoint with the same API key when you need exact extraction results.
pending_candidates_buffered > 0 means MemoryOS kept a weak signal for reinforcement instead of dropping it.

get()

Parameters

Return fields

feedback()

Use feedback after retrieval to tell MemoryOS whether the memory helped. This improves lifecycle scoring and can queue retrospective extraction after user corrections.
When a user corrects the answer, send the correction text:
If correction_job_id is present, MemoryOS queued an async retrospective extraction pass. Do not block your user flow while that job runs.

Domain schemas

Domain schemas are configured on the tenant, not in SDK code. Your code stays the same across domain modes. For Support, your own backend tools still provide live truth such as order status, invoice status, refunds, or ticket updates.

Domain profile helpers

For domain-aware tenants, normal get() already includes domain-aware context. Use profile helpers only when your product needs structured UI data.

AsyncMemory

AsyncMemory has the same method surface as Memory, but every method is async.

Other tenant methods

delete()

Archives by default. Set hard_delete=True to permanently delete.

list()

export()

export() maps to GET /v1/users/me/export and returns a MemoryExport bundle.

UniversalMemory

UniversalMemory is the cross-agent client for the Memory Passport flow. It uses:
  • an agent API key (agent_sk_...)
  • a user UUI token (uui_...) for the approved Memory Passport user
Generate the user consent URL from your tenant app. If you omit redirect_uri, MemoryOS shows a hosted completion page after approval.
Users can add or remove categories before approving.