---
title: "System Prompt"
description: "Ships with a default that adapts to the target field, current selection, and attached files – override it globally or per blueprint."
canonical_url: "https://kirby.tools/docs/copilot/configuration/system-prompt"
---

# System Prompt

> Ships with a default that adapts to the target field, current selection, and attached files – override it globally or per blueprint.

While the user prompt instructs the AI model *what* to generate, the system prompt instructs the AI model *how* to generate content. It provides structural guidance for the generation process.

<callout color="info" icon="i-ri-sparkling-line" to="/docs/copilot/prompt-dialog/skills">

For reusable, user-invoked prompt fragments – tone, style, house rules – see **Skills**.

</callout>

## Default System Prompt

Kirby Copilot ships with a well-crafted system prompt that handles most use cases out of the box. Manual customization is rarely necessary.

The default prompt automatically adapts to:

- The **target field type** (plain text, Markdown, or rich-text)
- **Selected text** in writer or textarea fields (preserved as context)
- **Attached files** like PDFs (text is extracted when the PDFs total more than 50 MB)

```txt
You are a content assistant.

When <response_format> is provided, format your response as:
- "text": Plain text only, no formatting syntax.
- "markdown": Raw Markdown, no code fence wrappers.
- "rich-text": Use double newlines to separate paragraphs. For inline formatting, use HTML tags (<strong>, <em>, <code>, <a href="...">, etc.). Do NOT wrap paragraphs in <p> tags.

When <selection> is provided, use it as context for your response. Preserve any formatting (bold, italic, links, etc.) present in the selection unless the task explicitly requires different formatting.

When <reference_page> is provided, use it as reference material. Draw on its structure, style, or content as instructed by the user.
```

## Response Formats

The response format is determined automatically based on how you trigger AI generation:

<table>
<thead>
  <tr>
    <th>
      Trigger
    </th>
    
    <th>
      Response Format
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        textarea
      </code>
      
       toolbar button
    </td>
    
    <td>
      <code>
        markdown
      </code>
    </td>
    
    <td>
      Raw Markdown without code fences
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        writer
      </code>
      
       toolbar mark
    </td>
    
    <td>
      <code>
        rich-text
      </code>
    </td>
    
    <td>
      Double newlines between paragraphs, inline HTML tags
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        blocks
      </code>
      
       / <code>
        layout
      </code>
      
       fields
    </td>
    
    <td>
      –
    </td>
    
    <td>
      <a href="/docs/copilot/advanced/blocks-and-layouts">
        Schema-based generation
      </a>
      
       (no format directive)
    </td>
  </tr>
</tbody>
</table>

<note>

For blocks and layout fields, Copilot uses schema-based object generation, which supports all custom block types defined in your project.

</note>

## Customizing the System Prompt

In most cases, the default system prompt is sufficient. To override it globally:

```php [config.php]
return [
    'johannschopplich.copilot' => [
        'systemPrompt' => 'Your custom system prompt here…'
    ]
];
```

You can also override the system prompt per blueprint in [view button](/docs/copilot/configuration/local#systemprompt) configurations.

## Inline Suggestions Prompt

The [inline suggestions feature](/docs/copilot/usage/inline-suggestions) uses a separate, immutable system prompt optimized for autocompletion. It cannot be customized.

---

Every page of this site as Markdown: <https://kirby.tools/sitemap.md>
