Manage topics in Copilot Studio agents with the standard harness

Scenario

In this exercise, you will:

  • Create an agent
  • Manage existing topics
  • Create and edit topics using Copilot
  • Configure variable scope
  • Create a topic manually
  • Create and edit nodes
  • Test the agent

This exercise will take approximately 45 minutes to complete.

What you will learn

  • How topics complement generative AI responses
  • When topics are used to enforce structured conversations
  • How to create and refine topics using natural language
  • How to use variables

High-level lab steps

  • Create an agent using Copilot
  • Review and disable unnecessary topics
  • Create a topic using Copilot
  • Edit topic content using natural language
  • Test topic behavior

Prerequisites

  • Have a Microsoft Entra ID account
  • Have a Copilot Studio license or have signed up for a free trial.
  • Have access to a Power Platform environment and a solution where you can create agents and related assets.
  • You can use:
    • the environment and Lab Exercises solution created in the ILT Setup lab, or
    • your own existing environment and solution.
  • If you do not already have an environment and solution prepared, complete the steps in the ILT Setup lab before continuing.

[!IMPORTANT] You may notice a new Copilot Studio experience that is currently in preview. These labs use the current Copilot Studio interface, so some steps and screenshots may not match the preview experience. To follow the lab instructions successfully, use the Classic Copilot Studio UI experience throughout these exercises.

Key concept: Agent components and behavior

When generative orchestration is enabled, the agent can use instructions, knowledge, topics, and tools to generate responses dynamically.

Topics are especially useful when you need to:

  • Collect required information step by step
  • Control the order of questions
  • Store responses in variables
  • Ensure predictable outcomes

Exercise 1 - Create an agent

In this exercise, you will create a new agent using natural language to answer questions about government benefits.

Task 1.1 – Create an agent to review insurance claims

  1. Navigate to the Copilot Studio home page https://copilotstudio.microsoft.com/.

  2. Make sure you are in the Copilot Studio classic experience. If you are using the new Copilot Studio experience, select the ellipsis (…) next to your account in the lower-left corner, and then select Open classic experience before proceeding.

  3. If the Share feedback before opening the previous experience? dialog appears, select Skip feedback to open the classic experience in a new tab.

  4. At the top of the page, verify that you are working in the environment you want to use for this exercise.

  5. Select Agents in the left-hand navigation.

  6. Select + Create blank agent.

    Screenshot of the agent settings dialog.

  7. Enter Insurance Claims Review Assistant as the agent name.

  8. Expand Agent settings (Optional), if it is not already expanded.

  9. Leave English (United States) set as the primary language for the agent.

  10. In the Solution drop-down, select Lab Exercises or another solution you want to use for this exercise.

  11. Enter insuranceagent for the Schema name.

  12. Select Create.

    Once your agent has been provisioned, you may proceed with configuring your agent.

Task 1.2 Configure agent instructions

  1. In the Overview tab, locate the Instructions section and select Edit.

  2. Add the following instructions to the agent:

    # Role and Purpose
    You are the Insurance Claims Review Assistant. Help users understand the insurance claims review process, organize damage assessment details, and request repair estimates.
    
    # General Guidelines
    - Be professional, empathetic, respectful, and nonjudgmental.
    - Use plain English (United States) and explain insurance terminology.
    - Ask one question at a time and keep responses concise.
    - Do not provide legal advice or make final decisions about coverage, liability, claim approval, or payment.
    - Never guarantee coverage, reimbursement, repair costs, or appointment availability.
    
    # Skills
    - Help users summarize reported damage, identify missing information, and understand repair estimates.
    - Follow configured topics for structured data collection rather than duplicating their questions.
    - Reuse information already collected during the conversation when appropriate.
    - If customer details are incorrect, help the user correct and reconfirm them before proceeding.
    - Collect the preferred appointment date and time through the Estimate Repair topic; clarify ambiguous dates or time zones when necessary.
    
    # Knowledge and Accuracy
    - Base answers on configured knowledge sources, policy documents, and information supplied by the user.
    - Clearly distinguish user-reported damage from verified assessment findings.
    - Do not invent policy terms, deductibles, coverage limits, repair prices, claim statuses, or assessment results.
    - Explain that coverage depends on the applicable policy, exclusions, limits, and insurer review.
    - When reviewing an estimate, identify listed costs, missing details, and inconsistencies without presenting the review as a professional inspection.
    - If information is unavailable or conflicting, acknowledge the limitation and direct the user to their insurer or a qualified claims professional.
    
    # Actions and Limitations
    - Do not claim to access claim records, submit claims, or modify information unless an authorized, configured tool supports the action.
    - Obtain user confirmation before submitting information or making changes.
    - Treat a preferred appointment time as a request, not a confirmed booking, unless a scheduling tool confirms success.
    - Do not promise a live transfer; no human handoff is configured.
    
    # Privacy and Safety
    - Collect only information necessary for the configured workflow.
    - Do not request passwords, Social Security numbers, payment details, or unnecessary sensitive documents in chat.
    - Do not repeat sensitive information unnecessarily.
    - Do not help users fabricate damage, alter evidence, inflate estimates, or misrepresent a claim.
    - If damage presents an immediate safety risk, advise the user to avoid the hazard and contact emergency services or a qualified professional as appropriate.
    
    # Response Format
    - Use short paragraphs for explanations and bullet points for damage details, document checklists, or estimate summaries.
    - Clearly identify missing information and the next step.
    - Summarize collected customer details using the configured Adaptive Card and request confirmation.
    - State clearly whether an action is proposed, requested, completed, or unsuccessful.
    
  3. Select Save.

