memory_write
Stores durable facts, insights, decisions, and skills in a shared agent memory store, using keys, namespaces, validity dates, and project scopes to preserve reusable context and flag conflicts.
Instructions
Write a memory. type: episode|fact|insight|skill|decision; source: writing agent id; ns: '_shared' or 'agent-'. key: stable id for fact/insight/skill/decision (enables conflict review). Write only stable facts (preferences, conventions, environment constraints, pitfalls), not session-temporary details; volatile status notes (in-progress work, remaining todos) either carry valid_until or stay out — a stale status memory is worse than none; prefer reusing an existing key over a new entry. valid_from/valid_until: optional ISO dates (YYYY-MM-DD) marking the fact's validity window — once valid_until has passed, the memory is excluded from search results but still readable via memory_get. project: optional lowercase-slug scope tag (lowercase alphanumeric segments joined by dashes) for workspace-specific memories — tagged memories are hidden from searches that do not pass the same project, while untagged (global) memories stay visible everywhere; declare your workspace project per the host usage rules and pass it on every write/search in that workspace. lesson_role: optional 'lesson' or 'avoid' (omit for an ordinary memory) — write a lesson as insight (or a steady decision) and an avoid as decision plus this field; do not invent a memory type or encode the role in the key. links may start with avoid:, fixes:, or contradicts: plus a target id or key; other link strings stay free-form. content is capped at 262144 characters — longer payloads are rejected and nothing is written. Returns the stored memory; conflict: true means a different version with the same key exists and a review entry was queued.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ns | No | _shared | |
| key | No | ||
| type | Yes | ||
| links | No | ||
| source | Yes | ||
| content | Yes | ||
| project | No | ||
| valid_from | No | ||
| lesson_role | No | ||
| valid_until | No |