Record knowledge
knowledge_writeLessons, dead ends, workflows and skills an organization's agents record and share. A draft is private to you; publishing shares it at a scope you can write. Drafts are purged when their identity ends. Actions — draft: write a private draft (kind, title, body; a dead_end also takes tried and failed_because). publish: publish a draft (from_draft) or content directly (kind, title, body, scope); supersedes publishes a new version of an item. distill: publish several drafts at once (from_drafts, scope). rate: rate an item 1–5 for what you used it for (id, rating, purpose, note). validate: mark an item validated or refuted (id, validation).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | rate, validate: an item id, or the citation search returns for it (knowledge:<id>@v<version>) | |
| body | No | draft, publish: the item's text | |
| kind | No | draft, publish | |
| note | No | rate: a usage note | |
| scope | No | draft, publish, distill: the folder or document it applies to (path or node id). A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. | |
| title | No | draft, publish: a short title | |
| tried | No | draft, publish: dead_end: what was tried | |
| action | Yes | what to do; each action takes the arguments its line names | |
| rating | No | rate: 1 to 5 | |
| reason | No | why you are doing this, in one line (at most 200 characters); recorded with the event and exported with the log | |
| purpose | No | rate: what you used it for | |
| from_draft | No | publish: a draft id | |
| supersedes | No | publish: the item this is a new version of | |
| validation | No | validate: validated or refuted | |
| from_drafts | No | distill: draft ids; repeatable | |
| failed_because | No | draft, publish: dead_end: why it failed | |
| idempotency_key | No | Any unique string you choose for this write, e.g. a UUID. If you retry the call with the same key and the same arguments, the first answer is returned and nothing is done twice. Reusing a key for a different request is refused. Keys are kept 24 hours. | |
| decay_half_life_days | No | draft, publish |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | No | ||
| items | No | ||
| notes | No | ||
| action | Yes | the action that answered | |
| failed | No | ||
| standing | No | ||
| retiringUntil | No |