Four steps to get MemoryOS working with your AI:
- Install the SDK
- Store a memory
- Retrieve memories
- Use context in a model call
For the cross-agent Memory Passport flow, see Cross-agent memory sharing.
For domain-specific products, the same calls below still apply - enable your domain first, then use:
Step 1: Install
Use this path for MVPs, single-agent products, and small SaaS apps. It is the recommended first integration.
Step 2: Store a memory
Step 3: Retrieve memories
Step 4: Use context in an AI call
Retrieve before the model call. Prepend system_prompt_addition when available. Always call the LLM - even if memory is empty or in passthrough.
Use this only when multiple backend services write memory for the same user, such as Billing, Support, CRM, and Product. This enables provenance, deduplication, conflict handling, and source-of-truth routing.
For production multi-service traffic, register service writers in the Tenant Dashboard and bind dedicated API keys. You can still start by passing source.service with one tenant API key while testing.
What to expect
add() returns queued, passthrough, or a quality gate block - not an error
get() always returns a typed result, even with zero memories
is_passthrough / isPassthrough being true means skip memory context but still call the LLM
system_prompt_addition is safe to prepend as-is
- if your tenant has a domain schema enabled,
system_prompt_addition includes domain-aware context automatically
Next steps