Skip to main content

Prompts

Workspace map with the Prompts cell highlighted: Models, Knowledge, Prompts, Skills and Tools around the Open WebUI coreWorkspace map with the Prompts cell highlighted: Models, Knowledge, Prompts, Skills and Tools around the Open WebUI core

Reusable slash commands that turn complex instructions into one-click forms.

Prompts let you save frequently used instructions as slash commands. Type /summarize in any chat and the full prompt fires instantly. Add custom input variables and users get a popup form with dropdowns, date pickers, and text fields before the prompt is sent. No one needs to remember the exact wording or structure.

Every change is tracked with full version history. Roll back to a previous version, compare changes, and share prompts across your team with access controls.


Why Prompts?​

Saved prompts in the workspace

Stop retyping the same instructions​

Save the prompt once, use it with /command. Bug report templates, meeting minutes, code reviews, content briefs: anything you type more than twice should be a prompt.

Turn prompts into interactive forms​

Add typed input variables (dropdowns, date pickers, number fields, checkboxes) and users get a clean form instead of editing raw text. Non-technical users can run complex prompts without understanding the syntax.

Version history with rollback​

Every content change creates a new version. Browse the history, preview a version, compare it with the live one, edit it into a new version, set it live or delete it. Each version records who changed what. Untick Set as Production to save a version without making it live. Renaming, re-tagging or changing the command creates no version.

Controlled sharing​

Share prompts with specific users or groups. Public prompts appear in everyone's / suggestions. Private prompts stay in your own workspace. On prompts you can edit, and with the Prompts Sharing permission, Access in the ⋯ menu of the Workspace > Prompts list opens the sharing settings without opening the editor, and each change there is saved right away. Saving a prompt with write access keeps the sharing it already has, including a Public setting you do not have permission to set yourself.


Key Features​

⚡ Slash commandsType /command to insert the full prompt
📋 Input variable formsTyped fields (text, dropdown, date, number, checkbox, and more) generate a popup form
🕑 Version historyFull change tracking with commit messages, rollback, and production pinning
🔄 System variables{{CURRENT_DATE}}, {{USER_NAME}}, {{CLIPBOARD}} auto-replaced at runtime
🔒 Access controlShare with specific users, groups, or make public
🔀 Enable/Disable toggleDeactivate prompts without deleting them
🏷️ TagsOrganize and filter your prompt library

Creating a Prompt​

Navigate to Workspace > Prompts and click Create in the Workspace header.

FieldDescription
NameDescriptive title for identification
TagsCategorize for filtering
AccessControl who can view and use the prompt. Shown to non-admins only with the Prompts Sharing permission
CommandThe slash command trigger (e.g., /summarize)
Prompt ContentThe actual text sent to the model, with variables
Commit MessageOptional description of changes for version tracking

Compare revision, above the prompt content, opens the content next to an empty Proposed revision pane. Paste a revised version there, for example one a model wrote, and click Compare to mark the changes, then step through them with the arrows. Apply to draft puts the right-hand pane into the editor, so drop a change you do not want with Original →, which copies the original text of that change into the right-hand pane. For a change that replaces text, Keep both puts the original text followed by the proposed text into the right-hand pane. Save the prompt afterwards.

Use clear variable names ({{your_name}} not {{var1}}), add descriptive placeholder text, provide default values where sensible, and mark only truly essential fields as :required. Public prompts appear in every user's / suggestions, so be selective about what you make public. Use the enable/disable toggle to shelve prompts you're not actively using.


Variables​

System variables​

Automatically replaced with their value at runtime:

VariableDescription
{{CLIPBOARD}}Content from your clipboard (requires clipboard permission)
{{CURRENT_DATE}}Current date
{{CURRENT_DATETIME}}Current date and time
{{CURRENT_TIME}}Current time
{{CURRENT_TIMEZONE}}Current timezone
{{CURRENT_WEEKDAY}}Current day of the week
{{USER_NAME}}Your display name
{{USER_EMAIL}}Your email address
{{USER_BIO}}Bio from Settings > Account > User Profile (unreplaced if not set)
{{USER_GENDER}}Gender from Settings > Account > User Profile (unreplaced if not set)
{{USER_BIRTH_DATE}}Birth date from Settings > Account > User Profile (unreplaced if not set)
{{USER_AGE}}Age calculated from birth date (unreplaced if not set)
{{USER_LANGUAGE}}Your selected language
{{USER_LOCATION}}Your location. The browser asks for geolocation permission directly, which needs HTTPS. The Interface toggle only controls the location sent with chat requests
{{USER_GROUPS}}Comma-separated list of the groups the user belongs to, including groups inherited through parent groups (empty if none). Resolved from the database only when the placeholder is present, and only in model system prompts and task templates. In a prompt inserted with / it stays literal.

