Lab 011: Copilot Studio β First AgentΒΆ
What You'll LearnΒΆ
- Navigate the Copilot Studio canvas (no-code/low-code agent builder)
- Create a Q&A agent from a knowledge source (FAQ document)
- Test your agent in the built-in chat test panel
- Publish the agent to Microsoft Teams
- Understand topics, triggers, and fallback behavior
IntroductionΒΆ
Microsoft Copilot Studio is a graphical, low-code platform for building conversational AI agents without writing code. You define topics (conversation flows), connect knowledge sources, and publish to Teams, websites, or other channels in minutes.
This lab builds a customer service agent for the fictional OutdoorGear Inc. company, grounded in a product FAQ.
PrerequisitesΒΆ
- Microsoft account (free at account.microsoft.com)
- Copilot Studio trial: copilotstudio.microsoft.com β Start free trial
- Microsoft Teams (free personal edition works)
No credit card needed
The Copilot Studio free trial lasts 30 days and does not require payment details.
Lab ExerciseΒΆ
Step 1: Create a new CopilotΒΆ
- Go to copilotstudio.microsoft.com
- Sign in with your Microsoft account
- Click Create β New agent
- Fill in:
- Name:
OutdoorGear Assistant - Description:
Customer service agent for OutdoorGear Inc. β answers product and policy questions - Instructions:
You are a friendly customer service agent for OutdoorGear Inc. Answer questions about products, return policies, shipping, and warranties. Be concise and helpful. - Click Create
Step 2: Add a knowledge sourceΒΆ
- In the left panel, click Knowledge
- Click Add knowledge β Public website or file
- Enter this URL (our sample FAQ):
Or click Upload file and paste this content into a
.txtfile first.
Using the knowledge-base.json
The data/knowledge-base.json file contains 42 documents including product guides, return policies, FAQs, and shipping info β all pre-formatted for RAG.
Step 3: Test the built-in knowledgeΒΆ
- Click Test in the top-right corner
- In the chat panel, try these questions:
What is your return policy?Do you have waterproof boots?How long does shipping take?- The agent should answer from the knowledge source and cite where it found the answer
Step 4: Create a custom topicΒΆ
Custom topics let you override AI responses with deterministic flows for specific intents.
- Click Topics in the left panel
- Click Add a topic β From blank
- Name it:
Order Status - Under Trigger phrases, add:
Where is my orderTrack my orderOrder statusWhat happened to my order- Add a Message node:
- Add an End conversation node
- Click Save
Step 5: Test the custom topicΒΆ
In the test panel, type: Where is my order?
The agent should use your custom topic flow, not the AI fallback. Notice how deterministic topics take priority over AI generative answers.
Step 6: Publish to TeamsΒΆ
- Click Publish in the left panel
- Click Publish to make the agent live
- Click Channels β Microsoft Teams
- Click Turn on Teams
- Click Open agent β this opens a deep link
- In Teams, click Add to install the agent as an app
- Start chatting with your OutdoorGear Assistant in Teams!
Copilot Studio ArchitectureΒΆ
βββββββββββββββββββββββββββββββββββββββββββ
β Copilot Studio β
β β
β βββββββββββββββ βββββββββββββββββββ β
β β Topics β β Generative AI β β
β β (no-code β β (knowledge + β β
β β flows) β β LLM fallback) β β
β ββββββββ¬βββββββ ββββββββββ¬βββββββββ β
β β Topic match? β β
β β βββββββββββββββββββ β
β βΌ β
β User message β
βββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
Channels: Teams, Web, Slack, ...
Priority order: 1. Custom topics (exact trigger match) β deterministic 2. Built-in system topics (escalate, fallback) 3. Generative AI answers from knowledge sources
When to use Copilot Studio vs Pro CodeΒΆ
| Copilot Studio | Pro Code (SK/MCP) |
|---|---|
| Business users, no code | Developers |
| Fast prototyping | Complex logic |
| Teams/SharePoint integration | Custom integrations |
| GUI-based flows | Programmatic control |
| Limited customization | Full flexibility |
Next StepsΒΆ
- Teams AI Library (code-first Teams bot): β Lab 024 β Teams AI Library
- Add MCP tools to Copilot Studio: β Lab 012 β What is MCP?