> ## Documentation Index
> Fetch the complete documentation index at: /dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart: your memory

> Save a memory and get it back in two calls, with your own key.

**1. Get your key**

Open [API keys](https://www.constella.app/console?tab=keys) in the Dev Console and press **Show** under **Your key**. Copy it into your shell. Keep it out of web pages and git.

```bash theme={"system"}
export CONSTELLA_API_KEY="csk_..."
```

**2. Save a memory**

Send any text. Give it an `id` so saving again updates it instead of adding a copy. `X-Constella-Client` names your program.

```bash curl theme={"system"}
curl https://api.constella.app/platform/v1/me/tools/memory_add \
  -H "Authorization: Bearer $CONSTELLA_API_KEY" \
  -H "X-Constella-Client: my-script" \
  -H "Content-Type: application/json" \
  -d '{"arguments": {"text": "We ship on Fridays.", "id": "team:ship-day"}}'

# {"result": {"id": "team:ship-day", "app": "agents", "updated": false}}
```

```python Python theme={"system"}
import os, requests

API = "https://api.constella.app/platform/v1/me/tools"
HEADERS = {
    "Authorization": f"Bearer {os.environ['CONSTELLA_API_KEY']}",
    "X-Constella-Client": "my-script",
}

r = requests.post(f"{API}/memory_add", headers=HEADERS,
                  json={"arguments": {"text": "We ship on Fridays.", "id": "team:ship-day"}})
print(r.json()["result"])  # {'id': 'team:ship-day', 'app': 'agents', 'updated': False}
```

```javascript JavaScript theme={"system"}
const API = "https://api.constella.app/platform/v1/me/tools";
const headers = {
  Authorization: `Bearer ${process.env.CONSTELLA_API_KEY}`,
  "X-Constella-Client": "my-script",
  "Content-Type": "application/json",
};

const saved = await fetch(`${API}/memory_add`, {
  method: "POST",
  headers,
  body: JSON.stringify({ arguments: { text: "We ship on Fridays.", id: "team:ship-day" } }),
}).then((r) => r.json());
console.log(saved.result); // { id: "team:ship-day", app: "agents", updated: false }
```

**3. Recall it**

Ask in plain words. `memory_recall` gives back one list, best match first.

```bash curl theme={"system"}
curl https://api.constella.app/platform/v1/me/tools/memory_recall \
  -H "Authorization: Bearer $CONSTELLA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"arguments": {"query": "when do we ship?", "limit": 5}}'

# {"result": {"sources": [{"id": "team:ship-day", "title": "We ship on Fridays.", ...}]}}
```

```python Python theme={"system"}
r = requests.post(f"{API}/memory_recall", headers=HEADERS,
                  json={"arguments": {"query": "when do we ship?", "limit": 5}})
for source in r.json()["result"]["sources"]:
    print(source["title"], source["similarity"])
```

```javascript JavaScript theme={"system"}
const found = await fetch(`${API}/memory_recall`, {
  method: "POST",
  headers,
  body: JSON.stringify({ arguments: { query: "when do we ship?", limit: 5 } }),
}).then((r) => r.json());
console.log(found.result.sources[0].title);
```

**4. See it in Constella**

Open Constella, then **Library → Connected apps → Agents**. Your memory is there. Claude Code, Codex, ChatGPT and Claude each get a folder of their own.

## Next

> [card] [Connect Claude Code](/dev/docs/connect/claude-code.md)

> [card] [Call any tool](/dev/docs/api-reference/me/call-tool.md)

> [card] [Give your agent memory](/dev/docs/guides/agent-memory.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.