Custom input variables​

Add variables to your prompt content and users get a popup form when they use the slash command.

This syntax only works in prompt content

The syntax on this page applies to the content of a saved prompt. Putting {{name | text:required}} into a model's system prompt does nothing: it declares no field, opens no form, and reaches the model as literal text.

System prompts use chat variables instead, which are the same field types written with a chat.variables. prefix, so the example above becomes {{chat.variables.name | text:required}}.

Simple input creates a single-line text field:

{{variable_name}}

Typed input creates a specific field type with configured properties:

{{variable_name | type:property="value"}}

All custom variables are optional by default. Add :required to make a field mandatory:

{{title | text:required}}
{{notes | textarea:placeholder="Additional context (optional)"}}

Available input types​

TypeDescriptionExample
textSingle-line text (default){{name | text:placeholder="Enter name":required}}
textareaMulti-line text{{description | textarea:required}}
selectDropdown menu{{priority | select:options=["High","Medium","Low"]:required}}
numberNumeric input{{count | number:min=1:max=100:default=5}}
checkboxBoolean toggle{{include_details | checkbox:label="Include analysis"}}
dateDate picker{{start_date | date:required}}
datetime-localDate and time picker{{appointment | datetime-local}}
colorColor picker{{brand_color | color:default="#FFFFFF"}}
emailEmail field with validation{{email | email:required}}
rangeSlider{{rating | range:min=1:max=10}}
telPhone number{{phone | tel}}
timeTime picker{{meeting_time | time}}
urlURL with validation{{website | url:required}}
monthMonth and year (Chrome/Edge only, falls back to text in Firefox/Safari){{billing_month | month}}
mapInteractive map for coordinates (experimental){{location | map}}

Message and Prompt Modifiers​

These modifiers are especially useful for task model prompts (title generation, tag generation, follow-up suggestions) where conversations contain long messages like pasted documents or code.

Prompt truncation​

The {{prompt}} variable supports character-based truncation:

ModifierWhat it does
{{prompt:start:N}}First N characters
{{prompt:end:N}}Last N characters
{{prompt:middletruncate:N}}First half + last half, N characters total

Message selectors vs pipe filters​

The {{MESSAGES}} variable has two distinct modifier types that work at different levels:

Message selectors (colon :) control how many messages to include:

SelectorWhat it doesExample
START:NFirst N messages{{MESSAGES:START:5}}
END:NLast N messages{{MESSAGES:END:5}}
MIDDLETRUNCATE:NFirst N/2 + last N/2 messages{{MESSAGES:MIDDLETRUNCATE:6}}

With 20 messages, {{MESSAGES:MIDDLETRUNCATE:6}} keeps messages 1-3 and 18-20, skipping the 14 in the middle.

Pipe filters (pipe |) truncate the content of each individual message to a character limit:

FilterWhat it doesExample
|start:NFirst N characters of each message\{\{MESSAGES|start:300\}\}
|end:NLast N characters of each message\{\{MESSAGES|end:300\}\}
|middletruncate:NFirst + last half of each message\{\{MESSAGES|middletruncate:500\}\}

Combine both to control which messages are included and how long each one is:

SyntaxWhat it does
\{\{MESSAGES:END:2|middletruncate:500\}\}Last 2 messages, each capped at 500 characters
\{\{MESSAGES:START:5|start:200\}\}First 5 messages, each capped at 200 characters
\{\{MESSAGES:MIDDLETRUNCATE:10|middletruncate:50\}\}First 5 + last 5 messages, each capped at 50 characters
Selectors count messages, not characters

