/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Assistant Memory

Assistant Memory

Read, switch off, and clear what the AI assistant remembers about a doc-site visitor.

GET/v1/projects/{projectId}/chat/memoryTry it

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.

Note

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:

NameDescription
available:boolean
false 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.
enabled:boolean
The visitor's own choice. Defaults to true. When false, the assistant neither uses nor adds to the visitor's facts.
facts:string[]
What the assistant remembers about this visitor — at most 12 short facts.

Read Memory

Path Parameters

NameDescription
projectId:stringpathRequired
The project ID.

Query Parameters

NameDescription
visitorId:stringqueryRequired
The anonymous visitor identifier (1–100 chars). Same value the visitor sends on the chat endpoint.

Response

When the project has turned memory off:

Turn Memory On or Off

PATCH/v1/projects/{projectId}/chat/memory

Turning 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

NameDescription
visitorId:stringbodyRequired
The anonymous visitor identifier (1–100 chars).
enabled:booleanbodyRequired
false 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

POST/v1/projects/{projectId}/chat/memory/forget

Request Body

NameDescription
visitorId:stringbodyRequired
The anonymous visitor identifier (1–100 chars).
fact:stringbodyRequired
The fact to forget, exactly as it appears in facts (1–500 chars). A fact that isn't there leaves the memory unchanged.

Response

The remaining memory state:

Forget Everything

DELETE/v1/projects/{projectId}/chat/memory

Deletes every remembered fact. The visitor's on/off choice is kept.

Query Parameters

NameDescription
visitorId:stringqueryRequired
The anonymous visitor identifier (1–100 chars).

Error Responses

StatusCodeWhen
400INVALID_REQUESTGET or DELETE without a visitorId
400validation_errorPATCH or POST body is missing visitorId, enabled or fact, or a value is out of range
403FORBIDDENThe site is private (password, invite-only or SSO) and the request didn't come through the doc site ("Ask from the docs site")
404NOT_FOUNDThe project doesn't exist
409MEMORY_DISABLEDPATCH on a project that has turned memory off
•
Memory — what the assistant remembers and the project switch
•
Conversation History — list, rename and delete a visitor's conversations
•
Ask the AI Assistant — where facts are learned and used
Was this page helpful? Yes No
Request
bashJavaScriptPythonGoRubyPHPJavaC#bash
curl -X PATCH https://api.syntext.dev/v1/projects/3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c/chat/memory \
-H "Content-Type: application/json" \
-d '{ "visitorId": "vis_9f8e7d", "enabled": false }'
Responseapplication/json
jsonjson
{
"data": {
"available": true,
"enabled": true,
"facts": ["Uses Python", "Building a Next.js app", "Prefers code examples"]
}
}
Responseapplication/json
json
{
"data": { "available": true, "enabled": false, "facts": ["Uses Python"] }
}
Responseapplication/json
json
{
"data": { "enabled": true, "facts": ["Building a Next.js app", "Prefers code examples"] }
}
Responseapplication/json
json
{
"data": { "enabled": true, "facts": [] }
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext