latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-14129143297.4 KB

0e52fe5f8d33

admin

Hygiene Compact Memory Endpoint

Re-audit a user's MEMORY.md against the Do-Not-Include list.

Runs the compaction LLM in hygiene-only mode: the model reads the user's current MEMORY.md and removes every line that violates the exclusion list (customer IDs, phone numbers, stale bug notes, etc.), even if no new conversation triggered the compaction. This is the "clean my memory now" operation that scrubs pre-existing violations that were written before the compliance rule existed.

Unlike POST /admin/users/{user_id}/compact-now, this endpoint does not require untrimmed conversation messages and does not advance the trim watermark. It only touches MEMORY.md.

Audit-logged via AdminAction.HYGIENE_COMPACT_MEMORY.

post/api/admin/users/{user_id}/hygiene-compact-memory

Path parameters

user_idstring required

Response

Successful Response

memory_updatedboolean required
memory_textstring required