Template
A template is a Canvas — a piece of reusable prompt logic. Each template has:- A name and description — surfaced to agents in
list_templatesso 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 likedaily-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.
Block
A block is a structural element inside a template body. Canvas supports the blocks you’d expect from any rich editor:
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.
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.
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:
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:generate_template({ key: "user-templates/opportunity-readout-3p", opportunityId: "..." }), Deal Brain:
- Resolves the template (User > Org > System scope precedence).
- Verifies it’s
Active. - Binds the opportunity to the
datavariables. - Returns the system prompt plus the rendered body, ready to send to the model.
Variables, deep dive
Data variables, instruction variables, and the catalog.
Publishing & scope
The Draft → Active workflow and how scope precedence resolves.

