Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Exercise 03: Create a Copilot agent

Introduction

Fabric Data agents make it easy to build agents that users can interact with to learn about data in a Fabric lakehouse. For this lab, we want to surface an agent in Microsoft Teams. Fabric data agents do not support this functionality yet.

Estimated time to complete this exercise: 20 minutes

Architecture

1edlmqse.jpg

===

Task 01: Create and share a Copilot agent

Introduction

You need to create a Copilot agent that connects to Fabric and then publish the Copilot agent to Teams. Microsoft is working on a way to directly connect Copilot agents to Fabric (by using a Fabric Knowledge source connector), but this feature is not generally available yet.

Description

In this task, you’ll create the Copilot agent.

Success criteria

  • You’ve created a Copilot agent.

Learning resources

Key tasks

01: Sign in and start creating a new agent

  1. Open a web browser and go to Copilot Studio. If prompted, sign in with your credentials

    You will see two Sign in buttons at the top right of the Copilot Studio page. The top button is to sign into Microsoft Edge. The lower button is to sign in to Copilot Studio. Be sure to use the bottom Sign in button.

    46f2irts.jpg

  2. Select Start free trial.

    When you launch Copilot Studio for the first time, it can take a couple of minutes to get things ready. If you do not see the Start free trial dialog after a couple of minutes, skip to Step 4. That action will generally cause the Start free trial dialog to display.

    eyhndsi9.jpg

  3. In the Welcome to Copilot Studio! dialog, select Skip.

    9y9vdkk7.jpg

  4. In the left pane, select Create.

    lrbyf5iu.jpg

  5. On the Create page, select + New agent.

    ch499qof.jpg

    You may see an error message that resembles the following screenshot. If you see an error message, wait a few minutes and then repeat Step 4 of this task.

    a43jn8u1.jpg

  6. In the Type your message field, enter the following text and then select Send. Wait for Studio to load a response to your prompt.

    Copilot is evolving at a fast pace. The questions that you are asked and the order in which questions are asked may differ from what you see in the instructions.

     Create an agent that allows users to interact with Product, Sales, and Customer information from a Microsoft Fabric Data agent.
    
  7. In the Type your message field, enter the following text and then select Send. Wait for Studio to load a response to your prompt.

     Use the name "SAP Agent".
    
  8. In the Type your message field, enter the following text and then select Send. Wait for Copilot Studio to load a response to your prompt.

     Respond in a friendly and professional manner. Use tables to present data when appropriate. Provide data summaries and reports when appropriate. Don't use publicly accessible data sources. Only use data from the Microsoft Fabric lakehouse that we'll specify.
    
  9. At the upper right of the Copilot Studio page, select Create.

    It may take a few minutes to set up your agent.

    r24ieyo7.jpg


Task 02: Configure and test the Copilot agent

Introduction

Now that you have created a Copilot agent, you can perform some configuration steps to make it more useful.

Description

In this task, you’ll connect the Copilot agent to the Microsoft Fabric data agent that you published in Exercise 01. Then, you’ll submit a prompt to ensure that the Copilot agent returns results.

Success criteria

  • You’ve tested the agent and returned results.

Learning resources

Key tasks

01: Add Microsoft Fabric extension and connect SapFabricDataAgent

  1. On the SAP Agent page, on the menu bar, select Agents.

    ybkkb1aq.jpg

    Integrating Fabric data agents and Copilot agents within Copilot Studio is in preview. The features available and implementation details are subject to change. The instructions and screenshots may differ slightly from the current Copilot Studio user interface.

  2. On the Agents page, select + Add.

    yloipt1o.jpg

  3. On the Choose how you want to extend your agent (preview) page, select Microsoft Fabric.

    8aftsdib.jpg

  4. On the Connect Microsoft Fabric data agents page, to the right of Connection, select the dropdown arrow and then select Create new connection.

    3l8w6f02.jpg

  5. On the Connect to Fabric data agent page, select Create.

    di2k0kwx.jpg

  6. In the Pick an account dialog, select @lab.CloudPortalCredential(User1).Username or sign in by using your credentials:

  7. After sign in is completed, select Next.

    vtt3erh3.jpg

  8. On the Select agent to connect page, select SapFabricDataAgent@lab.LabInstance.Id and then select Next.

    swcq7ydj.jpg

  9. On the SapFabricDataAgent@lab.LabInstance.Id page, select Add agent.

    sehlslco.jpg

02: Test the agent connection and response

  1. On the menu bar for the agent, select Test. This displays the Test pane.

    b5j1z94o.jpg

  2. In the Test pane, enter the following prompt and then select the Send button:

     Show me all of the sales orders for the customer Sorali. Format the GrossAmount and NetAmount columns as currency.
    

    This is the same prompt that you used to test the Microsoft Fabric data agent in Exercise 01, Task 04, Step 03.

    igype3fh.jpg

  3. In the Test pane, in the Connect to continue section, select Allow.

    When you first connect to a data source (or after a period of inactivity), Copilot Studio will prompt you to allow a connection to a data source.

    pmx3zxm0.jpg

  4. Wait while copilot Studio connects to Microsoft Fabric and processes the prompt.

    For the first prompt this process may take 1-2 minutes.

    If after a few minutes you do not see results, on the menu bar for the Test pane, select the New conversation icon and then resubmit the prompt.

    xzovqxmu.jpg

    Copilot Studio will display an activity map on the left side of the agent page to show you the process that it is using to respond to your prompt.

    qsg3duy3.jpg

  5. Review the results in the Test pane. The results should resemble the results you obtained in Exercise 01, Task 04, Step 03.


