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

# Memories

> Manage persistent context that informs Atlas reasoning.

Memories are knowledge Atlas carries across interactions. User memories capture personal preferences, domain background, and workflow conventions. Entity memories capture hardware-specific context attached to nodes in the metagraph. Entity memory endpoints are documented under [Metagraph](/api-reference/metagraph).

See [Adding a Personal Skill & System Memory](/guides/memories-and-skills) for a workflow guide.

## Endpoints

| Method | Path                | Description                       |
| ------ | ------------------- | --------------------------------- |
| `GET`  | `/memories`         | Get current user memories         |
| `PUT`  | `/memories`         | Set user memories                 |
| `GET`  | `/memories/history` | Get memory version history        |
| `POST` | `/memories/restore` | Restore a previous memory version |

***

## Get memories

`GET /memories`

Returns the current memory content for the authenticated user.

**Example request:**

```bash theme={null}
curl "https://nokia.atlas.arenaphysica.com/api/v1/memories" \
  -H "Authorization: Bearer $ATLAS_TOKEN"
```

**Response fields:**

| Field        | Type   | Nullable | Description                           |
| ------------ | ------ | -------- | ------------------------------------- |
| `content`    | string | No       | Markdown-formatted memory content     |
| `updated_at` | string | Yes      | ISO 8601 timestamp of the last update |

**Example response:**

```json theme={null}
{
  "content": "I work on power systems. Always flag voltage anomalies as high priority. Team uses dB scale for RF measurements.",
  "updated_at": "2026-04-13T09:00:00.000000"
}
```

***

## Set memories

`PUT /memories`

Replaces the current memory content entirely. Memory writes are versioned automatically.

**Request body:**

| Field     | Required | Type   | Description                                                     |
| --------- | -------- | ------ | --------------------------------------------------------------- |
| `content` | Yes      | string | Full memory content (max 10,000 characters, markdown supported) |

**Example request:**

```bash theme={null}
curl -X PUT "https://nokia.atlas.arenaphysica.com/api/v1/memories" \
  -H "Authorization: Bearer $ATLAS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "I work on power systems. Always flag voltage anomalies as high priority. Team uses dB scale for RF measurements."
  }'
```

Returns the updated memory object with the same fields as [Get memories](#get-memories).

***

## Get version history

`GET /memories/history`

Returns all previous versions of the user's memory document.

**Example request:**

```bash theme={null}
curl "https://nokia.atlas.arenaphysica.com/api/v1/memories/history" \
  -H "Authorization: Bearer $ATLAS_TOKEN"
```

**Response fields (array):**

| Field                   | Type    | Nullable | Description                                   |
| ----------------------- | ------- | -------- | --------------------------------------------- |
| `version`               | integer | No       | Version number (1-indexed)                    |
| `content`               | string  | No       | Memory content at this version                |
| `updated_at`            | string  | No       | ISO 8601 timestamp                            |
| `restored_from_version` | integer | Yes      | Version this was restored from, if applicable |

**Example response:**

```json theme={null}
[
  {
    "version": 2,
    "content": "I work on power systems. Always flag voltage anomalies as high priority. Team uses dB scale for RF measurements.",
    "updated_at": "2026-04-13T09:00:00.000000",
    "restored_from_version": null
  },
  {
    "version": 1,
    "content": "I work on power systems.",
    "updated_at": "2026-04-12T08:00:00.000000",
    "restored_from_version": null
  }
]
```

***

## Restore a version

`POST /memories/restore`

Rolls back the user's memory to a previous version. The restore creates a new version entry rather than overwriting history.

**Request body:**

| Field     | Required | Type    | Description                             |
| --------- | -------- | ------- | --------------------------------------- |
| `version` | Yes      | integer | Version number to restore (must be ≥ 1) |

**Example request:**

```bash theme={null}
curl -X POST "https://nokia.atlas.arenaphysica.com/api/v1/memories/restore" \
  -H "Authorization: Bearer $ATLAS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"version": 1}'
```

Returns the restored memory object with the same fields as [Get memories](#get-memories).