{{MESSAGES:MIDDLETRUNCATE:500}} selects 500 messages. To limit characters per message, use a pipe filter: \{\{MESSAGES\|middletruncate:500\}\}. Without pipe filters, a single pasted document can consume the entire context window.


Version History​

Every save that changes the prompt's content creates a new version. When editing a prompt, the history menu above the prompt content starts on Live, the active production version. Open it to list the versions newest first, each with its commit message and author (hover for the date), and Load more for older ones.

  • Preview any version by clicking it. Its content opens read-only, with the version ID and date underneath.
  • Compare to current shows what differs between that version and the live one: the name and tags side by side, then the prompt content as a diff. The layout menu switches between Split and Unified, and the browser remembers the choice. A change that touches only line endings is reported as Only line endings changed.
  • Edit as new version makes the previewed content editable. Saving creates a new version from it. The Set as Production checkbox beside Save starts unticked here, so the live prompt stays as it is until you tick it.
  • Set as Production restores that version as the active one.
  • Delete in a version's ⋯ menu removes it after you confirm in the Delete Version dialog. The live version cannot be deleted. Versions saved on top of a deleted one are relinked to its parent, so the history stays connected.

Compare to current in the prompt editor, with an older version on the left and the production version on the right in the Split layout

Switching to another version or leaving the editor while you have unsaved changes asks whether to discard them first. Anyone who can view a prompt can open and compare its versions; editing, setting a version live and deleting need write access.

Over the API, GET /api/v1/prompts/id/{prompt_id}/history/diff?from_id=...&to_id=... returns both snapshots, the content diff as a list of lines, name_changed and line_endings_only, which is true when the contents differ only in their line endings.

Migration

Prompts created before the versioning update were automatically migrated with their content preserved as the initial "Live" version. The URL structure changed from command-based to ID-based, so existing bookmarks may need updating. As of v0.5.0, all variables are optional by default.


Examples​

Bug report generator (/bug_report)​

A structured form with required summary, priority dropdown, and reproduction steps, plus optional context fields:

Generate a bug report with the following details:

**Summary:** {{summary | text:placeholder="A brief summary of the issue":required}}
**Priority:** {{priority | select:options=["Critical","High","Medium","Low"]:default="Medium":required}}
**Steps to Reproduce:**
{{steps | textarea:placeholder="1. Go to...\n2. Click on...\n3. See error...":required}}

**Additional Context:** {{additional_context | textarea:placeholder="Browser version, OS, screenshots, etc."}}
**Workaround:** {{workaround | textarea:placeholder="Any temporary solutions found"}}

Please format this into a clear and complete bug report document.

Meeting minutes (/meeting_minutes)​

Date and time pickers, required attendees and agenda, optional decisions and action items:

# Meeting Minutes

**Date:** {{meeting_date | date:required}}
**Time:** {{meeting_time | time:required}}
**Title:** {{title | text:placeholder="e.g., Weekly Team Sync":required}}
**Attendees:** {{attendees | text:placeholder="Comma-separated list of names":required}}

## Agenda / Key Discussion Points
{{agenda_items | textarea:placeholder="Paste the agenda or list the key topics discussed.":required}}

## Decisions Made
{{decisions | textarea:placeholder="Key decisions and outcomes"}}

## Action Items
{{action_items | textarea:placeholder="Action item, assignee, and deadline for each."}}

## Next Meeting
**Date:** {{next_meeting | date}}
**Topics:** {{next_topics | text:placeholder="Items to discuss next time"}}

Please format this into a clean and professional meeting summary.

Title generation (task model template)​

Uses message selectors + pipe filters to keep context small:

Chat history:
<chat_history>
{{MESSAGES:END:2|middletruncate:500}}
</chat_history>

Generate a short title for this conversation.

Sends only the last 2 messages, each capped at 500 characters.


Limitations​

Slash command namespace​

Public prompts appear in every user's / suggestions. Too many public prompts clutter the menu. Use the enable/disable toggle to keep inactive prompts out of suggestions.

The names of the built-in slash commands are effectively reserved: compact, status, fork and model. A prompt with one of those commands still shows in the menu and still works when picked from it, but a user who types it out and sends it gets the built-in command instead of the prompt. Pick a different command name.

Optional by default​

All custom input variables are optional unless marked :required. If your prompt depends on a field, add :required explicitly.

This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.