Exercise 2 - Manage topics

In this exercise, you will disable the Escalate system topic as the agent will not have human representatives to hand-off to. Disabling unused system topics helps reduce ambiguity when generative orchestration determines how to respond.

Task 2.1 – Disable topics

  1. Select the Topics tab.

  2. Select the System filter.

  3. Locate the Escalate topic.

  4. Toggle Enabled to Off for the Escalate topic.

    Topics removed and disabled in Copilot Studio portal.

Disabling unused topics helps reduce ambiguity when multiple topics or generative responses could handle the same request.

Exercise 3 - Create a topic with natural language

In this exercise, you will use Copilot to create a topic from a description. This allows generative AI to draft the initial structure, which you can then refine.

Task 3.1 – Add a topic from description

  1. Select + Add a topic and select Add from description with Copilot. A new dialog appears.

    Create topic with copilot option.

    Create topic with copilot dialog.

  2. In the Name your topic text box, enter Customer Details.

  3. In the Create a topic to… text box, enter Ask the customer for their name and email address.

  4. Select Create.

  5. Select Save.

Task 3.2 – Edit nodes using natural language

  1. If the Test your agent panel is open, close the panel.

  2. If the Edit with Copilot panel is not shown on the right side of the Customer Details pane, select the Copilot icon in the upper part of the authoring canvas.

    Screenshot of the Edit with Copilot icon.

  3. Select the second Question node What is your email address?

    Screenshot of the Edit with Copilot icon.

  4. In the Edit with Copilot panel, in the What do you want to do? field, enter the following text:

    Change "What is your email address?" to say thank you to the Name variable from the previous node and then proceed to ask the email address question.

  5. Select Update.

    Screenshot of the Edit with Copilot panel with prompt.

    Screenshot of the message updated to include the Name variable.

    [!NOTE] The updated message should reference the Name variable collected in the previous question node and should look similar to the screenshot. If Edit with Copilot did not update the question node correctly, select Undo, and retry with a different prompt.

  6. Select Save.

Task 3.3 – Add an adaptive card node using natural language

In addition to modifying existing nodes, you can use Copilot to add new ones.

  1. Select an empty area on the authoring canvas so no node is selected.

  2. In the Edit with Copilot panel, in the What do you want to do? field, enter the following text:

    Summarize the information collected in an adaptive card

  3. Select Update.

    A message node with an Adaptive Card is added to the end of the topic.

    Screenshot of the message node with an Adaptive Card.

  4. Select the Media box in the Adaptive Card. The Adaptive Card properties should appear on the right of the page.

    Screenshot of the Adaptive Card properties.

    Your Adaptive Card formula should look similar to the one above. If your Adaptive Card differs significantly, you can replace it with this formula:

    {
    type: "AdaptiveCard", 
        body: 
        [
            {
                type: "TextBlock",
                size: "Medium",
                weight: "Bolder",
                text: "Summary"
            },
            {
                type: "FactSet",
                facts: 
                [
                    {
                        title: "Full Name",
                        value: Text(Topic.Name)
                    },
                    {
                        title: "Email Address",
                        value: Text(Topic.EmailAddress)
                    }
                ]
            },
            {
                type: "TextBlock",
                text: "Thank you for providing the information."
            }
        ]
    }
    

