Share via


Add other agents (preview)

Copilot Studio lets you enhance your agents by connecting them to other agents, allowing them to hand off user interactions or respond to autonomous triggers. Scale out your solutions efficiently and effectively by using modular agents tailored to particular tasks or data sets.

All agents you add appear on the Agents page.

Creating child agents or connecting to existing agents

The following considerations are important when deciding if you should create child agents, within your main agent, or connect your agent to a separate agent.

A child agent is a lightweight agent that lives within your main agent. It's similar to tools and topics within an agent.

A connected agent is a full-fledged agent, independent from your main agent. Copilot Studio currently supports connecting other Copilot Studio agents that exist in the same environment, and Microsoft Fabric data agents.

Create child agents within your agent when:

  • A single developer or a small, cohesive team manages the entire agent solution.
  • You want to logically group tools, instructions, and knowledge into clearly defined sub-agents within a larger agent.
  • You don't need separate configuration settings, authentication, or deployment capabilities for the sub-agents.
  • You don't intend to publish these agents separately or make them available independently.
  • You don't need to reuse the agent across multiple agents.

Connect existing agents when:

  • Multiple teams or developers manage different agents independently.
  • You need to publish and maintain agents separately, and make them available directly on independent channels.
  • Agents must have their own dedicated settings, including authentication.
  • You need independent application lifecycle management (ALM) processes for each agent.
  • You want to make your agent reusable.

You can mix connected agents and child agents in your solution. For example, you could break out parts of your solution into separate agents that users could also access directly. Each of those agents could have their own child agents for key purposes.

Create a child agent

  1. Go to the Agents page for your main agent and select Add an agent.

  2. Select Create an agent.

  3. Enter a name for your new agent.

  4. Determine when your agent should be used. By default, agents respond to users or triggers, based on their description.

    • If you want to use the default behavior (The agent chooses), enter a brief description of your agent's purpose.
    • Otherwise, expand the list under When will this be used? and select the desired behavior. For more information on the supported behaviors, see Determine when your agent should be used.
  5. Enter clear instructions that you want your agent to follow when invoked. To reference tools, variables, or add Power Fx formulas in your instructions, enter a slash (/) and select the desired option from the menu that appears.

    Important

    When referencing existing tools in your instructions, decide if the tool should be accessible directly by your main agent or only when explicitly called within instructions. Limiting a tool's usage to explicit instruction references helps prevent confusion when similar tools or agents exist. For example, if you have a "Check account balance" agent and a similar "Get account balance" tool, restrict the tool to be called only by the agent to avoid overlap. To restrict a tool to only be available when referenced from another agent, clear the Allow agent to decide dynamically when to use this tool property in the Additional details section on the tool's detail page.

  6. Optionally, add knowledge and tools that only this child agent might use:

    • In the Knowledge section, select Add and proceed in the same fashion as when you add knowledge to your main agent.
    • In the Tools section, select Add and proceed in the same fashion as when you add tools to your main agent.
  7. If you don't want this agent to be active yet, turn off Enabled. You can make your child agent active later.

  8. Select Save.

Determine when your agent should be used

By default, agents respond to a user query, based on their description. You can also configure agents to intercept other events and respond to them.

Event Description
A message is received Called when an activity of type message—the most common type of activity—is received. Received when a user types or says something to the agent. By default, the agent responds to any messages. To limit the agent response to a specific type of message, use the Activity type list under Additional details.
A custom client event occurs Called when an activity of type event is received. By default, the agent responds to any events. To limit the agent response to a specific event, use the Event name property under Additional details.
An activity occurs Called when an activity of any type is received. To limit the agent response to a specific type of activity, use the Activity type list under Additional details.
The conversation changes Called when an activity of type conversationUpdate is received. For example, Teams sends an activity of this type when a user joins a conversation.
It's invoked Called when an activity of type invoke is received. Most commonly received from the Teams channel—for example, when the user interacts with a message or search extension in Teams.
It's redirected to Called when the agent is called explicitly from within a topic. Not yet supported.
The user is inactive for a while Called when a user hasn't interacted with the main agent after a configured period of time. Select the desired inactivity threshold from the Inactivity duration list under Additional details.
A plan completes Called when the main agent finishes executing all planned steps to respond to a user query or autonomous trigger.
An AI-generated response is about to be sent Called when the main agent generates a response for a user after calling one or more topics, actions, or knowledge sources. Use the Response.FormattedText system variable to see the generated response. Set the ContinueResponse variable to false if you want to prevent the orchestration response being sent (that is, if you modify the message and send your own using a message node).

