---
title: "List memories"
description: "List memories for the user + agent pair via relevance-ranked search.\n\n**Deprecated** — use ``GET /memories/timeline`` instead. This endpoint:\n  - is relevance-ranked against a fixed prompt, not time-ordered;\n  - is hard-capped at 50 results with no pagination;\n  - costs an LLM embed + vector search + reranker pass per call.\n\nThe new ``/memories/timeline`` endpoint returns flat, time-ordered,\ncursor-paginated edges with selectable ``sort`` (``created_at`` or\n``valid_at``) — the right shape for user-facing memory browsers.\n\nWill be removed in a future release. New callers must use the timeline\nendpoint."
---

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

> **Deprecated.**

Path: AI Gateway API › Memory

`GET /memories/{agent_id}`

List memories for the user + agent pair via relevance-ranked search.

**Deprecated** — use ``GET /memories/timeline`` instead. This endpoint:
  - is relevance-ranked against a fixed prompt, not time-ordered;
  - is hard-capped at 50 results with no pagination;
  - costs an LLM embed + vector search + reranker pass per call.

The new ``/memories/timeline`` endpoint returns flat, time-ordered,
cursor-paginated edges with selectable ``sort`` (``created_at`` or
``valid_at``) — the right shape for user-facing memory browsers.

Will be removed in a future release. New callers must use the timeline
endpoint.

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Path parameters

- `agent_id` (`list_memories.path.agent_id`; string, required)

## Header parameters

- `X-On-Behalf-Of` (`list_memories.header.X-On-Behalf-Of`; any of, optional)
  - any of: `string`, `null`
- `X-External-User-Id` (`list_memories.header.X-External-User-Id`; any of, optional)
  - any of: `string`, `null`
- `X-App-Id` (`list_memories.header.X-App-Id`; any of, optional)
  - any of: `string`, `null`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://truememory-api.mvstg.com/memories/<agent_id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/memories/<agent_id>';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://truememory-api.mvstg.com/memories/<agent_id>"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Successful Response

#### Example

```json
[
  {
    "id": "string",
    "title": "string",
    "name": "string",
    "content": "string",
    "memory_type": "long_term",
    "source": "edge"
  }
]
```

- `id` (`list_memories.response.200.id`; string, required)
- `title` (`list_memories.response.200.title`; string, required)
- `name` (`list_memories.response.200.name`; string, required)
- `content` (`list_memories.response.200.content`; string, required)
- `memory_type` (`list_memories.response.200.memory_type`; string, required)
- `source` (`list_memories.response.200.source`; string, required)

### 422

Validation Error

#### Example

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

- `detail` (`list_memories.response.422.detail`; array<object>, optional)
  - `loc` (`list_memories.response.422.detail.loc`; array<any of>, required)
    - any of: `string`, `integer`
  - `msg` (`list_memories.response.422.detail.msg`; string, required)
  - `type` (`list_memories.response.422.detail.type`; string, required)
  - `input` (`list_memories.response.422.detail.input`; unknown, optional)
  - `ctx` (`list_memories.response.422.detail.ctx`; object, optional)


Source: https://truememory-docs.mvstg.com/api/memories/get/index.md