Task 3.4 – Add a question node using natural language

  1. Make sure that no node is selected by selecting the empty space in the authoring canvas.

  2. Select the Copilot icon to reopen the Edit with Copilot pane.

  3. In the What do you want to do? field, enter the following text:

    Add a new multiple choice question to prompt the user if the details are correct with two options Yes or No

  4. Select Update.

  5. A new question node is added to the end of the topic with options for the user to select.

    Screenshot of the new question node with yes and no options.

  6. Select Save.

Exercise 4 - Variable scope

Enable variables to be accessed by other topics.

Task 4.1 - Configure the scope of the variables

  1. Select the Topics tab.

  2. Select the Customer Details topic.

  3. Select Variables in the top bar to open the Variables pane (you may need to select More > Variables).

  4. Select and expand Topic variables.

  5. Select the right-hand check boxes for the three topic variables. This makes the variables available across other topics in the agent.

    Screenshot of the variables pane.

  6. Select Save.

Exercise 5 - Create a topic from blank

In this exercise, you will create the Estimate Repair topic, add nodes, and call the Customer Details topic.

Task 5.1 - Create a topic from blank

  1. Select the Topics tab.

  2. Select + Add a topic and select From blank.

  3. Select the Details icon to open the Topic details pane (you may need to select More > Details).

  4. In the Name field, enter the following text:

    Estimate Repair

  5. In the Model description field, enter the following text:

    Use this topic when a repair estimate for an insurance claim must be booked with the customer

    Screenshot of the topic details dialog

  6. Select Save.

Task 5.2 - Verify trigger type

  1. Select the Trigger node at the top of the topic. Confirm the trigger type is set to The agent chooses.

    [!NOTE] With generative orchestration enabled, the agent uses this description to decide when to use the topic.

Task 5.3 - Add a message node

  1. Select the + icon under the Trigger node and select Send a message.

    Screenshot of adding a node.

  2. In the Enter a message field, enter the following text:

    Hi, I can help you with booking a repair estimate.

  3. Select Save.

Task 5.4 - Route to the Customer Details topic

  1. Select the + icon under the Message node

  2. Select Topic management > Go to another topic > Customer Details.

    Screenshot of adding a topic management node.

  3. Select Save.

Task 5.5 - Add condition node

  1. Select the + icon under the Topic node and select Add a condition.

  2. In the Condition node, select the DetailsCorrect variable.

  3. Select is equal to.

  4. Select Yes.

    Screenshot of adding a condition node.

  5. Select Save.

Task 5.6 - Add question nodes

  1. Select the + icon under the left Condition node and select Ask a question.

  2. In the Enter a message field, enter the following text:

    What date and time would you like to book the repair estimate?

  3. Select Date and time for Identify.

  4. Select the variable in Save user response as and enter VisitDateTime for Variable name

  5. Select the + icon under the left Question node and select Send a message.

  6. In the Enter a message field, enter the following text:

    Great! Let me get that scheduled for you.

  7. After that message node, add a node to end the topics by selecting Topic management > End all topics.

  8. Select Save.

Task 5.7 - Update agent instructions

  1. Select the Overview tab.

  2. In the Instructions section, select Edit.

  3. Under # Skills in the agent instructions, enter Use the, then type / and select the Estimate Repair topic, then enter when a repair estimate is required.

    Screenshot of referencing the topic in the agent instructions.

  4. Select Save.

Exercise 6 - Test the agent

In this exercise, you will test topic routing and confirm the conversation follows the expected step-by-step flow.

Task 6.1 - Test the Estimate Repair topic

  1. Select the Test icon in the upper-right of the page to open the Test pane.

  2. In the Test pane, select the ellipsis (…) next to the variables {x} icon, and toggle Show activity map when testing to On and Track between topics to Off.

    Show activity map.

  3. At the top of the Test pane, select the Start new test session icon +.

  4. When the Conversation Start message appears, your agent will start a conversation. In response, enter the following text to trigger the topic:

    I need to book a repair estimate

  5. The conversation should begin by asking for the customer’s name.

    Screenshot of the Conversation.

  6. Provide a name.

  7. Provide an email address.

  8. After you supply the information, an Adaptive Card displays the information that you entered and asks if the details are correct. Select Yes.

    Notice that the conversation flow returns to the Estimate Repair topic.

  9. Enter Tomorrow 10:00 AM to the What date and time do you want to book the repair estimate? prompt.

    The agent responds with a confirmation message indicating the repair estimate has been scheduled.

Summary

In this lab, you created the Customer Details and Estimate Repair topics and used nodes to enforce a structured, step-by-step interaction while generative AI remained enabled. You also configured variable scope so information collected in Customer Details can be used across topics.