Build Intelligent Agents with Knowledge Sources, Tools, and Topics

⏱️ 45 minutes 📊 Level 200 🏷️ Local

Learn how to create an AI agent from scratch in Microsoft Copilot Studio, enhance it with knowledge sources, extend its capabilities with tools, and build custom topics for structured conversations.


🧭 Lab Details

Level Persona Duration Purpose
200 Maker 45 minutes After completing this lab, participants will be able to create and configure a new Copilot Studio agent with custom instructions and AI model selection, enhance agent intelligence by adding document and website knowledge sources, extend agent capabilities by creating connector-based and custom tools, and build custom topics with triggers and nodes to handle structured conversation flows.

📚 Table of Contents


🤔 Why This Matters

Building AI agents can feel overwhelming - especially when you're starting from scratch and need them to actually DO things.

Think of building an AI agent like assembling a team:

  • Without proper setup: Your team has no job descriptions, no reference materials, no tools, and no processes - they give generic answers, can't take action, and frustrate everyone
  • With proper setup: Your team has clear roles, access to the right documents, powerful tools at their fingertips, and well-defined workflows - they deliver intelligent, actionable results every time

Common challenges solved by this lab:

  • "I don't know where to start with AI agent development"
  • "My agent gives generic answers that don't help users"
  • "My agent needs real-time data from external systems"
  • "I need my agent to handle specific conversation flows and collect user information"

In just 45 minutes, you'll have a fully functional AI agent with knowledge, tools, and structured conversation flows - no coding required.


🌐 Introduction

Microsoft Copilot Studio empowers makers to build sophisticated AI agents without writing code. By combining intuitive visual tools with powerful AI capabilities, you can create agents that understand natural language, leverage your organization's knowledge, connect to external services, and guide users through structured conversation flows.

Real-world example: A sales team needs an AI assistant that can answer product questions from official documentation, fetch real-time weather data for event planning, analyze the quality of email drafts, and collect contact information for a mailing list. With Copilot Studio, you build one agent that does all of this: it references product docs for accurate answers, uses connector tools for live data, runs custom prompt analysis, and guides users through a structured signup flow - all without writing a single line of code.

This lab takes you through the complete journey from agent creation to a fully capable assistant with knowledge sources, tools, and custom topics - giving you the foundation to build production-ready AI solutions.


🎓 Core Concepts Overview

Concept Why it matters
Agent Instructions Define your agent's personality, expertise, and behavior - these instructions guide every interaction and ensure consistent, on-brand responses that align with your business goals
AI Model Selection Different AI models offer varying levels of capability and cost - understanding which model to use (like GPT-4) ensures optimal performance for your specific use case
Knowledge Sources Ground your agent in factual, domain-specific content by connecting documents, websites, and files - this transforms generic AI into a specialized expert that provides accurate, verifiable answers
Tools Extend agent capabilities beyond knowledge sources by connecting to external APIs, connectors, and services - enabling real-time data access and action execution that makes agents truly interactive
Custom Tools Purpose-built tools with custom prompts and inputs that transform user requests into specific actions - like prompt analysis, data transformation, or specialized calculations
Topics Structured conversation flows with triggers, conditions, and nodes that define how agents respond to specific user intents - providing precise control over agent behavior
Trigger Phrases Keywords and patterns that activate specific topics - these ensure your agent recognizes when to engage specialized conversation flows


✅ Prerequisites

  • Access to Microsoft Copilot Studio (trial or licensed environment)
  • A document to upload as a knowledge source (PDF, Word, or text file) - or use the Copilot Studio Licensing Guide (February 2026)
  • Basic familiarity with web browsers and form filling

🎯 Summary of Targets

In this lab, you'll build a Copilot Studio agent from the ground up, enhance it with knowledge, extend it with tools, and add structured conversation flows. By the end of the lab, you will:

  • Create a new Copilot Studio agent with custom instructions and configuration
  • Configure agent settings including AI model selection (GPT-4)
  • Upload and integrate knowledge sources (documents and websites) to ground agent responses
  • Create a connector-based tool that retrieves real-time weather data
  • Build a custom prompt analyzer tool with inputs and custom instructions
  • Create custom topics with triggers to handle specific conversation patterns
  • Test your agent across all capabilities to verify end-to-end functionality

🧩 Use Cases Covered

Step Use Case Value added Effort
1 Create and Configure Your First Agent Build a functional AI agent with clear instructions and optimal AI model settings 8 min
2 Enhance Agent Intelligence with Knowledge Sources Transform generic AI into a domain expert by grounding responses in your organization's content 10 min
3 Extend Your Agent with Tools Connect your agent to external services and build custom analytical capabilities 15 min
4 Build Custom Topics for Structured Conversations Create structured conversation flows that handle specific user intents and workflows 12 min

