Assistant Memory
Read, switch off, and clear what the AI assistant remembers about a doc-site visitor.
In agentic mode, the assistant keeps a short list of durable facts about each visitor — their stack, use case, or experience level — and uses them to tailor later answers. These endpoints let the visitor see that list, forget one fact or all of them, and turn memory off for themselves. See Memory for what is stored and how the project-wide switch works.
All four endpoints are public (no API key required) and scoped to the project and the visitorId: a request only ever reads or changes that visitor's own memory.
On your doc site these endpoints are also served same-origin under /_chat/memory (GET, PATCH, DELETE) and /_chat/memory/forget (POST). The project comes from the site's hostname, so the paths take no projectId. Any other method gets 405 method_not_allowed.
The memory object
Every successful response returns the visitor's memory state:
availablefalse when the project has turned memory off (aiPersona.memory: "off"). Nothing is extracted or used then, and enabled is false and facts is empty. Present on GET and PATCH responses.enabledtrue. When false, the assistant neither uses nor adds to the visitor's facts.factsRead Memory
Path Parameters
projectIdQuery Parameters
visitorIdResponse
When the project has turned memory off:
Turn Memory On or Off
/v1/projects/{projectId}/chat/memoryTurning memory off keeps the stored facts but stops the assistant from using them or adding new ones. Turning it back on picks them up again. To delete the facts, use Forget Everything.
Request Body
visitorIdenabledfalse to turn memory off for this visitor, true to turn it back on.Response
Returns 409 MEMORY_DISABLED when the project has turned memory off — there is nothing for the visitor to switch.
Forget One Fact
/v1/projects/{projectId}/chat/memory/forgetRequest Body
visitorIdfactfacts (1–500 chars). A fact that isn't there leaves the memory unchanged.Response
The remaining memory state:
Forget Everything
/v1/projects/{projectId}/chat/memoryDeletes every remembered fact. The visitor's on/off choice is kept.
Query Parameters
visitorIdError Responses
| Status | Code | When |
|---|---|---|
| 400 | INVALID_REQUEST | GET or DELETE without a visitorId |
| 400 | validation_error | PATCH or POST body is missing visitorId, enabled or fact, or a value is out of range |
| 403 | FORBIDDEN | The site is private (password, invite-only or SSO) and the request didn't come through the doc site ("Ask from the docs site") |
| 404 | NOT_FOUND | The project doesn't exist |
| 409 | MEMORY_DISABLED | PATCH on a project that has turned memory off |