Task 1 — Create and ground an agent

Part of the Build and extend AI agents lab. New here? Start with Getting started.

What you need: a Microsoft Foundry project with a deployed model. Don’t have one yet? Complete Getting started first (Option A creates it in the portal). This task is completed entirely in the portal — no local code or .env file is required, so there’s nothing to carry over from other tasks.


Grounding gives your agent trusted source material so it answers accurately instead of guessing.

What is grounding?

The single most important capability for the Tailwind Traders agent is grounding. Grounding attaches trusted source material — such as the store policy document — so the agent answers from that data instead of inventing a response.

Learn more →

  1. In the agent playground, set the Instructions to:

     You are the Tailwind Traders store assistant.
     You help customers and store staff with questions about products, orders, returns, rentals, and guided trips.
    
     Guidelines:
     - Always be friendly and helpful
     - Use the store policy documentation to answer questions accurately
     - If you don't know the answer, admit it and suggest contacting the support team directly
    
  2. Download the sample store policy document. Open a new browser tab and navigate to:

     https://raw.githubusercontent.com/MicrosoftLearning/mslearn-ai-agents/main/Labfiles/A-build-and-extend-ai-agents/Python/Store_Policy.txt
    

    Save the file to your local machine.

  3. Back in the playground, in the Tools section, select Add, and add File search.

  4. To the right of Add, select Upload files, browse to the Store_Policy.txt file you downloaded, and select Attach. Wait for the file to be indexed.

  5. Save the agent.

Test your grounded agent

  1. In the chat pane, enter:

     What's your return policy for a tent?
    

    The agent should reference the store policy document in its answer.

  2. Try a second question to confirm it’s using the grounding data:

     How do I rent gear for a weekend trip?
    

Checkpoint: Your agent answers store questions using the uploaded policy document. You’ve created and grounded an agent entirely in the portal.


Next: Task 2 — Connect a remote MCP server