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

# Memory API

> Access and manage agent memory programmatically.

# Memory API

## List Memory Entries

```bash theme={null}
GET /api/memory?type=semantic&page=1&page_size=20&sort_by=created_at&sort_order=desc&tag=python
```

| Parameter    | Type   | Default      | Description                                                                             |
| ------------ | ------ | ------------ | --------------------------------------------------------------------------------------- |
| `type`       | string | all          | Memory type filter: `semantic`, `episodic`, `procedural`, `conversation`, `task_digest` |
| `page`       | int    | 1            | Page number (1-indexed)                                                                 |
| `page_size`  | int    | 20           | Items per page (max 100)                                                                |
| `sort_by`    | string | `created_at` | Sort field: `created_at`, `updated_at`, `importance`                                    |
| `sort_order` | string | `desc`       | Sort direction: `asc` or `desc`                                                         |
| `tag`        | string | —            | Filter by tag (case-insensitive)                                                        |
| `search`     | string | —            | Semantic search query (uses vector similarity)                                          |

Response:

```json theme={null}
{
  "items": [...],
  "total": 91,
  "page": 1,
  "page_size": 20,
  "has_next": true,
  "has_prev": false
}
```

## Get Memory Tags

```bash theme={null}
GET /api/memory/tags?limit=20
```

Returns the most frequent tags across all memory types with their counts.

## Search Memory

```bash theme={null}
POST /api/memory/search
```

```json theme={null}
{
  "query": "user preferences for coding style",
  "limit": 10
}
```

## Create Memory Entry

```bash theme={null}
POST /api/memory
```

```json theme={null}
{
  "type": "semantic",
  "content": "User prefers TypeScript with strict mode",
  "importance": 0.8
}
```

## Delete Memory Entry

```bash theme={null}
DELETE /api/memory/:id
```

## Memory Command Center

Get the full memory system health and diagnostics snapshot for the Settings UI.

```bash theme={null}
GET /api/v1/memory/command-center?project_id=<optional>
```

| Parameter    | Type   | Default | Description                                                                   |
| ------------ | ------ | ------- | ----------------------------------------------------------------------------- |
| `project_id` | string | —       | Optional project ID to scope the snapshot to a single project's memory spaces |

Response includes: overview statistics, memory spaces, governance items, health diagnostics, timeline events, migration status, runtime configuration, and more.

When `project_id` is provided, the `spaces`, `governance`, and `timeline` sections are filtered to show only data related to that project's SharedContext bindings. Empty strings are normalized to the global view.
