| Duration | Level | Prerequisites |
|---|---|---|
| 10 min | Beginner | Lab 06 complete (agent cloned into the workspace) |
Overview
The author sub-agent translates a natural-language request into properly-shaped Copilot Studio YAML. Ask it to add a Hello World topic and it writes a new file at HelloWorldAgent/topics/HelloWorld.topic.mcs.yml containing an OnRecognizedIntent trigger and a SendActivity action. The generated YAML follows the schema documented in reference/bot.schema.yaml-authoring.json so you can edit it by hand later.
Learning objectives
- Author a YAML topic from a natural-language prompt to
@copilot-studio:copilot-studio-author. - Open the generated file and identify the
OnRecognizedIntenttrigger and theSendActivityaction. - Optionally validate every topic in the agent with
@copilot-studio:copilot-studio-advisor.
Exercise 7.1 — Author the topic
-
In your
copilotsession, run:@copilot-studio:copilot-studio-author Create a new topic called "Hello World" that triggers on the phrases "hello", "hi", and "hello world", and replies with: "Hello, world! I'm a Copilot Studio agent authored from VS Code via the Copilot CLI plugin." -
The sub-agent writes a new file at:
HelloWorldAgent/topics/HelloWorld.topic.mcs.yml

Exercise 7.2 — Inspect the generated YAML
- Open
HelloWorldAgent/topics/HelloWorld.topic.mcs.ymlin the VS Code editor. -
Confirm the file shape matches the expected pattern:
kind: AdaptiveDialog beginDialog: kind: OnRecognizedIntent id: main intent: triggerQueries: - hello - hi there - say hello - hello world actions: - kind: SendActivity id: sendHello activity: "Hello, world! I'm running from a YAML topic authored via GitHub Copilot CLI." - The exact wording of
triggerQueriesandactivitymay differ slightly from the snippet above because the sub-agent rewrites your natural-language request, but the structure (oneOnRecognizedIntenttrigger plus oneSendActivityaction) is the contract.
Exercise 7.3 — (Optional) Validate every topic with the advisor
-
Still inside the
copilotsession, run:@copilot-studio:copilot-studio-advisor Validate all topics in my agent -
The advisor reports validation diagnostics. Fix any issues it reports before continuing to Lab 08.
[!TIP] If the advisor reports a
kindname that “cannot be found”, that is usually a casing mismatch in the YAML. Ask the advisor to suggest the canonical name, or check the schema linked in the References.
Verification Checkpoint
Before proceeding, verify:
HelloWorldAgent/topics/HelloWorld.topic.mcs.ymlexists in your workspace.- The file contains an
OnRecognizedIntenttrigger withhellointriggerQueries. - The file contains exactly one
SendActivityaction whoseactivityis the greeting string.
Next Steps
Proceed to Lab 08 — Push and publish.