🛠️ Instructions by Use Case


🧱 Use Case #1: Create and Configure Your First Agent

Build your first Copilot Studio agent with custom instructions, suggested prompts, and AI model configuration.

Use case Value added Estimated effort
Create and Configure Your First Agent Build a functional AI agent with clear instructions and optimal AI model settings 8 minutes

Summary of tasks

In this section, you'll learn how to create a new agent, configure its instructions and behavior, add suggested prompts, and select the appropriate AI model.

Scenario: You're building a "Copilot Studio Assistant" to help internal teams learn about Copilot Studio features, write effective prompts, and navigate the platform. This agent will serve as a learning companion grounded in official Microsoft documentation.

Objective

Create a fully configured Copilot Studio agent with clear instructions, suggested prompts, and GPT-4 model selection.


Step-by-step instructions

Create Your Agent

  1. Navigate to Microsoft Copilot Studio and sign in with your credentials.

  2. In the agent creation form, provide the following information and select Send:

    Provide information and guidance on how to use Copilot Studio and prompt engineering.
    
  3. Wait for the "Your agent has been provisioned." notification.

  4. In the Details pane, select Edit

  5. Set the agent name to Copilot Studio Assistant and select Save

  6. Select the dropdown for the agent's model. Ensure that GPT-4.1 is selected.

  7. Review the Instructions pane details, this prompt was created by Copilot Studio from your initial description. It should basically tell the agent to "Help users write prompts, create PowerFX formulas, and with navigating Copilot Studio features."

    [!TIP] Clear, specific instructions help your agent understand its role and provide consistent responses. Think of instructions as the agent's job description.

  8. Scroll down to the Knowledge section and select Add Knowledge.

  9. Select Public website from the list of knowledge source options.

  10. Input https://learn.microsoft.com and select Add

  11. The website should appear in the list of links, select Add to agent to save the change.

Test Your Agent

  1. In the test panel on the right side of the screen, enter the following question and select Send:
How do I begin using Copilot Studio?
  1. Review the agent's response. Notice how it references the Microsoft Learn knowledge source you provided.

  2. Observe the response quality and how the agent leverages its instructions to provide helpful, contextual guidance.


🏅 Congratulations! You've completed Use Case 1!


Test your understanding

Key takeaways:

  • Agent Instructions Define Behavior – Clear, specific instructions act as your agent's job description and guide every interaction
  • AI Model Selection Impacts Quality – GPT-4 models offer superior reasoning and accuracy for production scenarios
  • Knowledge Sources Ground Responses – Connecting external content (like Microsoft Learn) helps agents provide factual, verifiable answers

Lessons learned & troubleshooting tips:

  • If your agent gives generic responses, review and refine your instructions to be more specific about its role and expertise
  • Knowledge source indexing can take 2-5 minutes - wait before testing knowledge-specific questions
  • Suggested prompts improve user adoption - customize them to match your most common use cases

Challenge: Apply this to your own use case

  • What instructions would you write for an agent in your department?
  • What AI model would you choose for a high-stakes customer-facing scenario?
  • What knowledge sources exist in your organization that could enhance an agent?


🔄 Use Case #2: Enhance Agent Intelligence with Knowledge Sources

Upload custom documents and content to transform your agent from a generic assistant into a domain-specific expert.

Use case Value added Estimated effort
Enhance Agent Intelligence with Knowledge Sources Transform generic AI into a domain expert by grounding responses in your organization's content 10 minutes

Summary of tasks

In this section, you'll learn how to upload documents as knowledge sources and test how your agent uses that knowledge to answer domain-specific questions.

Scenario: Your Copilot Studio Assistant needs to answer questions about Copilot Studio licensing options, including pay-as-you-go pricing. You'll upload the official licensing guide so the agent can provide accurate, up-to-date answers grounded in Microsoft documentation.

Objective

Add a document knowledge source to your agent and verify that it accurately answers questions using the uploaded content.


Step-by-step instructions

Add Document Knowledge Source

  1. In your Copilot Studio agent, Select Knowledge in the top navigation bar for the agent.

  2. Download the Copilot Studio Licensing Guide. Just make sure you have the file local on your computer.

  3. Select +Add Knowledge and select Upload files and use the file dialog to locate and select your downloaded license guide file from your local computer.

    [!TIP] You can upload multiple file types including PDF, Word documents (.docx), PowerPoint (.pptx), and text files. Each file can be up to 512 MB.

  4. Select Add to agent.

  5. The processing of the file will take a few minutes. While it processes select Add knowledge again and take a minute to review the other types of knowledge sources you can use.

  6. Select Advanced and review that list of sources as well. When you are done reviewing select Cancel to return to the list of your agents configured knowledge sources.

  7. Wait for the file to finish processing if not already done. You'll see a status indicator showing the indexing progress. When it is done it will say Ready in the Status column.

    [!NOTE] Knowledge indexing typically takes 2-5 minutes depending on the document size. Larger documents or multiple files may take longer.

Configure Knowledge Source Settings

  1. Once the document is indexed, Select on the knowledge source to view its details.

  2. Review the Name and Description fields. Update if needed to make the source easily identifiable.

Test Knowledge Integration

  1. In the test panel on the right, click start a new conversation to ensure the agent uses the latest knowledge.

  2. Enter the following question to test the newly added knowledge and select Send:

    How do I license Copilot Studio with pay as you go?
    
  3. Review the agent's response. It should now reference the specific licensing information from the uploaded document.

  4. Look for citations or references in the response that indicate which knowledge source was used.

    [!TIP] Agents typically show citations at the bottom of responses, indicating which knowledge sources contributed to the answer. This helps users verify information accuracy.

Add Additional Knowledge Sources

  1. Return to the Knowledge panel on the Overview tab on the agent and click + Add Knowledge again.

  2. This time, select Public websites as the knowledge source type.

  3. Input https://www.nngroup.com/articles/careful-prompts/ and select Add.

  4. Select Add to agent.

  5. Wait for the website content to be indexed.

  6. Test the agent with the following question:

    Explain CAREful prompts to me?
    

🏅 Congratulations! You've completed Use Case 2!


Test your understanding

  • How does adding a document knowledge source change the agent's responses?
  • Why is it important to wait for knowledge indexing to complete before testing?
  • What types of content make good knowledge sources for agents?

Challenge: Apply this to your own use case

  • What documents exist in your organization that would make valuable knowledge sources?
  • How could you organize multiple knowledge sources for optimal agent performance?
  • What questions would your users ask that could be answered from your documents?


🧱 Use Case #3: Extend Your Agent with Tools

Build two different types of tools: a connector-based weather tool and a custom prompt analyzer tool with intelligent inputs.

Use case Value added Estimated effort
Extend Your Agent with Tools Connect your agent to external services and build custom analytical capabilities 15 minutes

Summary of tasks

In this section, you'll learn how to create agent tools using pre-built connectors, build custom tools with prompts and inputs, configure authentication, and add agent-level instructions for tool usage.

Scenario: Your Copilot Studio Assistant needs to help users in two ways: (1) fetch real-time weather data when users ask about weather conditions, and (2) analyze user prompts and provide feedback based on prompt engineering best practices (CARE framework).

Objective

Create and configure two tools that extend your agent's capabilities beyond simple knowledge retrieval.


Step-by-step instructions

  1. Open your Copilot Studio Assistant agent (the one you created in Use Case #1).

  2. Select Tools in the agent's top navigation bar.

  3. Select Add a tool and review the Tools page to understand the available options for creating new tools.

  4. Select Connector as the tool type (or browse available connectors).

  5. Search for and in the MSN Weather connector section select the Get current weather action.

  6. For the Connection, select Create new connection.

  7. When prompted, select Create to create the connection.

  8. Select Add and configure to add this tool to the agent.

  9. Configure authentication by expanding the Additional details section and selecting Maker-provided credentials in the Credentials to use option.

    [!IMPORTANT] Maker credentials mean the tool authenticates using YOUR account. This is suitable for testing and internal tools. For production scenarios with end users, use connection references.

  10. Review the tool configuration and click Save .

Test the Weather Tool

  1. In the test panel on the right, start a new conversation by selecting the + icon in the upper right corner of the test panel.

  2. Ask the following question:

    What is the weather?
    
  3. When the agent asks for a location, respond:
    Orlando
    
  4. If the agent asks your preference of Imperial or Metric choose your preference.

  5. Review the weather information returned by the agent. Notice how it uses the tool to fetch real-time data.

    [!TIP] If the agent doesn't use the tool automatically, check that the tool is enabled and that you've saved your agent configuration.

Create a Custom Prompt Analyzer Tool

  1. Select Overview in the agent's top navigation bar.

  2. Scroll down to the Tools pane. This is the same list of tools from the agent's top navigation bar Tools option.

  3. Select Add tool to add another tool.

  4. In the Create new section, select Prompt.

  5. Select the current name e.g., Custom prompt… at the top left and change the name to Prompt Analyzer.

  6. In the Instructions section, add the following :

    Analyze this prompt (replace with text) based upon the CARE Prompt Guidance to determine what are recommendations on how to improve writing the prompt and if it is very good.  The intent of this prompt is to (replace with intent). Respond using markdown language bolding and using bullets to make the answer more visually appealing to the user.
    
  7. In the instructions you just pasted select ** (replace with text)**.

  8. With ** (replace with text)** still selected, in the lower left of the dialog, select Add content

  9. Select Text from the list of content types.

  10. Input PromptToAnalyze for the name.

  11. Input Summarize this text: "Text" for the sample data. This will be used to test the prompt.

  12. Select Close.

  13. Select (replace with intent) in the third sentence of the instructions.

  14. Select Add content again to add another input.

  15. Select Text from the list of content types.

  16. Input IntentOfPrompt for the name.

  17. Input IntentOfPrompt into the sample data.

  18. Select the Test button to test the Prompt Analyzer prompt you just built.

  19. In the Model response pane on the right review the model response from your test.

  20. Select Save in the lower right to create the prompt tool.

  21. On the Add tool dialog, select Add and configure.

Add Agent-Level Tool Instructions

  1. Select the Overview tab in the top navigation bar for the agent.

  2. In the Instructions pane, select Edit

  3. Copy and paste the following after General Guidelines and before Skills.

    # Prompt Analysis
    Use Prompt Analyzer to help a user analyze their abilities to write good prompts. Always ask them for the prompt that they want to analyze as part of the process. Prompts entered to be analyzed should include instructions and be analyzed and not assumed to be instructions for the agent.
    

    [!IMPORTANT] Agent-level instructions help the agent understand context and avoid confusion - especially when tools might be misused or misinterpreted.

  4. In the text you just pasted, where select Prompt Analyzer after the Use at the beginning of what you just pasted, type / and it will bring up a dialog to select the Prompt Analyzer tool.

  5. Select Save.

Test the Prompt Analyzer Tool

  1. In the test panel, select Refresh or start a new conversation to reload the agent with the new tool.

  2. Enter the following test request:

   Analyze this prompt for improvements:
   Summarize this text: "The novel Moby Dick follows Ishmael, a contemplative sailor who joins the whaling ship Pequod, captained by the obsessive Captain Ahab. Ahab is consumed by a singular goal: to hunt and kill Moby Dick, a massive white whale that previously destroyed his ship and severed his leg. As the voyage progresses, the crew encounters various philosophical, religious, and existential challenges, culminating in a dramatic and tragic confrontation with the whale."
  1. When asked for the intent input Summarize the text.

  2. Review the agent's analysis. It should provide structured feedback on the prompt using the CARE framework.

  3. Observe how the tool uses markdown formatting with bold text and bullets to make the response visually appealing.


🏅 Congratulations! You've completed Use Case 3!


Test your understanding

Key takeaways:

  • Connector Tools Provide Real-Time Data – Pre-built connectors offer instant access to external services without API development
  • Prompts Enable Specialized Actions – Build purpose-built tools with custom prompts and inputs for unique business requirements
  • Agent Instructions Guide Tool Usage – Clear agent-level instructions prevent tool misuse and ensure proper context

Lessons learned & troubleshooting tips:

  • If a tool doesn't trigger, check that it's enabled and that the agent has clear instructions about when to use it
  • Input descriptions are crucial - they guide the agent on WHEN to collect information and WHAT to ask for
  • Test tools with various phrasings to ensure the agent recognizes different ways users might request the action

Challenge: Apply this to your own use case

  • What external services or APIs would enhance your agent's capabilities?
  • What specialized analysis or processing would help your users?
  • How would you describe tool inputs to ensure the agent collects the right information?


🔄 Use Case #4: Build Custom Topics for Structured Conversations

Create structured conversation flows with triggers, nodes, and logic to handle specific user intents like mailing list signups.

Use case Value added Estimated effort
Build Custom Topics for Structured Conversations Create structured conversation flows that handle specific user intents and workflows 12 minutes

Summary of tasks

In this section, you'll learn how to create topics using natural language descriptions, explore topic nodes and triggers, and understand how topics structure conversations.

Scenario: Users want to join a Copilot Studio mailing list to receive announcements. You'll create a topic that collects their email, first name, and last name, then demonstrates how this could connect to a backend system for actual submission.

Objective

Create a custom topic that handles a specific user intent (mailing list signup) with structured data collection.


Step-by-step instructions

Create a Topic with Description

  1. In your Copilot Studio agent, click Topics in the top navigation bar.

  2. Select + Add a topic.

  3. Select Add from description with Copilot.

  4. Input Join Copilot Studio Mailing List for the name of your topic.

  5. Input the following description in the Create a topic to…:

    Join Copilot Studio Mailing List. Let the user provide their email address, first and last name to be added to the email mailing list for copilot studio announcements.
    
  6. Select Create to let Copilot Studio build the topic structure.

  7. Review the generated topic. Notice how Copilot Studio creates:
    • A trigger phrase
    • Question nodes to collect email, first name, and last name
    • Message nodes to confirm actions

    [!TIP] Creating topics from descriptions is the fastest way to build conversation flows. Copilot Studio uses AI to generate the structure based on your natural language description.

  8. Select Save in the upper corner of the topic design pane to save the current progress of the topic.

  9. Review the topic canvas and identify the different node types:
    • Trigger node: Defines what phrases activate this topic
    • Message nodes: Display text to the user
    • Question nodes: Collect input from users
    • Condition nodes: Create branching logic
    • Action nodes: Call flows, tools, or connectors
  10. Select the + button between nodes to see all available node options:
    • Send a message
    • Ask a question
    • Add a condition
    • Call a tool
    • Call a flow
    • Set a variable
    • End the conversation

    [!NOTE] Understanding node types is essential for building sophisticated conversation flows. Each node type serves a specific purpose in the conversation logic.

  11. Notice that you could select:
    • Power Automate Flow (to submit data to a backend system)
    • Connector (to write directly to a database or service)
    • Tool (to process the collected data)

    [!IMPORTANT] For production scenarios, you would connect to a real backend system here. For this lab, we're demonstrating the concept without actual submission.

  12. Check your nodes and if you don't already have a node that thanks the user then select + after the last node and select a Message node.

  13. Input the following as the message
    Thank you! Your information has been recorded. (In production, this would submit to the mailing list system.)
    
  14. Select Save to save your topic.

Test the Mailing List Topic

  1. In the test panel, start a new conversation.

  2. Enter the following trigger phrase:

    I want to get notified when there is news about Copilot Studio.
    
  3. The agent should recognize this intent and activate your mailing list topic.

  4. Follow the conversation flow:
    • Provide an email address when asked
    • Provide your first name
    • Provide your last name
  5. Observe how the agent guides you through the structured flow and confirms the submission.

🏅 Congratulations! You've completed Use Case 4!


Test your understanding

  • How do triggers determine when a topic activates?
  • When would you create a topic from description vs. from blank?
  • What node type would you use to submit data to an external system?

Challenge: Apply this to your own use case

  • What structured workflows exist in your organization that could become topics?
  • How would you design a multi-step approval or request process as a topic?
  • What external systems would you connect to for data submission or retrieval?

🏆 Summary of learnings

True learning comes from doing, questioning, and reflecting—so let's put your skills to the test.

To maximize the impact of your Copilot Studio agents:

  • Start with Clear Instructions – Well-defined agent instructions act as the foundation for all interactions. Take time to articulate the agent's role, expertise, and tone before launching.
  • Ground Responses in Knowledge – Generic AI responses lack credibility. Always connect agents to authoritative knowledge sources to provide accurate, verifiable answers.
  • Extend with Tools – Use tools to connect to external services, APIs, and connectors. This transforms knowledge-based agents into action-oriented assistants that can fetch real-time data and perform specialized analysis.
  • Structure with Topics – Use topics to create predictable, guided conversation flows for specific user intents and workflows. Well-crafted trigger phrases ensure your agent activates the right topic at the right time.
  • Test Thoroughly – Test your agent across all capabilities - knowledge queries, tool invocations, and topic flows - before deployment. Verify that each component works individually and together.

Conclusions and recommendations

Agent building golden rules:

  • Always define clear, specific instructions that describe the agent's role and expertise
  • Select GPT-4 models for scenarios where accuracy and quality matter most
  • Upload multiple knowledge sources to cover different aspects of your domain
  • Provide clear descriptions for tool inputs - these guide the agent on when and how to collect information
  • Use agent-level instructions to provide context about tool usage and prevent misuse
  • Create topics from descriptions for speed, then refine manually for precision
  • Test with various user phrasings to ensure reliable trigger recognition across tools and topics

By following these principles, you'll build AI agents that not only answer questions but also take action - integrating with your organization's systems and workflows to deliver real business value through conversational AI.


📄 Download Options

📋 On This Page