skills/add-other-agents/SKILL.md
Add child agents, connected agents, or other multi-agent patterns to a Copilot Studio agent. Use when the user asks to create a sub-agent, child agent, connected agent, or call another agent.
npx skillsauth add microsoft/skills-for-copilot-studio skills/add-other-agentsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Add multi-agent capabilities to a Copilot Studio agent. Two patterns are supported:
| Pattern | Use when | What it creates |
|---------|----------|----------------|
| Child agent | The agent needs a specialist sub-agent owned by the same parent | AgentDialog in agents/ subdirectory |
| Connected agent | The agent needs to call an external, independently-managed agent | InvokeConnectedAgentTaskAction in a topic (TaskDialog) |
Ask the user which pattern they need if unclear.
Create a new child agent (AgentDialog) that the parent agent's orchestrator can delegate to.
Auto-discover the parent agent directory:
Glob: **/agent.mcs.yml
Use the top-level agent (not one inside an agents/ subdirectory). NEVER hardcode an agent name.
Look up the AgentDialog schema:
node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js resolve AgentDialog
node ${CLAUDE_SKILL_DIR}/../../scripts/schema-lookup.bundle.js resolve OnToolSelected
Determine from the user:
Create the child agent directory (Phase 1 — plain agent only, NO knowledge):
<parent-agent>/agents/<ChildAgentName>/
└── agent.mcs.yml
Generate agent.mcs.yml using ${CLAUDE_SKILL_DIR}/../../templates/agents/child-agent.mcs.yml as the starting template. Read the template, then customize all placeholder values (<...>) based on the user's requirements.
Key structure:
kind: AgentDialog — marks this as a child agentbeginDialog.kind: OnToolSelected with a description — tells the parent orchestrator when to route heresettings.instructions — the child agent's system promptinputType — context the orchestrator passes inoutputType — what the child agent returns (use outputType: {} if no structured output is needed)CRITICAL: AgentDialog must NOT have beginDialog.actions. Child agents use generative orchestration — all behavior is driven by settings.instructions. Do NOT add action nodes (Question, SendActivity, BeginDialog, ConditionGroup, etc.) to the actions array. If the user's scenario requires hardcoded action flows, it should be an AdaptiveDialog topic in the parent agent, not a child agent.
Key fields explained:
beginDialog.description — This is what the parent orchestrator reads to decide when to route. Be specific and action-oriented (e.g., "This agent handles billing inquiries, refund requests, and payment issues").settings.instructions — The child agent's system prompt. Define its personality, scope, and behavior guidelines.inputType — for context the orchestrator should pass. The parent fills these automatically.Child agents MUST be created in two phases:
Phase 1 — Create the plain agent (steps 1-6 above):
agent.mcs.yml with configuration, instructions, inputs, and outputs.knowledge/ directory or any knowledge sources yet.Phase 2 — Add knowledge sources (only after the user confirms they pushed):
/add-knowledge.knowledge/ directory under the child agent and add knowledge source files there.This constraint exists because knowledge sources reference the agent they belong to — the child agent must exist in the environment first.
kind: AgentDialog
beginDialog:
kind: OnToolSelected
id: main
description: This agent handles billing inquiries, payment issues, refund requests, and subscription management. Route here when users ask about charges, invoices, or account billing.
settings:
instructions: |
You are a billing support specialist. Help customers with:
- Understanding their charges and invoices
- Processing refund requests
- Managing subscription plans
- Resolving payment issues
Always verify the customer's account before making changes.
Escalate to a human agent for refunds over $500.
inputs:
- kind: AutomaticTaskInput
propertyName: CustomerQuery
description: The customer's billing-related question or issue
inputType:
properties:
CustomerQuery:
displayName: Customer Query
description: The customer's billing-related question or issue
type: String
outputType: {}
Call an external, independently-managed agent from your agent. This creates a TaskDialog with an InvokeConnectedAgentTaskAction that the orchestrator can invoke.
The plugin creates the calling side YAML — a TaskDialog in your agent that invokes the connected agent with inputs/outputs.
The connected agent must be configured separately (in Copilot Studio UI or in its own project). Tell the user they need to set up the following on the connected agent:
OnRedirect topic — this is the entry point when the agent is called by another agentinputType: {} and outputType: {} on the OnRedirect topic to signal it participates in multi-agent scenariosImportant: The connected agent must be published and accessible from the same environment or tenant. The
botSchemaName(the connected agent's schema name) must be known — the user can find it in the connected agent'ssettings.mcs.ymlor in Copilot Studio under Agent Details.
Auto-discover the agent directory:
Glob: **/agent.mcs.yml
Determine from the user:
botSchemaName) — e.g., cr123_expenseAgentCreate a TaskDialog in the agent's actions/ directory (or topics/ if the user prefers):
kind: TaskDialog
modelDisplayName: Expense Report Processor
modelDescription: Use this agent to process expense reports by sending them to the expense processing agent
inputs:
- kind: AutomaticTaskInput
propertyName: expenseReportFileFullPath
description: Full file path, including SharePoint site URL, of an expense report file.
action:
kind: InvokeConnectedAgentTaskAction
inputType:
properties:
expenseReportFileFullPath:
displayName: expenseReportFileFullPath
isRequired: true
type: String
botSchemaName: cr123_expenseAgent
historyType:
kind: ConversationHistory
Share this with the user as guidance for what they need to set up on the connected agent:
# OnRedirect topic on the connected agent
kind: AdaptiveDialog
modelDescription: Initializes the agent when called by another agent
beginDialog:
kind: OnRedirect
id: main
actions:
- kind: SetVariable
id: setVariable_abc123
variable: Global.expenseReportFileFullPath
value: "=System.Activity.Value.expenseReportFileFullPath"
inputType: {}
outputType: {}
The connected agent also needs:
Global.expenseReportFileFullPath (type: String)testing
Validate Copilot Studio agent YAML files using the LSP binary's full diagnostics (YAML structure, Power Fx, schema, cross-file references). Use when the user asks to check, validate, or verify YAML files.
development
Authenticate for Copilot Studio evaluation API and SDK chat. Caches a token that is shared across run-eval and chat-sdk skills. Run this before any eval or SDK chat workflow. Requires an App Registration with MakerOperations and Copilots.Invoke permissions.
development
Run a batch test suite via the Copilot Studio Kit (Dataverse API). Uses the Power CAT Copilot Studio Kit to execute test cases against a published agent and produces pass/fail results with latencies. Requires the Kit installed in the environment, an App Registration with Dataverse permissions, and a published agent.
development
Run evaluations against a Copilot Studio agent via the Power Platform Evaluation API. Works on DRAFT agents — no publish step required. Lists test sets, starts a run, polls until complete, fetches results, and proposes YAML fixes for failures. Use when the user wants to test agent changes without publishing.