---
title: Memory API reference
description: Platform API v1, Memory: every operation's path, parameters, request and response fields, scopes, idempotency and errors, from the contract.
url: https://agentlab.cresclab.com/docs/en/api/memory
language: en
updated: 2026-12-05
---

# Memory API reference

Platform API v1, Memory: every operation's path, parameters, request and response fields, scopes, idempotency and errors, from the contract.

> [!NOTE]
> Generated from the API contract (Agent Lab Platform API 1.0.0-alpha.1). Descriptions are the contract's own words.

The workspace notebook: what assistants have recorded and assert to every member, read and
curated as a member who may curate it. Both scopes are restricted (personal data).

## The workspace notebook

`GET /v1/workspaces/{workspaceId}/memory`

What assistants have recorded in the workspace notebook and assert to every member:
standing beliefs and episodic recollections, each at most 300, and the 50 newest lines of
its history (`historyTruncated` when there are older ones). Needs a member who may curate
the workspace's memory, as the console's notebook page does.

| Scopes | Acts as | Authentication | Idempotency-Key |
| --- | --- | --- | --- |
| `memory:read` | `member` | `installationToken` | — |

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | path | `string` | yes | The workspace, by id. It must be the installation's. |
| `Agentlab-On-Behalf-Of` | header | `string` | yes | The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again. |

### Responses

| Status | Body | Description |
| --- | --- | --- |
| `200` | `application/json`: [MemoryNotebook](https://agentlab.cresclab.com/docs/en/api/schemas.md#MemoryNotebook) | The notebook. |
| `400` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | The request itself is wrong, such as a `cursor` this list did not answer (`recovery: none`). |
| `401` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | No token, or a token the platform does not honor. |
| `403` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | Refused: `SCOPE_NOT_GRANTED` (`configure`); `WORKSPACE_NOT_INSTALLED`, the path names a workspace other than the installation's (`configure`); `MEMBER_REQUIRED`, no single `Agentlab-On-Behalf-Of` (`none`); `MEMBER_NOT_AUTHORIZED`, the named account is not a current member who signed in to the application here, or the member may not read or do this (`authorize`); `SERVER_TO_SERVER_ONLY`, sent from a browser (`none`); `PRODUCT_ACCESS_DENIED`, the workspace's plan does not include it (`configure`). |
| `404` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | No such operation or resource. |
| `429` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | Rate limited (`recovery: retry`). |
| `503` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | Try again later (`recovery: retry`). |

## Rewrite a fact

`PATCH /v1/workspaces/{workspaceId}/memory/facts/{factId}`

Replaces the fact's sentence, only while it is still `expectedBody`: a fact is one
sentence, so a change made meanwhile is refused (`MEMORY_FACT_CHANGED`) rather than
overwritten. The rewritten fact has a new `id`, is marked `explicit` (written by a
person), and the change is recorded in the notebook's history and the workspace's audit
log as the acting member's, naming the application. Needs a member who may curate the
workspace's memory; a fact another rule protects is refused. A fact outside the notebook (a
member's own, a conversation's) or of another workspace is not found.

| Scopes | Acts as | Authentication | Idempotency-Key |
| --- | --- | --- | --- |
| `memory:write` | `member` | `installationToken` | — |

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | path | `string` | yes | The workspace, by id. It must be the installation's. |
| `Agentlab-On-Behalf-Of` | header | `string` | yes | The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again. |
| `factId` | path | `string` | yes | A fact of the workspace notebook, by id. |

### Request body

`application/json`: [MemoryFactEdit](https://agentlab.cresclab.com/docs/en/api/schemas.md#MemoryFactEdit)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expectedBody` | `string` | yes | The fact's sentence as last read. |
| `body` | `string` | yes | — |

### Responses

| Status | Body | Description |
| --- | --- | --- |
| `200` | `application/json`: [MemoryFact](https://agentlab.cresclab.com/docs/en/api/schemas.md#MemoryFact) | The rewritten fact. |
| `400` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | The request itself is wrong, such as a `cursor` this list did not answer (`recovery: none`). |
| `401` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | No token, or a token the platform does not honor. |
| `403` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | Refused: `SCOPE_NOT_GRANTED` (`configure`); `WORKSPACE_NOT_INSTALLED`, the path names a workspace other than the installation's (`configure`); `MEMBER_REQUIRED`, no single `Agentlab-On-Behalf-Of` (`none`); `MEMBER_NOT_AUTHORIZED`, the named account is not a current member who signed in to the application here, or the member may not read or do this (`authorize`); `SERVER_TO_SERVER_ONLY`, sent from a browser (`none`); `PRODUCT_ACCESS_DENIED`, the workspace's plan does not include it (`configure`). |
| `404` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | No such operation or resource. |
| `409` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | `MEMORY_FACT_CHANGED`: the fact's sentence is no longer `expectedBody`; read the notebook again (`none`). Nothing changed. |
| `413` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | The body is larger than the operation accepts (`PAYLOAD_TOO_LARGE`, `recovery: none`). |
| `429` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | Rate limited (`recovery: retry`). |
| `503` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | Try again later (`recovery: retry`). |

## Forget a fact

`DELETE /v1/workspaces/{workspaceId}/memory/facts/{factId}`

Removes the fact from the notebook; its sentence is kept in the notebook's history and the
removal in the workspace's audit log as the acting member's, naming the application. Needs
a member who may curate the workspace's memory. A fact outside the notebook (a member's own,
a conversation's) or of another workspace is not found.

| Scopes | Acts as | Authentication | Idempotency-Key |
| --- | --- | --- | --- |
| `memory:write` | `member` | `installationToken` | — |

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | path | `string` | yes | The workspace, by id. It must be the installation's. |
| `Agentlab-On-Behalf-Of` | header | `string` | yes | The account id of the member the installation acts for: a current member of the workspace whose sign-in to the application there is still live, neither revoked nor expired. When the member's sign-in expires, the application acts for them again once they sign in again. |
| `factId` | path | `string` | yes | A fact of the workspace notebook, by id. |

### Responses

| Status | Body | Description |
| --- | --- | --- |
| `204` | — | Forgotten. |
| `400` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | The request itself is wrong, such as a `cursor` this list did not answer (`recovery: none`). |
| `401` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | No token, or a token the platform does not honor. |
| `403` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | Refused: `SCOPE_NOT_GRANTED` (`configure`); `WORKSPACE_NOT_INSTALLED`, the path names a workspace other than the installation's (`configure`); `MEMBER_REQUIRED`, no single `Agentlab-On-Behalf-Of` (`none`); `MEMBER_NOT_AUTHORIZED`, the named account is not a current member who signed in to the application here, or the member may not read or do this (`authorize`); `SERVER_TO_SERVER_ONLY`, sent from a browser (`none`); `PRODUCT_ACCESS_DENIED`, the workspace's plan does not include it (`configure`). |
| `404` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | No such operation or resource. |
| `429` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | Rate limited (`recovery: retry`). |
| `503` | `application/json`: [Error](https://agentlab.cresclab.com/docs/en/api/schemas.md#Error) | Try again later (`recovery: retry`). |
