Generate agent instructions with an AI Builder prompt
cs_generate_instructionsGenerates an agent's system prompt from a brief covering purpose, audience, tone, and boundaries, then optionally writes it into the agent's instruction file.
Instructions
Write the agent's instructions for it - the system prompt that decides how it answers. Builds a brief from purpose, audience, tone, capabilities, boundaries and examples, send it to an AI Builder prompt or model (pac copilot model predict; pick one with cs_list_prompts), and return the generated instructions. With apply: true the text is written into the agent's instructions (agent.mcs.yml, or settings.mcs.yml for cli-copilot). Pass currentInstructions/changeRequest (or refine: true to read the workspace) to revise existing instructions instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tone | No | ||
| apply | No | Write the result into the agent instructions | |
| refine | No | Revise the workspace's current instructions using changeRequest | |
| modelId | No | ||
| purpose | No | What the agent is for; required unless refining | |
| audience | No | ||
| examples | No | ||
| language | No | ||
| inputMode | No | ||
| modelName | No | Full or partial AI Builder model / prompt name | |
| workspace | No | Path to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory. | |
| boundaries | No | ||
| environment | No | Environment id or URL. Defaults to the active pac auth profile. | |
| capabilities | No | Default: derived from the workspace (topics, knowledge, tools) | |
| changeRequest | No |