Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this tutorial, you create a specialized subagent in Agent Canvas with its own instructions, tools, and skills. Subagents handle focused tasks like health reporting, alert triage, or notification delivery. For more information about how subagents work, see Subagents.
Estimated time: 5 minutes
In this tutorial, you learn how to:
- Create a subagent with custom instructions in Agent Canvas
- Assign skills, tools, and hooks to the subagent
- Test the subagent in the dialog and the playground
- Edit and manage the subagent configuration by using the form or YAML
Prerequisites
- An agent created in the Azure SRE Agent portal.
- At least one connector configured, if you want the subagent to use external tools.
Create a subagent
Follow these steps to create a new subagent from the portal.
Open the SRE Agent portal and select your agent.
Select Builder > Agent Canvas.
Select + Create subagent.
The Create a subagent dialog opens with two tabs: Form and YAML.
Fill in the required fields:
Field Example value Subagent name (required) health-check-reporterInstructions (required) "You're a health check reporter. Check Azure resource health for container apps in the production resource group. Summarize healthy, warning, and critical counts. Send the summary via email." Tip
Select Refine with AI above the instructions field to let the agent improve your instructions automatically. Select View AI suggestions to see recommendations for improving instructions, tools, and skills.
(Optional) Configure the remaining fields and sections in the dialog.
Handoff instructions: Describe when another agent should delegate work to this subagent.
Skills: Turn on Enable Skills to let the subagent use skills. Under Allowed Skills, leave the selection empty to allow all skills or select the specific skills the subagent can use. For more information, see Skills.
Advanced settings:
- Handoff subagents: Select other subagents that this subagent can delegate work to.
- Tools: Select Choose tools, and then select the tools the subagent can use. To create custom tools first, see Create a Kusto tool or Create a Python tool. For more information, see Tools.
- Hooks: Select Manage Hooks to add safety and governance controls. For setup steps, see Create and manage hooks in the portal. For more information, see Agent hooks.
- Give access to knowledge base: Turn on this option to let the subagent use documents in the knowledge base.
Select Create.
Your subagent appears as a node on Agent Canvas with any connected tools displayed.
Tip
Before assigning tools, test them individually in the test playground to make sure they return the data you expect.
Test the subagent
After you create your subagent, test it to verify it behaves as expected.
Test from the dialog
In the create or edit dialog, select the test icon in the upper-right corner to open the Test live agent panel. Type a prompt and see how the subagent responds with its current instructions and tools.
Test in the playground
Use the playground for an interactive testing experience with a split-screen layout.
- On the Agent Canvas toolbar, select the Test playground view toggle.
- The split-screen layout shows your subagent's configuration on one side and a live chat on the other.
- Select your subagent, type a test prompt, and verify it behaves as expected.
- Iterate by editing instructions or swapping tools, then test again until the output matches your expectations.
For more information, see Agent playground or Test a tool in the playground.
Edit a subagent
To modify an existing subagent, open its configuration on Agent Canvas.
Select the subagent node, and then select Edit (or double-click the node). The edit dialog opens with all current values prepopulated.
| What to change | Field to update |
|---|---|
| What it does | Instructions |
| Which skills it uses | Skills > Choose skills |
| Which tools it uses | Tools > Choose tools |
| Safety controls | Hooks > Manage Hooks |
Select Save when done.
Edit with YAML
You can view or edit your subagent's configuration as YAML for copying configurations or managing config as code.
Select the YAML tab at the top of the create or edit dialog to switch to YAML mode. Changes in YAML mode sync back to the form view.