Exercise - Create an equipment recommendation agent

Completed

In this exercise, you create the Contoso Equipment Advisor, an agent powered by the GitHub Copilot harness. You create a small SharePoint inventory list, add an equipment policy as knowledge, configure a SharePoint connector tool, upload a supplied recommendation skill, and refine the skill description after testing.

This exercise takes approximately 50 minutes to complete.

Prerequisites

To complete this exercise, you need:

  • A Microsoft Entra work or school account.
  • Access to Copilot Studio.
  • Permission to create an agent in a Power Platform environment.
  • Access to a SharePoint site where you can create a list and use the SharePoint connector.
  • Access to a solution in the environment if your organization requires agents to be created in a solution.

Note

Building and testing an agent powered by the GitHub Copilot harness might consume Copilot Credits.

Create the equipment inventory

Create a standalone data source for this exercise.

  1. Open the SharePoint site that you use for the exercise, and then select New > List. Under Create from blank, select List.

    Note

    If you don't have a SharePoint site, create one or request access to an existing site before proceeding.

  2. Enter PL7008 Equipment Inventory <your initials> as the list name, replacing <your initials> with a unique value, and then select Create.

  3. Keep the default Title column. Select + Add column and create the following columns:

    Column name Type
    Category Single line of text
    BestFor Multiple lines of text
    Location Single line of text
    UnitPrice Currency
    UnitsAvailable Number
    AccessibilityNotes Multiple lines of text
  4. Select + New and add the following items to the list:

    Title Category BestFor Location UnitPrice UnitsAvailable AccessibilityNotes
    Contoso Standard 14 Laptop General productivity and hybrid work Seattle 950 12 Supports external keyboard, mouse, and two displays
    Contoso Performance 15 Laptop Data analysis and local development Seattle 1,450 4 Supports external keyboard, mouse, and three displays
    Contoso Travel 13 Laptop Frequent travel and presentations Chicago 1,100 0 Lightweight chassis and one external display
    Contoso Focus 27 Monitor General productivity and document work Seattle 320 8 Height-adjustable stand and low-blue-light mode
    Contoso Wide 34 Monitor Large spreadsheets and side-by-side analysis Seattle 680 2 Height-adjustable stand; confirm desk width before ordering
  5. Copy the SharePoint site address and note the exact list name. You use both values when you configure the connector tool. For example, a site address might be https://contoso.sharepoint.com/sites/sitename.

Prepare the equipment policy

  1. Open a text editor and create a file named contoso-equipment-policy.md.

  2. Add the following content to the file:

    # Contoso equipment policy
    
    This fictional policy supports a training exercise.
    
    ## General rules
    
    Recommend only equipment that is currently available in the employee's work location. A recommendation doesn't reserve or order an item. If no compliant item is available, state that no matching item is in stock and direct the employee to the IT procurement team.
    
    Ask for the employee's role, work location, primary work scenario, and accessibility requirements before making a final recommendation. Don't infer an accessibility need.
    
    ## Laptop standards
    
    - General productivity and hybrid roles use a standard laptop when one is available.
    - Data analysts and developers can use a performance laptop when their work includes local data processing, development tools, or large models.
    - Frequent travelers can use a travel laptop when it is available in their location.
    
    ## Monitor standards
    
    - General productivity roles can use one 27-inch monitor.
    - Data analysis roles can use one ultrawide monitor when the employee works regularly with large spreadsheets or side-by-side datasets.
    - Confirm desk width before recommending an ultrawide monitor.
    
    ## Accessibility and exceptions
    
    Explain relevant accessibility features from the inventory without deciding whether they meet an individual's needs. Direct requests for ergonomic assessments, assistive technology, policy exceptions, or equipment that isn't listed to the IT procurement team at it-procurement@contoso.com.
    
  3. Save the file in a location you can access during the exercise.

Prepare the supplied skill

  1. Create another file named equipment-recommendation.md.

  2. Add the following supplied skill content to the file:

    ---
    name: equipment-recommendation
    description: Use when a user asks for a laptop or monitor recommendation.
    ---
    
    # Equipment recommendation
    
    Help a user select approved Contoso equipment without placing an order.
    
    ## Required inputs
    
    Before making a final recommendation, collect:
    
    - Employee role.
    - Work location.
    - Primary work scenario.
    - Accessibility requirements, if any.
    
    Ask only for information that isn't already available in the conversation.
    
    ## Steps
    
    1. Use the Contoso equipment policy knowledge source to identify the applicable rules.
    2. Use the Get equipment inventory tool to retrieve current inventory.
    3. Consider only items in the employee's location with UnitsAvailable greater than zero.
    4. Compare the eligible items with the employee's role, work scenario, and stated requirements.
    5. Recommend one item for each requested category and explain why it fits.
    
    ## Decision rules
    
    - Don't recommend an out-of-stock item.
    - Don't claim that a recommendation reserves or orders equipment.
    - Don't infer accessibility needs or decide whether a feature meets an individual's needs.
    - When no compliant item is available, state that result and provide the IT procurement contact from the policy.
    
    ## Success criteria
    
    A complete response cites the policy, reflects current inventory, explains the match, and identifies any missing information or required escalation.
    
  3. Save the file in the same location as the contoso-equipment-policy.md file so that you can access both files during the exercise.

Create the agent

