Create a new agent
cs_create_agentCreates a new agent workspace on disk, with optional live environment bootstrap and solution assignment. Choose classic or CLI authoring modes to scaffold, import, and sync.
Instructions
pac copilot init: create a new agent workspace on disk. Without 'environment' it is a local scaffold (no sign-in). With 'environment' it also creates the live agent and connects the workspace (needs pac auth profile and confirm: true). With 'solutionName' the agent is created inside that solution (existing unmanaged solution, or a new one with createSolution: true) via init, pack, import and clone; without it, pac puts the agent in a solution named after the agent. authoringMode 'classic' is the standard harness (topics, evaluations); 'cli-copilot' is the GitHub Copilot harness.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Agent display name | |
| confirm | No | Required to actually perform a change in a live environment. Without it the tool returns a dry run. | |
| template | No | classic only | |
| background | No | Run in the background and return a jobId immediately, then poll cs_job_status. MCP clients cut a tool call off after about 60 seconds; this operation can take much longer, and without this the work is orphaned rather than cancelled. | |
| projectDir | No | Folder for the agent's files, new or empty. Omit it to be offered one named after the agent. | |
| schemaName | No | ||
| environment | No | Environment id or URL to bootstrap into (creates a live agent) | |
| instructions | No | ||
| solutionName | No | Unique name of the solution to create the agent in (requires environment) | |
| authoringMode | No | ||
| createSolution | No | Create solutionName if it does not exist | |
| publisherPrefix | No | Publisher prefix, 2-8 lowercase letters or digits: it becomes part of every component's schema name and must match the publisher of the solution the agent lands in. Omit it to be shown the publishers in the environment and what the choice decides. |