Build an agent in Copilot Studio

Completed

In this section, you’ll use the conversational creation flow to define a Contoso Coffee agent using natural language to configure its tone and instructions. This conversation creation uses AI to make the creation simple and reduce the time to deliver your agent to your customers.

To continue your journey of Application Lifecycle Management, you'll create the agent directly from your solution, automatically localizing your agent's back-end to your solution. By starting with this practice, you'll automatically store all components you add to the agent, and its related processes, within your solution for peace of mind when you might eventually move this agent to a production environment or share with a colleague or client.

  1. From the Agents in a Day solution you recently imported, select the + New button from the top menu, and choose the Agent option to create a new agent.

    Screenshot of adding an agent from a solution with the + New and Agent buttons highlighted.

    After selecting + New -> Agent, you'll be navigated to the natural language agent designer. This interface is designed to be conversational and allows you to add features to and customize the agent's basic information like its name, tone, instructions, and grounding data.

  2. After selecting + New -> Agent you'll be navigated back to Copilot Studio. Type the following prompt in the textbox for the Agents tab under What would you like to build?, then select Send:

    An intelligent agent for the company Contoso Coffee that helps customers with machine orders. Let's name it Contoso Support Agent. Contoso Support Agent should only reveal information from provided sources, stick to products in the Contoso domain, and only answer questions that pertain to public information that's available for Contoso Coffee. Contoso Support Agent should interact in a friendly and professional manner, using clear language, helpful tone, and light emojis when appropriate. It should feel approachable, smart, and a bit curious like a knowledgeable companion.

    Screenshot of initial prompt to start the agent creation process using natural language.

    Note

    The prompt provided above is step-by-step instructions for how the agent is expected to respond. By providing this information now, your agent will be preconfigured to specifications you need instead of manually providing all these values in the agent designer.

    After sending, the conversational experience helps you build your agent from scratch by filling out the initial details of your agent like its description all from the prompt you entered. When the agent is finished provisioning, look over what Copilot has configured and make sure it matches what the prompt expressed.

    Note

    When Copilot is building your agent, the creation of the Contoso Support Agent will vary for each user.

    Once submitted, your agent will generate from the prompt you provided. These changes are reflected in the agent instructions update in the agent's Overview page.

  3. You should now have an agent well-prepared for assisting with Contoso Coffee machine orders. Before finalizing the agent, you need to add your agent to the correct solution. It will be added to the default solution so you will need to move it into the Agents in a Day solution. To do this, in the upper-right corner choose the Settings option.

    Screenshot of edit advanced settings menu highlighted.

  4. From here, Select the Advanced tab, and navigate to the View Solution option.

    Screenshot of advanced settings window with the Agents in a Day solution selected.

  5. After navigating to the Common Data Services Default solution, select the ellipses menu next to your Contoso Support Agent, and choose the ellipses -> advanced -> Add to solution options.

    Screenshot of selecting ellipses -> advanced -> Add to solution.

  6. When the menu opens, select Agents in a Day (ppcat) then select Save.

    Screenshot of selecting the Create button to finalize the agent creation process.

    It'll take a minute to fully transfer the agent over along with it's Properties. Once this process completes, back out into the select solutions screen and go into the the Agents in a Day solution.

  7. Now, select your agent and notice that it opens to the Overview tab. You can select different models through the dropdown menu under Select your agent's model. This is expected to change over time due to the introduction of newer models.

    Screenshot highlighting the agent model selection in the agent's Overview page.

In the next unit, you'll learn about the various features that are available when customizing agents in Copilot Studio. You'll also learn about the interface and how to navigate directly to the agent's configuration screen.