Screenshot of the Copilot Studio home page showing the Agent and Workflow options.

  1. Go to Microsoft Copilot Studio at https://copilotstudio.microsoft.com/ and sign in.

  2. Confirm that the correct environment is selected.

  3. On the Home page, select Agent. Alternatively, select Agents in the left navigation, and then select New agent.

  4. In the Name field, enter Contoso Equipment Advisor <your initials>.

  5. If your organization requires a solution, in the upper-right corner, select More options (...), and then select Settings. In Agent settings > Agent details, select the solution provided for the exercise from the Solution list.

  6. In Instructions, enter the following text:

    You are the Contoso Equipment Advisor. Help employees understand equipment standards and identify currently available equipment.
    
    Use configured knowledge for Contoso policy. Use tools for current inventory. Cite the source used for each policy statement. Don't invent equipment, availability, prices, policy exceptions, or order status.
    
    Use a concise, professional tone. Ask for missing information before making a final recommendation. For ergonomic assessments, assistive technology, policy exceptions, or unlisted equipment, direct the employee to the IT procurement team.
    
    Don't place, promise, or imply an order. Politely decline requests unrelated to workplace equipment.
    
  7. Select Save.

Add policy knowledge

  1. On the Build tab, select the Knowledge section to open the Add knowledge dialog.

  2. Select Drag and drop or click to upload, and then upload contoso-equipment-policy.md.

  3. Select Add to agent and wait for the upload to finish.

  4. Under the Knowledge section, select contoso-equipment-policy.md. In the Edit knowledge source dialog, enter Contoso equipment policy as the name and Approved equipment standards by role, work scenario, location, and accessibility need. This source doesn't contain current inventory or stock levels as the description.

  5. Select Save to apply the changes to the knowledge source.

Add the inventory connector tool

  1. On the Build tab, select the Tools section to open the Add a tool dialog.

  2. Select Connectors, search for SharePoint, and under SharePoint, select See (x) more to expand the list of available actions.

  3. Select the Get items action, and then select + Add to create your SharePoint connection.

  4. In the Tools section, select the newly added SharePoint connector. In the Details section, set the tool name to Get equipment inventory and the tool description to Retrieves the current Contoso equipment inventory, including category, location, price, available units, intended use, and accessibility notes. Use for equipment availability and recommendation requests. This tool reads inventory and doesn't reserve or order items.

  5. In the Inputs section, configure the values as follows:

    Input How is this filled? Value
    Site address Value The SharePoint site address that you copied.
    List name Value PL7008 Equipment Inventory <your initials>
  6. Leave all remaining optional inputs unchanged. The list is intentionally small, so the tool can return all exercise items for the agent to compare.

  7. Keep the completion behavior that lets the agent use the tool results to generate a contextual response. Select Done, and then select Save.

Note

Connector fields can vary by connector version. If the action shows additional required inputs, configure them so that the action returns all items from the exercise list.

Test knowledge and the tool

  1. Select the Preview tab.

  2. Start a new conversation by entering What is the equipment rule for a data analyst who works with large spreadsheets? and submit it.

  3. Verify that the response uses and cites the policy. It should explain the performance laptop and ultrawide monitor rules without claiming that either item is available.

  4. Start a new conversation, enter Which laptops are currently available in Seattle? and submit it.

  5. If prompted, select Allow to grant the agent permission to use SharePoint. You may need to grant permission more than once.

  6. Verify that the agent uses the Get equipment inventory tool and reports only laptops with available units in Seattle.

  7. Start a new conversation, enter Which travel laptop can I get in Chicago? and submit it.

  8. Verify that the agent reports that no travel laptops are currently available in Chicago and doesn't recommend the out-of-stock travel laptop.

Add and test the supplied skill

  1. Return to the Build tab and select the Skills section.

  2. Select Upload a skill, upload equipment-recommendation.md, and confirm that the skill appears under Skills.

  3. Select the Preview tab, start a new conversation, enter Recommend a laptop for a data analyst in Seattle who runs local data models. I don't have any accessibility requirements and submit it.

  4. Verify that the skill guides the agent to consult the policy, retrieve inventory, and recommend the available performance laptop with an explanation.

  5. Start a new conversation, enter Help me outfit a new data analyst's home office in Seattle for large spreadsheets. There are no accessibility requirements and submit it.

  6. Inspect the activity details. The skill's initial description mentions only a laptop or monitor recommendation, so the broader setup request might not activate it or might produce an incomplete result.

Note

Generative behavior can vary. If the skill activates and produces a complete result, use Plan an approved equipment setup for a new analyst in Seattle as the broader activation test.

Refine the skill description

  1. Open equipment-recommendation.md in a text editor.

  2. In the metadata section at the top of the file, replace the description value with:

    description: Use when a user asks for an approved workplace equipment recommendation, compares equipment for a role or work scenario, or plans a laptop, monitor, or complete work setup.
    
  3. Save the file.

  4. Select the Build tab. In the agent's Skills section, open the uploaded skill, select (...) > Replace, and replace it with the updated file. If the replace option isn't available, delete the original skill and upload the updated file.

  5. Return to the Preview tab, start a new conversation, and repeat the home-office setup prompt.

  6. Verify that the agent gathers any missing information, uses the policy and the Get equipment inventory tool, recommends only available items, and explains why each item fits.

  7. Start another new conversation, enter How do I bake a loaf of bread? and submit the prompt.

  8. Verify that the equipment skill doesn't activate and that the agent states that the unrelated request is outside its scope.

Review and clean up

Your exercise is complete when the agent:

  • Uses the supplied instructions and has a unique name.
  • Uses the equipment policy as knowledge and includes citations.
  • Uses the SharePoint connector tool for current inventory.
  • Doesn't recommend out-of-stock equipment.
  • Uses the supplied skill for a complete workplace setup after you refine its description.
  • Doesn't activate the skill for an unrelated request.

If your instructor or environment owner doesn't require the assets for review, delete the agent and the SharePoint list that you created for the exercise.