---
title: Quickstart
description: Create a memory space, store a fact, and read it back, using curl or MCP. No account needed.
---

This takes about a minute. You need `curl`. Examples use a POSIX shell. In PowerShell, set the variable with `$env:OPENMEMORY_KEY = "om_..."`.

## 1. Create a space

A space is one agent's (or one person's) memory. Creating one needs no account:

```bash
curl -s -X POST https://api.openmemory.sh/v1/spaces \
  -H 'content-type: application/json' \
  -d '{"timezone":"Europe/Athens"}'
```

```json
{
  "space_id": "sp_...",
  "api_key": "om_...",
  "next": "Send the key as 'Authorization: Bearer <api_key>'. Start with GET /v1/context."
}
```

The key is shown **once**. Only a hash of it is stored, so it cannot be recovered. Keep it somewhere safe, such as an environment variable:

```bash
export OPENMEMORY_KEY="om_..."
```

`timezone` is an IANA name. It decides what "today" means for the journal and when nightly dreaming runs. It defaults to `UTC` and you can change it later with `PATCH /v1/space`.

## 2. Remember a fact

Send the key as `Authorization: Bearer <key>` (or `X-API-Key: <key>`):

```bash
curl -s -X POST https://api.openmemory.sh/v1/memories \
  -H "Authorization: Bearer $OPENMEMORY_KEY" \
  -H 'content-type: application/json' \
  -d '{"subject":"Sam","text":"Prefers code reviews on Thursdays","origin":"user","tier":"core"}'
```

The response is `201` with `{"memory": {...}, "created": true}`. Sending the same subject and text again returns the existing fact with `200` and `"created": false`.

## 3. Recall it

```bash
curl -s "https://api.openmemory.sh/v1/memories?q=thursday" \
  -H "Authorization: Bearer $OPENMEMORY_KEY"
```

Search is full-text, case- and accent-insensitive, and works in any script (Greek included). Any word may match, best matches first, and words match as prefixes (`thurs` finds "Thursdays").

## 4. Load context at the start of a run

```bash
curl -s "https://api.openmemory.sh/v1/context" -H "Authorization: Bearer $OPENMEMORY_KEY"
```

One bounded read returns pinned and core facts, due records, open actions, the recent journal, the latest weekly digest, and the last dream report. See [Concepts](/docs/concepts#context).

## Or connect over MCP

Point any MCP client that supports Streamable HTTP at `https://mcp.openmemory.sh` with the header `Authorization: Bearer <key>`. For Claude Code:

```bash
claude mcp add --transport http openmemory https://mcp.openmemory.sh \
  --header "Authorization: Bearer $OPENMEMORY_KEY"
```

Then ask the agent to call `get_context`. Guides for other clients are under [Agent guides](/docs/guides/mcp-clients).

## Next

- [Agent quickstart](/docs/agent-quickstart): let your agent do all of this itself.
- [Concepts](/docs/concepts): what else a space holds.
- [API reference](/docs/api-reference) and [MCP tools](/docs/mcp-tools).
