The fact object
string
The folder it is under, with one trailing slash (
companies/77/). The root is "". An end user’s facts are under users/<user>/.integer
Goes up each time the fact is rewritten; earlier versions are kept.
object
Who wrote this version:
run_id (the run, or null for a panel edit), written_by (code, model for a model’s tool call, or person for a panel edit) and person (who edited it in the panel).List or search facts
GET /v0/envs/{env}/agents/{agent}/memory/facts
string
Only facts under this path. A path matches whole segments:
companies/7/ doesn’t match companies/77/. Write it as stored (users/cust-123/, not {user}).string
Search: the best matches first, each with a
score. Full-text, case-insensitive, Turkish and English alike; every word counts and matches as a prefix (direct finds directors).string
Comma-separated: only facts with every one of these tags.
integer
default:"50"
1–200.
string
The previous page’s
next. Ignored when q is given (a search is one page).q the facts are newest first, and next is the value to pass as before for the next page (null on the last).
Get a fact
GET /v0/envs/{env}/agents/{agent}/memory/facts/{fact_id}
Get a fact’s versions
GET /v0/envs/{env}/agents/{agent}/memory/facts/{fact_id}/versions
Every version, newest first, each with who wrote it and when.
Delete a fact
DELETE /v0/envs/{env}/agents/{agent}/memory/facts/{fact_id}
Deletes the fact and all its versions. Admins only.
Erase a path
POST /v0/envs/{env}/agents/{agent}/memory/erase
Erases every fact, with every version, under a path of one agent’s memory. {"path": ""} erases the agent’s whole memory. Admins only.
422 and erases nothing — never the root.
Erase an end user
POST /v0/envs/{env}/memory/erase-user
Erases users/<user>/ in the memory of every agent of the environment: what agents remembered about one end user. Use it to answer a deletion request. Admins only.
Receipts
Every erase answers a receipt: what was erased (scope), how many facts and versions it removed, when, and by whom. The receipt is also written to the environment’s audit log — with the counts, never the facts’ text, and an end user’s id only as a fingerprint — and listed on the panel’s Govern → Memory page.
An erase locks the facts before it removes them, so a write that was in progress is waited for and its version removed too.

