Docs/Models & AI

User Guide · 2.4.1 Release

System prompt

Choose a default prompt and understand assistant and conversation overrides

Read Markdown
On this page

What it is#

The system prompt defines the AI's persona, tone, and response rules. By default, an assistant's own prompt takes priority, falling back to the global prompt if the assistant prompt is empty. To use both together, turn on Add global prompt at the beginning. If a conversation has its own prompt set, only that conversation prompt is used.

Where to configure it#

Open Settings → Assistant capabilities → System Prompt to edit or disable the global prompt. When disabled, no assistant uses the global prompt, though individual assistant prompts and conversation prompts continue working. Tap Import from file in the top-right corner to load a .md or .txt file directly—headings, lists, and code blocks stay intact with less risk of losing formatting than copy-paste; tap Save after importing for it to take effect.

Clearing the global text and saving restores the default template; if you do not want a global default, turn off Enable Global Default Prompt.

Available variables#

Tap to insert variables while editing; they are replaced with live values when sent:

  • {{current_date}} current date, {{current_weekday}} day of the week, {{current_lunar}} lunar date.
  • {{current_time}} full date (including weekday and lunar date, accurate to the day).
  • {{current_clock}} current time (accurate to the minute).

Assistant environment variables#

Never put API tokens or other secrets inside system prompts, memories, or Skill files. Open Assistants → Edit assistant → Prompt → Variables to add environment variables for that assistant—for example, SILICONFLOW_API_KEY. Variables are isolated per assistant: switching to another assistant never reads or overwrites them.

To reuse variables elsewhere, tap the copy button next to the Environment Variables heading, choose the variables, and pick target assistants. Conflicting variable names keep the target value by default unless you explicitly choose to overwrite. Copying creates independent copies—later edits on either assistant do not sync to the other.

Variables are never injected into model context automatically. Only when you explicitly write {{env.SILICONFLOW_API_KEY}} in an assistant prompt is it replaced with the real value; doing so sends that value to the model provider, so use it only when strictly necessary.

When calling APIs, use host-side credential substitution for network requests, or request provider credentials in the code workspace and call providerFetch. A script's process.env is empty by default and no longer reads sensitive values directly; never write secrets into Skills, chat messages, logs, or tool results.

Environment variables are included with selected assistants in backups, exports, and Nearby Transfer—including when choosing "Share content." The review page notes that the file contains plaintext credentials; if you do not want to share them, deselect that assistant or share plain text instead, and never attach export packages to feedback tickets.

Assistant prompt workspace#

In Assistants → Edit assistant → Prompt, Prompt sets the assistant's role and instructions, Rules manages supplemental injection rules, Opening configures the opening message, and Variables manages assistant environment variables. After editing Prompt, Rules, or Opening, tap Save in the top-right corner; environment variables save separately and take effect immediately. See "How do I configure prompt injection rules?" and "How can an assistant start the conversation?" for details.

Add global prompt at the beginning#

Turn on Add global prompt at the beginning beneath the assistant prompt and save. Before sending, variables in both prompts are resolved first, and the global prompt is then placed before the assistant prompt separated by one blank line as a single system prompt. This simply concatenates the text—the AI does not summarize, merge, or rewrite it. For example, if the global prompt says "Answer concisely" and the assistant prompt says "Help me practice for an interview," the combined prompt sent is "Answer concisely", a blank line, and then "Help me practice for an interview."

This toggle is set per assistant and defaults to off: when off, the assistant prompt takes priority; when the assistant prompt is blank, an enabled global prompt is always used regardless of this toggle. If the global prompt is disabled, nothing is prepended. If a conversation has its own prompt set, only the conversation prompt is used.

Time variables and caching#

The system prompt sits at the very start of every request. Whenever any time variable inside it changes, the model's prefix cache must be rebuilt from scratch—slowing replies and increasing token costs. {{current_clock}} changes every minute and has the biggest impact; day-level variables like {{current_date}} also invalidate the cache across midnight. For this reason, the default template no longer includes time variables. When the AI needs to know the time, enable the get_time_info tool in Tool Services so the model fetches it on demand, or turn on Provide time info in the assistant editor rather than embedding time variables in the system prompt.

Scope of effect#

Changes take effect starting from the next message sent, including in existing conversations; replies already generated remain unchanged. How strictly a model follows system prompts varies by model.

Explicitly enabled prompt injection rules, tools, memory, skills, knowledge bases, and time reminders still add their own content as configured. To test a base prompt in isolation, turn those features off and start a new conversation so history does not influence the output.

Per-conversation override#

Since version 1.5.0, you can override the system prompt for a single chat: open the chat's top-right More menu → Edit conversation prompt, enter the prompt for this chat, and save. It applies only to the current conversation without affecting any others.

When a conversation prompt is set, neither the assistant prompt nor the global prompt is used. Clearing it restores the assistant's original settings, including Add global prompt at the beginning.

Pure mode (send conversation text only)#

If you want to strip away all extra context to test or compare a model's raw behavior, turn on Settings → Assistant capabilities → System Prompt → Pure mode (send conversation text only).

  • Scope: Applies to all regular conversations on this device (dedicated management sessions such as Provider Management, Image Recipe onboarding, and Theme Designer are unaffected).
  • What is skipped: When enabled, sending messages omits global, assistant, and conversation prompts, injection rules, built-in and MCP tools, memory, skills, knowledge bases/worldbooks, mounted folders, time reminders, and context summaries—sending only the raw conversation messages to the model.
  • Indicator and turning off: While active, the chat composer toolbar automatically hides inactive controls (web search, tools, skills, MCP, mounted folders, remote connections) and displays a banner above the input bar. Tap Turn off on the banner (or disable it back in System Prompt settings) to restore your original configuration immediately.