Additional details

Depending on your selection for When will this be used?, more properties might be available. The following properties are always available.

Condition

Specify conditions that must be met in order for the agent to be called. For example, you might want the agent to be called only if the channel used by an employee is Microsoft Teams.

Screenshot of a condition to limit the scope of a child agent to the Microsoft Teams channel.

If you need more complex conditions, you can switch to the Power Fx formula editor: select Builder then select Formula.

Screenshot showing the option to go to the formula editor.

Priority

More than one agent can fire for a single incoming activity, such as a message. By default, the option you select for When will this be used? determines the order the agents fire.

Child agents and topics share the same set of triggers or events that they can respond to. If an agent and a topic are configured to respond to the same event, such as user inactivity, you can use the priority property to determine which should go first.

Order of execution:

  1. Activity Received
  2. Message / Event / Conversation update / Invoke received
  3. By agent

If multiple agents or topics must be called based on the same type of event happening, they're called in the order of creation (oldest first).

You can set the Priority property explicitly. A lower number indicates a higher priority.

Connect an existing Copilot Studio agent

For an agent to be connected to, it must be in the same environment, published, and configured to allow it to be connected to. Verify if your agent is available to others.

To connect an existing agent to your agent:

  1. On the Agents page, select Add an agent.

  2. Select Copilot Studio.

  3. Choose the desired agent from the list of available agents. The agent's name, instructions, and description appear.

  4. Adjust the description (if needed) to make it more contextual for the agent where it's called from (that is, making the description more specific if you have other tools or agents where the descriptions might overlap). We recommend you update the description to ensure Copilot Studio can understand when to invoke this agent. Learn about writing effective metadata.

  5. If you want to prevent conversation history from being passed to this agent when it's called, clear the Pass conversation history to this agent box. This method limits the information being passed to the agent to just the explicit task that the main agent wants the other agent to complete.

  6. Select Add agent.

    Once added, your agent appears in the Agents list and you can immediately test it by asking something in the test chat that should cause the agent to be called.

Note

If you make changes to a connected agent, be sure to publish those changes—your main agent can only use the latest version after it's published. Also, keep in mind: once an agent is connected, you control its description locally. Any updates to the original agent's description doesn't automatically sync with your main agent. You must update the description manually if you want to reflect those changes or make any other changes.

Make a Copilot Studio agent available to other agents

By default, any agent can connect another agent in the same environment.

  1. Go to the Settings page for your agent.

  2. Turn on Let other agents connect to and use this one if it isn't.

If you want to prevent other agents from connecting to this agent, turn off this option.

Reference an agent in your main agent's instructions

It can be useful, especially for autonomous agents, to be able to reference child agents you created or other agents you connected. With this method, you can break down a long instruction set for an agent into smaller focused pieces.

  1. Go to the Overview page for your main agent.

  2. In the Instructions field, enter a slash (/) and select the desired agent. Copilot Studio automatically saves the instructions.

  3. Test your agent. When you use the test panel in Copilot Studio, you should see your agent referenced in the activity map.

Manage child and connected agents

You can make any child or connected agent momentarily unavailable or remove it entirely from your solution.

Turn an agent on or off

On the Agents page for your main agent, use the Enabled toggle next to the agent you want to turn on or off.

Turning off a child agent or a connected agent makes it inactive—that means it doesn't respond to users or triggers.

Delete a child agent

On the Agents page for your main agent, select the three dots () next to the child agent you want to remove and select Delete.

Remove a connected agent

On the Agents page for your main agent, select the three dots () next to the connected agent you want to remove and then select Disconnect agent.

Known limitations

The following limitations apply to child or connected agents.

  • The Redirect node doesn't yet support redirecting to child and connected agents.

  • While child agents respect the Use general knowledge setting of the main agent, by not using general knowledge as part of answers generated by the built-in knowledge tool, they might sometimes use underlying LLM knowledge when generating questions or messages.

  • You can't connect to an existing agent that is already connected to other agents.