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

Task 04: Test the agent integration

Description

You’ll provision the agent package to your Microsoft 365 tenant and then test it inside Microsoft 365 Copilot Chat using natural language prompts. You’ll also enable developer debug mode to inspect how the agent routes requests to the MCP server.

Success criteria

  • You provisioned the Zava Claims Assistant agent package to your Microsoft 365 tenant without errors.
  • You opened the Zava Claims agent in Copilot Chat and received a valid response to at least one conversation starter.
  • You tested three natural language queries - inspections lookup, inspection creation, and new claim creation - and received correct responses from the MCP server.
  • You enabled developer debug mode and reviewed the Agent debug info panel for at least one query.

Key steps


01: Provision the agent

You’ll need to sign into the Microsoft 365 Agents Toolkit to upload and test your agent from within it.

  1. Save your file changes by selecting File, then Save All.

    o3ogpfgh.jpg

  2. In the leftmost pane, select the Microsoft 365 Agents Toolkit (m365atk-icon) icon.

  3. Under the ACCOUNTS section, select Sign in to Microsoft 365.

    uhd85l7z.jpg

  4. In the dialog, select Sign in.

  5. Sign in to the Microsoft 365 tenant using your lab credentials:

    Item Value
    Username @lab.CloudPortalCredential(User1).Username
    Password @lab.CloudPortalCredential(User1).AccessToken
  6. Once signed in, close the browser to go back to the project window.

  7. Under the LIFECYCLE section, select Provision.

    fdxn9qbk.jpg

  8. Wait for provisioning to complete.

    This creates and uploads the agent package.

    If you receive a timeout error during provisioning, try closing and reopening the project, then provision again.

    File > Open Recent > …\Zava Claims Assistant

    ms4gmmky.jpg


02: Test in Microsoft 365 Copilot

  1. Open Microsoft Edge, then go to m365.cloud.microsoft/chat to open Copilot Chat.

  2. Sign in with your lab user credentials:

    Item Value
    Username @lab.CloudPortalCredential(User1).Username
    Password @lab.CloudPortalCredential(User1).AccessToken
  3. Close any dialogs.

  4. In the leftmost pane, under Agents, select Zava Claims.

    26uslx9u.jpg

  5. Try a conversation starter, type this prompt:

    Find all inspections for claim number CN202504991
    
  6. Select Confirm whenever prompted.

    cc3rhjeo.jpg

    2x35igjl.jpg

  7. Try these natural language queries to test the agent’s capabilities:

    • What claims do we have for storm damage?
      
    • Create a new urgent inspection for claim CN202504990 to assess water damage in the basement
      
    • Create a new claim for Alice Johnson at 456 Oak Street with fire damage from yesterday
      

    Your agent should successfully respond to natural language queries and interact with the MCP server data.


03: Debug the agent

  1. In the chat with the Zava Claims agent, send the following prompt:

     -developer on
    

    This will enable debugging of these conversations.

  2. Refresh the browser session (CTRL+F5).

  3. Select the Zava Claims agent again.

  4. Continue testing the agent with queries:

     Find contractors who specialize in roofing and are marked as preferred
    
  5. On the lower side of the agent response, select Agent debug info.

    gdd7rwba.jpg


Congratulations!

You’ve successfully completed this exercise. You’ve successfully created and deployed the Zava Insurance’s declarative agent that seamlessly integrates with their MCP server.