The Copilot section provides a dedicated interface for generating content for a specific field. Unlike the Panel view button which targets multiple fields at once, the section focuses on a single field with additional features: persistent prompts saved between sessions, immutable prompts for locked workflows, and automatic file context on file pages.
files: auto to automatically include the current image or PDF as context – ideal for generating alt text, captions, or descriptions.Add a Copilot section to any blueprint by specifying the target field:
sections:
content:
type: fields
fields:
blocks:
label: Content
type: blocks
copilot:
type: copilot
field: blocks
The Panel will display a collapsible Copilot interface below your fields:

Click on the arrow to expand the accordion, start entering your prompt, and generate content for the specified field by clicking the Generate button:

By default, prompts are saved to local storage and remembered between sessions. Each section has its own storage based on its position in the blueprint.
To disable storage:
sections:
copilot:
type: copilot
field: blocks
storage: false
If you've modified a predefined prompt, click the Reset button (circular arrow icon) to restore the original.
After generating content, an Undo button appears to revert to the previous content.
Use Kirby Query Language to pull prompts dynamically from page fields:
sections:
copilot:
type: copilot
field: blocks
userPrompt: "{{ page.customPrompt.value }}"
This lets content editors define their own prompts in a dedicated field.
Sections support shared options (label, userPrompt, systemPrompt, icon, theme, logLevel) documented in the View Button & Field Configuration page, plus the following section-specific options:
field StringRequired. Specifies which field to generate content for. This should be the name of a field defined in the same blueprint.
sections:
copilot:
type: copilot
field: blocks
editable BooleanControl whether users can edit the prompt. Setting it to false is useful if a specific userPrompt should always be used without modifications.
Default: true
sections:
copilot:
type: copilot
field: content
userPrompt: Write a technical article about the topic "{title}"
editable: false

files Boolean | StringContext is key to relevant AI-generated content. This option enables file attachments for providing context to the AI.
Default: true
Options: true, false, "auto"
To disable file attachments and prevent users from adding files, set the files property to false:
sections:
copilot:
type: copilot
field: blocks
files: false

On a Kirby file page, setting files: auto pre-selects the current file as context for the user prompt. This is useful for generating metadata like alternative text or descriptions based on the image or PDF file that has already been uploaded to the Panel:
sections:
copilot:
type: copilot
field: alt
# Use the uploaded file as context
files: auto
# Optional: Provide a predefined user prompt
userPrompt: Write an alternative text for the provided image. Use a maximum of 10 words.
# Optional: Disable the editing of the user prompt
editable: false
The section above will use the current file of a Kirby file model as context for the user prompt:
open BooleanSet the initial state of the prompt input accordion in sections.
Default: false (closed)
sections:
copilot:
type: copilot
field: content
open: true
storage BooleanEnable or disable local storage for saving user prompts in the browser. When enabled, prompts are remembered between sessions.
Default: true
sections:
copilot:
type: copilot
field: content
storage: false
size StringControls the size of buttons (Generate, Undo, Redo) in the Copilot section interface.
Default: md
Options: xs, sm, md, lg
sections:
copilot:
type: copilot
field: content
size: lg
help StringProvide additional help text or instructions for the Copilot section.
sections:
copilot:
type: copilot
field: blocks
help: |
Example: Write a summary of this page and include the contents of {blocks}.