Skip to main content
Install the TypeScript SDK:

Clients

  • Tenant-scoped client: MemoryOS
  • Universal cross-agent client: UniversalMemoryOS
Use MemoryOS for normal workspace memory inside your tenant. Use UniversalMemoryOS only after a user has granted your global agent access through Memory Passport.

Tenant-scoped memory

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 eventId, runId, 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.
Pass the optional fifth argument when multiple backend services can write memory for the same user. Use MemoryOS.source(...) so your app does not have to manually generate every ID while testing.
For testing, one tenant API key plus MemoryOS.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 TypeScript 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()

You can also use the object form:

Parameters

Return fields

Each MemoryItem also includes sourceEventId and provenance when available.

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 correctionJobId 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.

Other tenant methods

delete()

list()

export()

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

UniversalMemoryOS

The universal client is independent from MemoryOS. It uses agent credentials and a user UUI token:
  • Authorization: ApiKey agent_sk_...
  • X-MemoryOS-UUI: uui_...

UniversalMemoryOS.consentUrl()

Redirect users to this URL when they click a control such as “Connect shared memory”. If you pass null for the callback, MemoryOS shows a hosted completion page after approval. Users can add or remove categories before approving.

universal.add()

universal.get()

Universal retrieve responses include the normal retrieve fields plus: