Skip to content

Prompt ​

Overview
What it isA role description, used as an agent's system prompt
CLIagt prompt
Agent toolsresource_* with kind: "prompt"
Web consoleResources → Prompt; Role prompt in the agent form
Fileprompts/<category>/<name>/PROMPT.md
Crateagt-prompt

What it does ​

A prompt defines an agent's role: what it is responsible for, who it works with, and when it should stay quiet. Several agents can share one prompt; editing it changes all of them from their next run.

agt ships two prompts:

PromptPurpose
default/defaultA minimal general-purpose prompt. Cannot be deleted.
default/leadKnows the whole framework and can build and run a team. See Build a team with a lead.

agt init creates both, and never overwrites a prompt that already exists.

When a new version of agt improves default/lead, your home gets it the next time the scheduler starts (agt web or agt schedule run), as long as you never edited that prompt. An edited lead prompt is left alone; to take the new version, copy crates/agt-prompt/src/lead.md from the release over prompts/default/lead/PROMPT.md.

How to use it ​

Web console: Resources → New resource → Prompt, or Write a new one (新写一份) in the agent form. Prompts show a 2,000-character preview that you can expand.

CLI:

bash
agt prompt create reviewer --text 'You review code for correctness...'
agt prompt update reviewer --file ./reviewer.md
cat reviewer.md | agt prompt update reviewer --stdin
agt prompt read reviewer

Agent tools:

json
{"kind":"prompt","reference":"reviewer","create":true,"data":{"text":"You review code..."}}

Common parameters ​

ParameterMeaning
--text / --file / --stdinWhere the prompt text comes from (exactly one)

All parameters ​

agt prompt create <name> and agt prompt update <name> ​

OptionMeaning
--text <text>Prompt text
--file <path>Read the text from a file
--stdinRead the text from standard input
--category <c>Category (default default)

Give exactly one of --text, --file and --stdin. Update replaces the whole text.

Other commands ​

CommandMeaning
read <ref>Print the prompt text
list, info, delete, categorySee Resources

File: PROMPT.md ​

Plain Markdown. The whole file is the prompt.

Tool fields (resource_write, kind: "prompt") ​

FieldMeaning
textThe full prompt text

Writing good prompts ​

  • State the role, the people and agents it works with, and what "done" means.
  • In groups, say when to answer exactly [[silent]], so the agent does not reply to everything.
  • Describe the tools it should use for important actions, for example task_request for work that must produce a result.
  • Agent: attaching a prompt to an agent
  • Skill: reusable instructions added on top of the prompt

Released under the MIT License.