content is the only required field for a new memory; everything an agent used to have to invent — entity, kind, layer — is defaulted. Add anchor and the memory is also declared as a drift anchor the guard re-injects before Edit/Write/Bash and on session start.
Memories are readable from any agent the user connects — Claude Code, Cursor, Windsurf, Codex, Gemini CLI.
Modes
Create (default)
entity_name = the project you are in (workspace roots, else the files edited recently), entity_kind = project, layer = context (or learning when anchor is set). The response reports entity_inferred_from when the entity was defaulted.
Create + enforce
content.anchor_id ↔ the anchor’s source_memory_id). With violation_signal the anchor is a decision the gate can contradict; without, it is an honest constraint — re-injected on boot and when its scope is touched, and the response says so. An invalid anchor spec never loses the memory (anchor_error is returned alongside the saved memory_id).
anchor accepts true, {}, or { kind?, violation_signal?, affects?, detect_terms?, domain?, rationale? }.
Update
content, layer and importance change. Used by the distill loop: rewrite a raw auto-captured memory into a clean what/why and include "distilled": true in the content JSON.
Delete
Parameters
Response
Quality check
Content that looks like pasted assistant output, a CI log, or an external paste is rejected withrejected: "quality_check". Summarise it in your own words, or pass force: true if it really is original.
When to call
- The moment an error or failure occurs →
layer: "caveat" - When a decision is made or approved →
content+anchor: {} - When a goal is set →
layer: "goal" - When the user says “remember this” / 「覚えておいて」