Skip to main content
Canvas has five concepts. Once you understand them, the editor and the API both become obvious.

Template

A template is a Canvas — a piece of reusable prompt logic. Each template has:
  • A name and description — surfaced to agents in list_templates so they can pick the right one.
  • A key — a stable identifier (user-templates/my-deal-readout, drafts/follow-up, or one of Deal Brain’s system keys like daily-brief). Agents call templates by key.
  • A body — the structured content, written as blocks and variable tokens.
  • A scope — who can see it.
  • A status — whether it’s published.
You can think of a template as a typed function: variables are its inputs, blocks describe how to render, and the agent invocation is the call.

Block

A block is a structural element inside a template body. Canvas supports the blocks you’d expect from any rich editor:
BlockWhen to use
ParagraphDefault. Free prose.
Heading (H1–H3)Section the output.
Bulleted list / Numbered listEnumerate items. Lists support nesting and auto-format on enter/backspace.
BlockquotePull-quote or callout.
Horizontal ruleVisual section break.
Every block has a drag handle on the left edge. Drag to reorder. Press enter to add a block below; backspace at the start of an empty block to merge with the one above.
HTML insertion (paste-from-web with formatting) is intentionally disabled in the current Canvas release pending a security review. Plain-text paste works as expected.

Variable token

A variable token is an inline placeholder. Type # anywhere in the editor to open the picker. Variables come in two flavors:

Data variable

A value pulled from your Deal Brain data layer at render time. Examples: opportunity name, account name, current stage, last meeting summary, any custom field you’ve defined.Renders inline as a blue chip in the editor. At render time the chip is replaced with the live value.

Instruction variable

A model directive — not data. Examples: “Write 3–5 sentences in a confident tone”, “Do not invent participants not present in the transcript”, “Limit to bullet points; no prose.”Renders as a chip with an instruction icon. At render time the chip becomes a hidden directive to the LLM, not literal output.
See Variables for the full catalog and authoring patterns.

Scope

A template’s scope controls who can see and call it. There are three scopes, in precedence order:
1

System (Preset)

Authored and maintained by Deal Brain. Shipped to every workspace. Read-only — you can clone a System template into your Organization or User scope to customize it, but you can’t edit the System version directly.Examples: daily-brief, meeting-debrief, draft-follow-up.
2

Organization (Team)

Authored by anyone in your organization. Visible to everyone in the org. Used to standardize how the team writes briefs, debriefs, and outbound — “every AE in our org uses this readout template.”An Organization template with the same key as a System template overrides the System version for everyone in the org.
3

User (Personal)

Authored by an individual, visible only to that individual. Use this for personal experimentation, drafts, and “my own way” templates.A User template with the same key as an Organization or System template overrides the higher-scope version for that user only.
Precedence: User > Organization > System. When an agent calls generate_template by key, Deal Brain resolves the most-specific scope visible to that user.

Status

A template’s status controls whether it’s discoverable and callable:
StatusWhat it means
DraftAuthor-only. Invisible to list_templates. Cannot be rendered by agents. Use draft while you’re iterating.
ActivePublished. Visible to list_templates and callable by generate_template.
Switching from Active to Draft removes the template from agent discovery without deleting it — useful for temporarily pulling something while you fix it.

How they fit together

A complete template combines all five:
Template:        "Opportunity readout (3-paragraph)"
Key:             user-templates/opportunity-readout-3p
Scope:           User
Status:          Active
Body (blocks):
  ─ Paragraph: "Deal: {{opportunity name}} with {{account name}}, stage {{current stage}}."
  ─ Paragraph: "{{instruction: Summarize the last meeting in 2 sentences.}}"
  ─ Paragraph: "{{instruction: List next-step action items as a bulleted list.}}"
When an agent calls generate_template({ key: "user-templates/opportunity-readout-3p", opportunityId: "..." }), Deal Brain:
  1. Resolves the template (User > Org > System scope precedence).
  2. Verifies it’s Active.
  3. Binds the opportunity to the data variables.
  4. Returns the system prompt plus the rendered body, ready to send to the model.
Next, see how each piece works in detail:

Variables, deep dive

Data variables, instruction variables, and the catalog.

Publishing & scope

The Draft → Active workflow and how scope precedence resolves.