supermemory/apps/docs/self-hosting/quickstart.mdx
Dhravya Shah 55e96f1db8 docs: correct SDK usage against published packages (TS 4.24.12, Python 3.50.0)
The monorepo's installed supermemory@3.10.0 lags npm. In the published SDKs
client.memories.add does not exist — adding is client.add() (top-level) or
client.documents.add(); client.memories has only forget/updateMemory. Swept
all 21 affected pages. Also: searchMode ('memories'|'hybrid'|'documents')
IS in the published typings and is now taught on hybrid-search as the mode
selector, with include.chunks marked deprecated back-compat; customId
charset corrected (dots, not colons); 14 CONFIRM markers resolved by the
published typings (entityContext, forget reason, Python signatures).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 16:13:38 -07:00

158 lines
4.7 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Self-Hosting Quickstart"
sidebarTitle: "Quickstart"
description: "From zero to your first memory in under two minutes."
icon: "play"
---
## Install
<Tabs>
<Tab title="curl">
```bash
curl -fsSL https://supermemory.ai/install | bash
```
</Tab>
<Tab title="npx">
```bash
npx supermemory local
```
</Tab>
<Tab title="bunx">
```bash
bunx supermemory local
```
</Tab>
</Tabs>
The installer detects your OS and architecture, downloads the right binary, verifies it, and (when run interactively) prompts you for an LLM API key. Supported platforms: macOS (Apple Silicon & Intel), Linux (x64 & arm64).
## Run
```bash
supermemory-server
```
First boot sets everything up — the embedded Supermemory graph engine, local embeddings, and your credentials:
```
┌──────────────────────────────────────────────────┐
│ url http://localhost:6767 │
│ database ./.supermemory │
│ api key sm_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │
│ org id xxxxxxxxxxxxxxxxxxxxxx │
└──────────────────────────────────────────────────┘
```
Save that API key — it's your bearer token for every request.
<Note>
In production, Supermemory runs proprietary models tuned for long-horizon data understanding. Self-hosted, you bring any model: if no provider key is set, first boot launches an interactive setup wizard — pick a provider (OpenAI, Anthropic, Gemini, Groq, or any OpenAI-compatible endpoint like Ollama), paste your key, and it's saved encrypted for every future launch. After the LLM key, you can optionally pick an embedding model (press Enter to keep local `Xenova/bge-base-en-v1.5`). See [all providers](/self-hosting/configuration#llm-providers), [embeddings](/self-hosting/embeddings), and [fully-offline local models](/self-hosting/configuration#fully-offline-with-local-models).
</Note>
<Tip>
**Docker / non-interactive:** set an LLM key via env and, if you dont want local embeddings, set `SUPERMEMORY_EMBEDDING_PROVIDER` / `MODEL` / `DIMENSIONS`. There is no wizard without a TTY.
</Tip>
## Add your first memory
<Tabs>
<Tab title="TypeScript">
```typescript
import Supermemory from "supermemory"
const client = new Supermemory({
apiKey: "sm_...",
baseURL: "http://localhost:6767",
})
await client.add({
content: "I'm Dhravya. I love building dev tools and I'm allergic to peanuts.",
containerTag: "user_dhravya",
})
```
</Tab>
<Tab title="Python">
```python
from supermemory import Supermemory
client = Supermemory(
api_key="sm_...",
base_url="http://localhost:6767",
)
client.add(
content="I'm Dhravya. I love building dev tools and I'm allergic to peanuts.",
container_tag="user_dhravya",
)
```
</Tab>
<Tab title="curl">
```bash
curl http://localhost:6767/v3/documents \
-H "Authorization: Bearer sm_..." \
-H "Content-Type: application/json" \
-d '{
"content": "I am Dhravya. I love building dev tools and I am allergic to peanuts.",
"containerTag": "user_dhravya"
}'
```
</Tab>
</Tabs>
## Search it
<Tabs>
<Tab title="TypeScript">
```typescript
const results = await client.search.memories({
q: "what food should I avoid?",
containerTag: "user_dhravya",
})
```
</Tab>
<Tab title="Python">
```python
results = client.search.memories(
q="what food should I avoid?",
container_tag="user_dhravya",
)
```
</Tab>
<Tab title="curl">
```bash
curl http://localhost:6767/v3/search \
-H "Authorization: Bearer sm_..." \
-H "Content-Type: application/json" \
-d '{
"q": "what food should I avoid?",
"containerTag": "user_dhravya"
}'
```
</Tab>
</Tabs>
That's it. Everything in the [Memory API](/quickstart) — documents, memories, user profiles, spaces, filtering — works identically against your local server.
## Where things live
By default, all state lives in a single directory you can back up or move:
| Path | Contents |
|---|---|
| `./.supermemory/` (or `$SUPERMEMORY_DATA_DIR`) | The Supermemory graph engine's data, auth secret, embedding model cache |
| `~/.supermemory/env` | API keys saved by the installer, loaded on every launch |
## Next steps
<CardGroup cols={3}>
<Card title="Configuration" icon="settings" href="/self-hosting/configuration">
LLM providers, local models, performance tuning
</Card>
<Card title="Embeddings" icon="waypoints" href="/self-hosting/embeddings">
Local default, OpenAI / Gemini / Ollama, multilingual
</Card>
<Card title="Memory API" icon="book-open" href="/quickstart">
The full API — it all works against your local server
</Card>
</CardGroup>