Draft Record
engramic_record_draftStage an event for later publication and receive the topic context bundle that should inform your decision to publish.
This is pass 1 of two. The draft is INVISIBLE to the graph — other agents and queries do not see it. You see what the graph already knows about the topic (recent decisions, open gaps, your assigned gaps, prior resolutions, active contradictions) and can use that context to decide whether to publish as-is, publish with edits, or abandon the draft.
NOT FOR TOPIC CONTENT: an event records that something HAPPENED (a decision reached, an action taken, a discovery made) as a short label and detail. It is NEVER the carrier of substantive content that belongs ON a topic — a topic's description, its details, or researched facts. If the user asked you to add to, enrich, or update a topic, edit the topic itself with the update tools (update_concept / update_goal / etc. in a workflow, or the engramic_update_* MCP tools); record at most a brief action event alongside that edit, never in place of it.
WHEN TO DRAFT:
ALWAYS use this instead of any single-pass record path. Engramic moved to two-pass; the previous one-shot tool is removed.
Use the returned bundle to check for: prior resolutions on the same topic (don't re-litigate), open gaps you might be answering (a 'resolves' reference to the gap, added at publish time, answers it if you may edit it), active contradictions you might be addressing.
INPUT: Same shape as the legacy record payload — type/label/topics required, plus optional detail, actorId, references, etc.
OUTPUT:
draftId: short id used to publish (or abandon, or let it expire)
reused: always false; every call stages a fresh draft
contextBundle: full TopicContextBundle per @engramic-ai/core wire contract
CONSTRAINTS:
actorId is the ATTRIBUTION (who the published event is credited to) and may be a different named identity you are recording on behalf of. The draft is OWNED by your session/operator identity, not by actorId.
Same operator; several drafts. Each call stages a fresh draft with its own draftId, so you can draft several records and publish each one. Up to 10 drafts can wait at once; an 11th returns DRAFT_LIMIT naming your oldest draft. engramic_record_get_draft lists your waiting drafts; engramic_record_abandon drops one.
TTL: 4 hours. Expired drafts are silently dropped.
dueAt is for actions only: an ISO 8601 date (2026-10-31, meaning the end of that day) or datetime. Any other type with dueAt returns VALIDATION_ERROR.
References to other records use engramic://e_ (or the bare e_); to a topic, engramic://t_. They are stored as /events/e_ and /topics/t_.
The anchor topic (topics[0]) must already exist — auto-create at draft time is not supported because the bundle needs a real topic to query.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Type of event to record. (`question` was removed in #300 — record gap topics for open questions instead.) | |
| dueAt | No | Actions only: when the action is due, as an ISO 8601 date (2026-10-31) or datetime. | |
| label | Yes | Short summary (2-10 words) | |
| detail | No | Full reasoning or context | |
| domain | No | Parent domain for any newly created topics at publish time (defaults to "Uncategorised") | |
| source | No | For discovery events: who made the discovery | |
| topics | Yes | Topic IDs or labels. topics[0] anchors the context bundle and must already exist. | |
| actorId | No | Attribution: actor ID or name the published event is credited to (may be a different identity you record on behalf of). Defaults to the session/operator actor if omitted. An unknown person name creates a pending person actor; they are linked when they join. For an action, this is the person who owns it. | |
| subtype | No | For discovery events: the nature of what was discovered | |
| agreedBy | No | For a decision, the people who agreed it, the user included when they agreed. | |
| occurredAt | No | ISO8601 timestamp when the event occurred (defaults to publish time) | |
| references | No | External or internal references to attach. Link another record as engramic://e_<id> and a topic as engramic://t_<id>. | |
| participantIds | No | Other actor IDs or names involved | |
| optionsConsidered | No | For decisions: alternatives considered |