---
title: "Get the memory timeline"
description: "Recently active entities first — one card per entity, not per fact.\n\nEach item is **one entity** with its humanized summary as the body and\nits connected edge facts inlined (for an \"N facts\" disclosure). Designed\nfor user-facing memory browsers (Memories tab, infinite scroll). Prefer\nthis over ``/memories/{agent_id}`` (which is relevance-ranked, capped at\n50, and not paginated).\n\nQuery params:\n  - ``agent_id``: optional, scope to one agent. Cross-agent when omitted.\n  - ``limit``: 1-200, default 20.\n  - ``cursor``: ISO datetime from the previous page's ``next_cursor``.\n  - ``sort``:\n      - ``last_updated`` (default) — entities ordered by ``max(edge.created_at)``;\n        new facts make an entity pop to the top.\n      - ``created`` — entities ordered by their own creation time.\n\nNamespace feeds (``graph_id``) require a service token."
---

> 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.

Path: AI Gateway API › Memory

`GET /memories/timeline`

Recently active entities first — one card per entity, not per fact.

Each item is **one entity** with its humanized summary as the body and
its connected edge facts inlined (for an "N facts" disclosure). Designed
for user-facing memory browsers (Memories tab, infinite scroll). Prefer
this over ``/memories/{agent_id}`` (which is relevance-ranked, capped at
50, and not paginated).

Query params:
  - ``agent_id``: optional, scope to one agent. Cross-agent when omitted.
  - ``limit``: 1-200, default 20.
  - ``cursor``: ISO datetime from the previous page's ``next_cursor``.
  - ``sort``:
      - ``last_updated`` (default) — entities ordered by ``max(edge.created_at)``;
        new facts make an entity pop to the top.
      - ``created`` — entities ordered by their own creation time.

Namespace feeds (``graph_id``) require a service token.

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Query parameters

- `agent_id` (`get_memory_timeline.query.agent_id`; any of, optional)
  - any of: `string`, `null`
- `graph_id` (`get_memory_timeline.query.graph_id`; any of, optional) — Optional. Feed from a shared namespace instead of the user's own graph. Requires a service token; mutually exclusive with agent_id; no subject user needed.
  - any of: `string`, `null`
- `limit` (`get_memory_timeline.query.limit`; integer, optional)
  - min 1; max 500; default `20`
- `cursor` (`get_memory_timeline.query.cursor`; any of, optional) — Optional. Opaque keyset cursor: pass back the previous page's next_cursor verbatim to get the next page. Format is '<iso-datetime>|<entity-id>' — the id half is what keeps entities sharing a timestamp from being skipped, so do not truncate it. Malformed values return 400 VALIDATION_ERROR. There is no offset/page parameter — this is the only pagination mechanism.
  - any of: `string`, `null`
- `sort` (`get_memory_timeline.query.sort`; string, optional)
  - pattern `^(last_updated|created)$`; default `"last_updated"`
- `visibility` (`get_memory_timeline.query.visibility`; any of, optional) — Optional. Narrow the feed to entities with this visibility. Omit for the whole feed. Every item reports its own 'visibility' either way.
  - any of: `string`, `null`

## Header parameters

- `X-On-Behalf-Of` (`get_memory_timeline.header.X-On-Behalf-Of`; any of, optional)
  - any of: `string`, `null`
- `X-External-User-Id` (`get_memory_timeline.header.X-External-User-Id`; any of, optional)
  - any of: `string`, `null`
- `X-App-Id` (`get_memory_timeline.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/timeline \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/memories/timeline';
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/timeline"

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

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

print(response.text)
```

## Responses

### 200

Successful Response

#### Example

```json
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "labels": [
        "string"
      ],
      "visibility": "private",
      "summary": "string",
      "summary_raw": "string",
      "first_seen_at": "string",
      "last_updated_at": "string",
      "fact_count": 0,
      "facts": [
        {
          "id": "string",
          "label": "string",
          "fact": "string",
          "created_at": "string",
          "valid_at": "string",
          "direction": "outgoing",
          "other": {
            "id": "string",
            "name": "string",
            "labels": [
              "string"
            ]
          }
        }
      ]
    }
  ],
  "next_cursor": "string",
  "sort": "last_updated"
}
```

- `items` (`get_memory_timeline.response.200.items`; array<object>, required)
  - `id` (`get_memory_timeline.response.200.items.id`; string, required)
  - `name` (`get_memory_timeline.response.200.items.name`; string, required)
  - `labels` (`get_memory_timeline.response.200.items.labels`; array<string>, required) — Entity types; never empty.
  - `visibility` (`get_memory_timeline.response.200.items.visibility`; string, required)
    - one of `"private"`, `"public"`
  - `summary` (`get_memory_timeline.response.200.items.summary`; string, required)
  - `summary_raw` (`get_memory_timeline.response.200.items.summary_raw`; string, required)
  - `first_seen_at` (`get_memory_timeline.response.200.items.first_seen_at`; any of, required)
    - any of: `string`, `null`
  - `last_updated_at` (`get_memory_timeline.response.200.items.last_updated_at`; any of, required)
    - any of: `string`, `null`
  - `fact_count` (`get_memory_timeline.response.200.items.fact_count`; integer, required)
  - `facts` (`get_memory_timeline.response.200.items.facts`; array<object>, required)
    - `id` (`get_memory_timeline.response.200.items.facts.id`; any of, required)
      - any of: `string`, `null`
    - `label` (`get_memory_timeline.response.200.items.facts.label`; string, required)
    - `fact` (`get_memory_timeline.response.200.items.facts.fact`; string, required)
    - `created_at` (`get_memory_timeline.response.200.items.facts.created_at`; any of, required)
      - any of: `string`, `null`
    - `valid_at` (`get_memory_timeline.response.200.items.facts.valid_at`; any of, required)
      - any of: `string`, `null`
    - `direction` (`get_memory_timeline.response.200.items.facts.direction`; string, required)
      - one of `"outgoing"`, `"incoming"`
    - `other` (`get_memory_timeline.response.200.items.facts.other`; object, required) — The entity at the other end of the fact.
      - `id` (`get_memory_timeline.response.200.items.facts.other.id`; any of, required)
        - any of: `string`, `null`
      - `name` (`get_memory_timeline.response.200.items.facts.other.name`; string, required)
      - `labels` (`get_memory_timeline.response.200.items.facts.other.labels`; array<string>, required)
- `next_cursor` (`get_memory_timeline.response.200.next_cursor`; any of, required) — Null on the last page.
  - any of: `string`, `null`
- `sort` (`get_memory_timeline.response.200.sort`; string, required)
  - one of `"last_updated"`, `"created"`

### 422

Validation Error

#### Example

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

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


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