memory_write
Create or update short, durable memories (constraints, gotchas, decisions) for AI agents. Ensures critical project knowledge persists across sessions, with support for superseding outdated memories.
Instructions
Create or update a durable memory -- the compact knowledge a future session must not miss (a constraint, gotcha, decision, runbook). Long-form write-ups belong in notes_create; put the one-line lesson here. Writing an existing name updates it in place (its id is stable). On a new name, a semantically similar existing memory is reported as an advisory hint; the write still proceeds. Pass supersedes to replace a DIFFERENT, now-outdated memory: it is marked invalid and leaves every index (briefing, recall) but stays readable with a pointer here. If superseding fails, the new memory is still written and kept; the error says how to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | markdown body (aliases: content, text) | |
| kind | Yes | memory kind; constraint = what any agent must or must not do regardless of task; convention = a project-local choice or layout fact (naming, branding, where things live or deploy, which files sync together); for kind=stage, open the body with Status: open|in_progress|blocked|done and optionally Gate: human|ai, and update status by re-writing via memory_write -- append cannot change the header, which is parsed from the top of the body | |
| name | Yes | kebab-case identifier, unique within the project | |
| tags | No | tags, replacing all (a comma-separated string is also accepted); omit to leave an existing memory's tags untouched, and note an empty list reads as absent, not as a clear | |
| project | No | project slug; defaults to the bound/ambient session's project. An unknown slug CREATES that project -- naming a new one is normal and never an error. Pass project=global ONLY for knowledge that belongs in EVERY project's briefing; it is not a neutral default. With no session and no explicit project the call is rejected as ambiguous. | |
| supersedes | No | name of an existing memory this one replaces; that memory is marked superseded (invalid) and pointed here | |
| description | Yes | one line, <=150 chars -- the only text shown in indexes |