Add a connected agent with a routing description

Completed

After the specialist agents are ready, you add them to the primary agent and tell it when to use each one. In this unit, you learn how to add a connected agent, how the primary agent decides when to delegate, and how to write a routing description that sends the right requests to each specialist.

Add a connected agent

The primary agent's Build tab holds its connected agents. To add one:

  1. Open the primary agent, and select the Build tab.
  2. In the components panel, select Connected agents. The Add a connected agent dialog opens.
  3. Browse or search for the agent you want to connect.
  4. Review the agent's capabilities.
  5. Add a clear description of when the primary agent should use this agent.
  6. Select Connect.
  7. Confirm that the agent appears in the components panel.

Repeat these steps for each specialist agent.

Understand how the primary agent delegates

The primary agent's orchestration runtime, also called the orchestrator, evaluates each user message and decides whether to delegate it. It bases that decision on:

  • The connected agent's name and description.
  • The user's message and the conversation context.
  • The primary agent's instructions.

When the orchestrator delegates, the connected agent runs in its own orchestration context with its own instructions, knowledge, and tools. The primary agent sends it the relevant conversation history and the user's message. The connected agent returns a response, and the primary agent presents that response to the user.

As the maker of the primary agent, you control two of these inputs: each connected agent's name and description as they appear in your agent, and your agent's instructions.

Write a routing description

The description tells the orchestrator when a request belongs to this agent. A useful description:

  • Names the agent's specific domain, such as benefits or device support, instead of a general purpose like "helps employees."
  • Lists the kinds of requests the agent handles, in the words users are likely to use.
  • Stays distinct from the descriptions of other connected agents, so no request type fits two agents equally well.

Overlapping descriptions make it harder for the orchestrator to choose the right agent. Compare these descriptions for the two specialist agents:

Connected agent Vague description Specific description
IT support agent Helps employees with their questions. Handles IT support requests, such as device problems, software access, password resets, and equipment orders.
HR benefits agent Answers employee questions. Answers questions about employee benefits, such as health plans, retirement plans, and benefits enrollment.

The vague descriptions both claim every employee question, so the orchestrator has little to separate them. The specific descriptions each name one domain and the request types in it.

Keep the primary agent's instructions consistent

The primary agent's instructions are also a routing input. Check them for guidance that competes with a connected agent's domain. For example, an instruction that tells the primary agent to answer every benefits question from its own knowledge conflicts with the HR benefits agent's description. Remove or revise that guidance so the instructions and descriptions point in the same direction.

Reflect: Write a one-sentence description for a specialist agent in your own solution. Could any other connected agent, or the primary agent itself, claim the same requests?