Quick Task Definition
A Quick Task Definition describes a Quick Task: a standalone prompt, together with the session presets, used to start an AI conversation with a single click. Unlike the prompts embedded in an agent, a Quick Task is not bound to any agent, and it can be featured to the whole org and pinned by users.
A Quick Task is either:
- shared — an org-level Quick Task managed by org admins, which can be featured to all users on the Home page; or
- personal — owned by a user, and only available to that user.
The name and description of a Quick Task belong to the Quick Task resource itself, and are therefore not part of the definition below.
Managing Quick Tasks from CLI
Quick Tasks are managed with cs llm quick-task (alias qt), using a YAML file holding the definition described on this page:
cs llm quick-task create fix-test quick-task.yaml --description 'Fix a failed Go test'
cs llm quick-task create fix-test quick-task.yaml --shared # an org-level shared Quick Task (admin only)
cs llm quick-task update fix-test quick-task.yaml
cs llm quick-task list # shared and personal Quick Tasks
cs llm quick-task show fix-test
cs llm quick-task remove fix-test
A Quick Task is referenced by name in the same way as an agent:
NAME— a personal Quick Task if it exists, otherwise a shared one;my:NAME— a personal Quick Task only;shared:NAMEororg:NAME— a shared Quick Task only.
The tiles on the Home page are managed with:
cs llm quick-task pin fix-test # pin to my Quick Tasks, listed after the featured ones
cs llm quick-task unpin fix-test
cs llm quick-task feature fix-test # feature a shared Quick Task to all users (admin only)
cs llm quick-task unfeature fix-test
To start a conversation from a Quick Task:
cs llm session run --quick-task fix-test --input TEST=TestCreateSandbox
The session presets of the Quick Task are applied, and flags specified explicitly override them. Add --dry-run to print the expanded prompt and the effective presets without sending them.
Structure Overview
prompt: # The prompt, optionally with inputs
inputs:
- name: ...
body:
language: mustache
script: ...
context: # Session presets for a new conversation
agent: ...
task: {}
authorized_templates:
enabled: true
allowed:
- pattern: ...
model_mapping:
mappings:
generic: fast
execution_control: # Execution presets for a new conversation
approval_mode: ALL_APPROVED
icon: mui:BugReport # The icon shown on the tile
disabled: false
Top-Level Fields
| Field | Type | Description |
|---|---|---|
prompt |
Snippet | The prompt inserted into the composer. It is expanded by the client before sending, so the agent only sees plain text. When it defines inputs, a form is shown to collect them. |
context |
Context | The session context to preset when the Quick Task begins a new conversation, saving the user from picking options. |
execution_control |
ExecutionControl | The execution control to preset when the Quick Task begins a new conversation. |
disabled |
boolean | Takes the Quick Task out of use without deleting it — for example, while it is being revised. A disabled Quick Task is skipped in the featured and pinned lists and can't be used, but it is still listed to those who can update it. |
icon |
string | Distinguishes the Quick Task at a glance where it is offered, such as on the Home page. Uses the same format as the template icon customization (crafting.dev/sandbox/icon): a built-in name like docker, or mui:NAME for a Material icon like mui:BugReport. If unspecified, the default Quick Task icon is shown. |
The presets in context and execution_control only apply when the Quick Task begins a new conversation. They are ignored when the prompt is inserted into an existing message or conversation, as that must not change the session.
Context
The session context to preset. Only the fields below are allowed; the other fields of a session context describe a running session (such as the target sandbox) and are rejected.
| Field | Type | Description |
|---|---|---|
agent |
string | The AI Agent to start the conversation with. It is only a default, which the user can change. If empty, the default agent is used. The name is resolved in the same way as --agent of cs llm session run: a personal agent if it exists, otherwise an org-level one, and my: or org: restricts the scope. Only the owner's personal agents can be referenced from a personal Quick Task. |
task |
Context.Task | If specified, the conversation is started as an autonomous task, which runs without human interaction and is archived right after completion. |
authorized_templates |
Context.AuthorizedTemplates | The policy limiting the templates which can be used by the agents. |
model_mapping |
ModelMapping | Remaps the models used by the conversation. Every entry is validated against the org's LLM configuration. If unspecified, the mapping of the agent applies, if any. |
Context.Task
| Field | Type | Description |
|---|---|---|
labels |
map[string]string | Task specific labels. |
interactive |
boolean | If true, the session is started interactively, but owns the resources created from it. It is not archived upon completion, so further conversations are possible, and it is subject to the auto archiving policy of the org. The resources are not claimed until the session is archived or deleted. |
initiator |
object | The user who initiated the task, with id (the user ID) and name (the name or email for display). It is usually recorded by the system, rather than preset. |
Example — an autonomous task:
context:
task:
labels:
kind: triage
Context.AuthorizedTemplates
The policy defining which templates can be used by the agents, matched by template name. Once the policy is enabled: when allowed is non-empty, templates are denied by default and only matching ones are allowed; when allowed is empty, all templates are allowed by default. Templates matching excluded are then denied.
| Field | Type | Description |
|---|---|---|
enabled |
boolean | Activates the policy. When false, all templates are allowed, regardless of allowed and excluded. |
allowed |
SimpleNameMatcher[] | Templates allowed to be used. |
excluded |
SimpleNameMatcher[] | Templates excluded from use. |
Example:
context:
authorized_templates:
enabled: true
allowed:
- pattern: 'backend-*'
excluded:
- regexp: '.*-legacy$'
ExecutionControl
| Field | Type | Description |
|---|---|---|
approval_mode |
enum | How tool calls are approved: DEFAULT — request the user's approval when needed; ALL_APPROVED — approve everything automatically. |
streaming |
object | The streaming mode when calling LLM APIs, with a single boolean field enabled. |
Example:
execution_control:
approval_mode: ALL_APPROVED
streaming:
enabled: true
Full Example
A shared Quick Task that asks for a failing test and a sandbox, and starts the coding agent with everything approved automatically:
prompt:
title: Fix a failed test
inputs:
- name: TEST
title: Test name
placeholder: e.g. TestCreateSandbox
required: true
text: {}
- name: sandbox
title: Sandbox
required: true
reference:
kind: SANDBOX
body:
language: mustache
script: |
In sandbox {{sandbox}}, run the Go test {{TEST}},
find the root cause of the failure and fix it.
context:
agent: coding
authorized_templates:
enabled: true
allowed:
- pattern: 'backend-*'
execution_control:
approval_mode: ALL_APPROVED
icon: mui:BugReport
Create it, and feature it to everyone in the org:
cs llm quick-task create fix-test quick-task.yaml --shared --description 'Fix a failed Go test'
cs llm quick-task feature fix-test
See Also
- Quick Task — the concept behind this definition
- Prompt Templating — prompts with inputs filled in by the user
- AI Agent Definition — the
Snippetand input field types used byprompt - LLM Configuration Definition — featuring shared Quick Tasks to all users
- Agentic Sessions — the conversations a Quick Task starts