On this page
Sommatic Docs
Open portal

Prompt templates

A prompt template keeps instructions, a template body with placeholders, its variables, the expected output fields and examples in one record. The ai.prompt node fills it with workflow data.

View as Markdown
Open in

A prompt template takes the prompt out of the workflow. Whoever tunes the wording edits the template; the workflow keeps pointing to the same record and picks up the change on its next run.

What a template holds

FieldWhat it is
slug, name, descriptionStable key and labels.
organization_idOwner organization.
llm_provider_idThe LLM provider the template is written for.
language, formatLanguage of the prompt and format of the expected answer.
system_instructionsThe system part of the prompt.
template_bodyThe prompt text, with placeholders such as {{ customer_name }}.
variablesThe placeholders the body expects.
output_fieldsThe fields the answer should contain.
style_guidelinesA list of style rules.
examplesWorked examples of input and expected output.
tags, is_systemLabels, and whether the template is a system template.

Statuses: enabled, review, deprecated and archived.

Variables

Each entry of variables describes one placeholder:

JSON
{
  "name": "customer_name",
  "type": "string",
  "description": "Name used in the greeting",
  "required": true,
  "default_value": "customer",
  "allowed_values": []
}

Output fields and examples

An output field has name, type, description and required. An example has inputs, expected_output and notes. They document the contract of the template for whoever writes or reviews it.

Fill a template in a workflow

The ai.prompt node reads a template and returns the finished prompt.

  1. Set template_id to the id of the template.
  2. Pass variables, an object whose keys match the placeholders.
  3. The node replaces every {{ key }} of template_body (spaces inside the braces are allowed) with its value.

With this template body:

Summarize the request from {{ customer_name }} in {{ language }}, in three bullet points.

and this node configuration:

JSON
{
  "template_id": "<prompt-template-id>",
  "variables": {
    "customer_name": "{{ $json.sender.name }}",
    "language": "Spanish"
  }
}

the node returns:

JSON
{
  "prompt": "Summarize the request from Ana Ruiz in Spanish, in three bullet points.",
  "config": {
    "provider": "<llm-provider-slug>",
    "model": "<deployment-name>",
    "language": "<template-language>",
    "format": "<template-format>"
  }
}

config.provider and config.model come from the template’s LLM provider (its slug, and its deployment_name or default_parameters.model); config.language and config.format come from the template. The next node reads the prompt with {{ $json.prompt }}.

Manage templates

In the portal, go to Advanced → Cognitive Infrastructure → Prompt Template. Through the API, use /cognitive-infrastructure/cognitive-assets/prompt-template/ (see the API reference).

Next steps

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs