Skip to main content
Get your first stored and retrieved memory working from a backend in about ten minutes.
This is the normal tenant-memory path. You do not need Memory Passport, a consent screen, a connector, or a global agent to complete it. Memory Passport is frozen in private beta and should be considered only through an approved design-partner engagement.

1. Create an API key

Sign in to the MemoryOS dashboard, open Get started, then choose Open API Keys to create and copy a key once. Keep it on your server—never expose it in browser code or commit it to Git. Set it in the terminal where your backend runs:

2. Install the SDK

Both SDKs use https://api.memoryo.dev by default. The Python package is named memoryo-sdk, while its import remains memoryos.

3. Verify one complete write

Use the same stable user ID your application already uses. Do not use an email address if your internal customer ID is available. Memory extraction runs asynchronously. The verification example waits for the write job to finish before retrieval, avoiding a race on the first run.
If the printed context reflects the saved preference, your API key, user mapping, worker, persistence, and retrieval path are connected.

4. Put it around your model call

In normal application traffic, retrieve context before the model call and queue the completed conversation afterward. You normally do not block the user response while extraction finishes.
Python
Submitting the completed turn gives extraction useful conversational context, but the assistant does not become an authority about the user. In normal mode, durable memory must be grounded in a user statement or explicit user confirmation. Use source-aware ingestion only for registered backend services with real provenance—not for ordinary model responses. Always call your model even when MemoryOS returns no context or reports passthrough mode. If retrieval returns clarification, ask clarification.question in this same chat. After the user chooses A, B, both, or neither, call answer_clarification() in Python or answerClarification() in TypeScript. MemoryOS verifies the tenant, user, expiry, and conflict transition on the backend; your model only presents the question and passes back the user’s selection.

Common first-run problems

  • Unauthorized: create a new key in the dashboard and confirm the environment variable is available to the backend process.
  • Empty result immediately after add: wait for the job when verifying; production writes are asynchronous.
  • Different users share context: pass your authenticated application’s stable user ID on every add and get call.
  • Browser exposes the key: move MemoryOS calls into a backend route or server process.

Next steps