upsert_document
Create or update a document by stable id. Idempotent: no action on unchanged content; changes append revision with additive tags.
Instructions
Create or update a document in your workspace by stable id — the write half of agent memory. Idempotent: unchanged content writes nothing (outcome "unchanged", no new revision); real changes append a revision to the tamper-evident history. Tags merge additively. Requires an authenticated bm_ key with write access.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Stable document id (lowercase slug: a-z, 0-9, hyphens) | |
| body | Yes | Document body (markdown or plain text) | |
| tags | No | Optional tags — merged additively with any existing tags | |
| type | No | Optional document type (concept, feature, experience, principle, note, policy); defaults to note | |
| links | No | Optional outbound document-id links | |
| title | Yes | Document title |