1. Choose simulation or a real backend
No-key simulation
From a fresh clone of the repository:Real integration
Create a workspace and API key in the dashboard, then follow Integration setup. Usehttps://api.memoryo.dev for the hosted API or your own instance URL for self-hosting.
For self-hosted exploration, follow the repository’s local beta instructions. That profile uses isolated Docker resources and exposes its API at http://127.0.0.1:18000. Dependency/image downloads need internet. Ingestion and some retrieval paths can use paid extraction/embedding providers; a chat-model stub alone does not make the backend free.
Do not reuse another project’s database, queues or credentials. No agent registration, Memory Passport or Clerk account is required for the tenant API-key example below.
2. Install the SDK and configure your server
MEMORYOS_API_KEY, MEMORYOS_API_URL and MEMORYOS_TEST_OWNER in your server environment. Set MEMORYOS_API_URL=https://api.memoryo.dev for hosted use, or use your self-hosted API root without a trailing /v1; use the backend API address, not a dashboard or MCP gateway URL. Keep credentials out of browser code and source control.
3. Verify one save outside the chat loop
This section is a setup-verification script.
wait_for_job(timeout=120) can block this script for up to two minutes; it is not a recommended wait inside each live chat response. The timeout is a client-side bound, not a processing-time guarantee. For interactive use, follow the chat lifecycle.4. Retrieve before answering
Use the same client/owner variables as above, in the same process or after reopening with the same environment.5. Connect the read to your chatbot
This compact Python adapter accepts your existing reply function; it does not choose a model or create another agent framework.owner must come from your server-side authenticated user mapping. Reuse the client configured above.
generate_reply(question, context) is your application’s existing model call. It must treat context as data and apply your answer policy. This adapter conservatively stops a memory-dependent answer without context; unrelated questions can use your own no-memory path. Retrieval errors should become a clear unavailable response, not reuse of old context.
The OpenAI and Anthropic guides show provider calls. Chat lifecycle explains when to capture completed turns and how to handle an immediate follow-up while processing continues.