Skip to content

Getting started

Launch the memory API, attach an embedding provider, and run the synthetic store-and-search walkthrough.

You need: an AWS account that can subscribe and launch EC2, Session Manager or SSH, and an OpenAI-compatible endpoint that supports /embeddings. Optional extraction also needs /chat/completions with JSON output. The provider must accept the embedding dimensions you configure. HTTPS is required for a remote provider. HTTP is accepted only for localhost. This image does not install a local model server.

1. Subscribe

Open the Mem0 Self-Hosted Memory API listing, choose View purchase options, review the terms, and subscribe.

2. Launch the instance

  1. Choose t3.large (8 GiB of memory). t3.medium (4 GiB) is the stated minimum.
  2. Use an encrypted gp3 root volume of at least 24 GiB.
  3. Use x86_64. Attach an instance profile that can use Session Manager if you connect that way.
  4. Leave inbound application ports closed.

3. Connect

A Session Manager session starts as ssm-user.

sudo -iu ubuntu
sushi-mem0-api GET /health
less /opt/sushi/docs/README.md

provider_configured: false means the server is up and waiting for a provider. Do not print the access file or the TLS key.

4. Configure a provider

The output file must not already exist. The key prompt is hidden.

python3 /opt/mem0/provider-setup.py --output "$HOME/.config/sushi/mem0/provider.json"
sudo systemctl stop sushi-mem0-api.service
sudo sushi-mem0-admin configure --file "$HOME/.config/sushi/mem0/provider.json"
sudo systemctl start sushi-mem0-api.service
sushi-mem0-api GET /health

The service copy is /etc/mem0/provider.json, readable by root and the service group. Your original file stays under your control. Remove or protect that copy after you apply it. Keep the same embedding URL, model, and dimensions after vectors exist. Rotating the API key or changing the chat model is supported. Changing the embedding model is not, and the adapter does not migrate existing vectors.

mkdir -p "$HOME/mem0-results"
umask 077
printf '%s\n' '{"text":"My synthetic order contains 3 boxes at 14 dollars, total 42 dollars.","infer":false}' \
  > "$HOME/mem0-results/add.json"
sushi-mem0-api POST /memories --input "$HOME/mem0-results/add.json"
sushi-mem0-api GET /memories
printf '%s\n' '{"query":"synthetic order","limit":5}' > "$HOME/mem0-results/search.json"
sushi-mem0-api POST /search --input "$HOME/mem0-results/search.json"

Use the id from the add response with GET /memories/<id> or DELETE /memories/<id>.

6. Run the walkthrough

sudo -iu ubuntu bash /opt/sushi/docs/demo.sh

The demo stores an exact fact, searches it, retrieves it, checks that another user cannot read it, saves request and response JSON and hashes under ~/mem0-results, and rereads those files. It prints SUSHI_CUSTOMER_DEMO_PASSED only after the checks pass. A configured embedding provider is required.

Last updated November 11, 2026 · Suggest an improvement