Task 03: Publish and test the Copilot agent

Introduction

You now have a Copilot agent that connects to Microsoft Fabric to answer questions about the SAP data. Now, you need to configure and publish the agent so that you can view and test the agent in Microsoft Teams.

Description

In this task, you’ll configure the agent to use the Teams and Microsoft 365 channel. You will view the agent in Teams and test the agent to ensure that it returns results.

Success criteria

  • The agent appears in Teams.
  • The agent provides appropriate responses to queries about the SAP data.

Learning resources

Key tasks

01: Publish agent and configure Teams channel

  1. On the menu bar for SAP Agent, select Publish.

    The Publish button is not enabled until the system completes the creation and startup process. If the Publish button is disabled, wait a couple of minutes and then refresh the page.

    yycvly7q.jpg

  2. In the Publish this agent dialog, select Publish. Wait while the agent is published.

    p6jqjnff.jpg

  3. On the menu bar for SAP Agent, select Channels.

    By default, the agent is configured to use Microsoft authentication.

    lw47q3k6.jpg

  4. In the Channels section, select Teams and Microsoft 365 Copilot.

    u4o8lmxx.jpg

  5. In the Teams and Microsoft 365 Copilot pane, select Add channel.

    bqhnlz0r.jpg

  6. Once you see the message The channel was added, in the Agent preview section, select Edit Details.

    69gqwk5w.jpg

  7. In the Teams and Microsoft 365 Copilot pane, select Change icon.

    901uspv1.jpg

  8. In the Open dialog, go to the Downloads folder, select SAP Logo.png an and then select Open.

    yzrmiokn.jpg

  9. Configure the agent details by using the values in the following table. Leave all other settings at their default values.

    Setting Value
    Short description Interact with SAP Sales and Product data.
    Long description Get data about customers, sales orders, sales order line items, and products using data sources ingested from SAP.
    Teams settings - Users can add this agent to a team Selected
  10. In the Users can add this agent to a team confirmation dialog that displays, select Yes.

    l1owh7s2.jpg

  11. Select Save.

    spnyxcz1.jpg

  12. Close the Teams and Microsoft 365 Copilot pane.

  13. On the menu bar for SAP Agent, select Publish.

    yycvly7q.jpg

  14. In the Publish this agent dialog, select Publish. Wait while the agent is republished.

    p6jqjnff.jpg

    You may see a message stating Your agent is shared with all users in the organization. The message is prompting you to review whether or not you want to share with everyone. You can safely ignore the warning for this lab. You should consider your sharing policies if you plan to deploy agents in a production setting.

    gziywbdb.jpg

02: Open the agent in Teams and test prompts

  1. On the Channels tab for the agent, select Teams and Microsoft 365 Copilot.

  2. In the Teams and Microsoft 365 Copilot pane, in the Availability options section, select See agent in Teams.

    fblpc2mf.jpg

  3. On the Microsoft Teams web page, in the This site is trying to open Microsoft Teams dialog, select Open.

    aw21izme.jpg

  4. On the SAP Agent page, select Add.

    It may take a minute or two to add the agent to Teams.

    p38pmipw.jpg

  5. In the SAP Agent dialog, select Open.

    spqel3nu.jpg

  6. In Teams, in the left navigation pane, select SAP Agent.

    apie7q5i.jpg

  7. On the SAP Agent page, select the Customer Insights tile.

    ievikfbd.jpg

  8. In the prompt window, review the prompt that is displayed and then select Send (the right-facing arrow).

    The first time you submit a prompt, the agent may provide a generic response that resembles the response in the following screenshot. If you see a similar response, resubmit your prompt.

    idbmn949.jpg

  9. In the Connect to continue dialog that displays, select Allow.

    tsq5w2pf.jpg

  10. Review the response. This response is expected because the sample dataset does not contain transactions for the current month.

    txn6ulnk.jpg

  11. Enter the following prompt and then select the Send button:

     Show me all of the sales orders for the customer Sorali. Format the GrossAmount and NetAmount columns as currency.
        
    

    This is the same prompt that you used to test the Microsoft Fabric data agent in Exercise 01, Task 04, Step 03.

    hpmu9l3u.jpg


Congratulations. You completed this module!

This was module two in a series of four modules. Continue your learning by working through the other modules in this series.

  • TechExcel Migrate SAP to Azure: Module 3 - Demonstrate Sentinel for SAP
  • TechExcel Migrate SAP to Azure: Module 4 - Demonstrate Enterprise Insights options using SAP data