[Copilot Studio] Building "Behavior" with Topics, Tools, and Agent Flows: From Design to Operation Verification

[Copilot Studio] Building "Behavior" with Topics, Tools, and Agent Flows: From Design to Operation Verification

We confirmed the three components that build "behavior" into agents in Copilot Studio — topics, tools, and agent flows — by implementing them through a single subject. We follow on screen the role and proper use of each component, from conversation design to AI reasoning to deterministic automated processing.
2026.06.15

This page has been translated by machine translation. View original

Introduction

Hello, I'm Keema.

In the previous articles, we created an agent and enabled it to answer questions based on knowledge.
However, just answering questions limits it to being an "assistant." In actual business operations, you often want one more step—things like "execute a fixed procedure," "guide users through a set flow when they phrase things a certain way," or "fetch external data and process it."

Copilot Studio provides three components for building these "behaviors": Topics, Tools, and Agent Flows. The names can be confusing at first, but their roles are clearly distinct.

In this article, I'll cover these three components, verified hands-on in the actual product as of June 2026, while building along the way. The subject is "an agent that accepts KPI report creation requests." We'll walk through the entire flow—creating a topic that captures the company name and quarter, then having a tool (prompt) or agent flow generate the report based on that input—with screenshots of each screen. I hope this serves as a reference for those who want to build out conversation flows and processing in Copilot Studio.

This article is the third installment in a series on building agents in Copilot Studio.
The series aims to build an agent that handles the entire pipeline of "collection → aggregation → charts → insights → documentation," and this article covers the foundational "moving parts."

Target audience: Those who want to understand the differences and use cases of topics, tools, and agent flows in Copilot Studio, and try them out in practice.

Series Article List

# Theme Article
Part 1 First agent Creating My First Agent
Part 2 Knowledge (collection) Trying Knowledge-Grounded Answers Based on Files
Part 3 Topics, Tools, and Flows (this article) (This article)

1. What We'll Do This Time

  • Organize the roles and use cases of the three components: topics, tools, and agent flows
  • Create a topic from scratch and confirm that the conversation flow works in the test chat
  • Examine the contents of a tool (AI prompt) on screen and understand the flow from input to output
  • Review the structure of an agent flow on screen and understand its role as deterministic automated processing

2. The Differences Between the Three "Action" Components

First, let's organize what each of the three components is for. Understanding this will prevent confusion about which one to use in a given situation.

Component Role Suited for How it works
Topic Build the conversation flow (scenario) "When phrased this way, ask questions and guide in this order" Conversation-based (question → conditional branching → message)
Tool Add one "capability" to the agent AI inference (prompts), connectors, MCP, REST APIs, etc. Called by the agent as needed
Agent Flow Automatically execute a fixed procedure Deterministic processing like "fetch data → process → generate file" Executes steps from top to bottom in order

In short: topics build the conversation path, tools add individual capabilities, and agent flows automate procedures step by step.

When generative orchestration is enabled, users don't need to specify which component to use. The agent automatically selects and executes the appropriate topic, tool, knowledge, or other agent based on descriptions and names. Note that agent flows are not independently selectable—they become part of this selection by being added as tools.

This behavior of "the agent choosing its own components" is hard to grasp from text alone, so we'll verify it with actual screens in Chapter 3.

3. Topics: Designing the Conversation Flow

A topic is a component that assembles a conversation flow using a node-based editor.
It consists of a trigger (when to activate) and the nodes that follow (what to do).

Here we'll create a topic for "accepting a report creation request" from scratch. There are three things we want to accomplish:

  • When the user asks to "create a report," this topic activates
  • Capture "which company" and "which quarter" and save them to variables
  • Confirm the receipt, including the captured information

3.1 Creating a Topic

Open the "Topics" tab of the agent to see a list of topics.
Click "Add a topic" and choose "From blank" to create an empty topic.

Opening "Add a topic" from the topic list
Select "Add a topic" → "From blank" from the topic list. Choosing "Add with Copilot using a description" lets you automatically generate a draft from a description.

3.2 Setting the Trigger and Description

When you open the topic editor, a trigger appears at the top. For agents with generative orchestration, the default trigger is "Selected by the agent." This doesn't mean "activate when a specific keyword appears"—it means the agent decides whether to activate based on the topic's description.

This makes the description extremely important. Writing "when this topic should be used" here allows the agent to read that description and decide whether to activate. For this topic, I wrote:

Activates when the user requests the creation or delivery of a KPI report. Confirms the target company and quarter, then informs the user that the report creation request has been accepted.

Trigger and description in the topic editor
The trigger is "Selected by the agent." Writing "when to activate" in the description lets the agent read this text and decide whether to activate.

3.3 Saving Answers to Variables with Question Nodes

Add nodes below the trigger. To add a node, click the "+" below a node. A list of available node types will appear.

Node addition menu
Clicking "+" shows a list of addable nodes. We'll use "Ask a question" here. Others include send a message, conditional branching, variable management, and more.

Selecting "Ask a question" adds a question node. The main settings for a question node are:

  • Question text: What to ask the user (e.g., "Which company's report would you like to create?")
  • Identify: What information to extract from the answer. This time, we used "User's entire response" (use the input as-is)
  • Save user response as: Which variable to store the extracted value in

This "save to variable" is the most important point in topics. By storing the answer in a variable, you can use that value in later nodes. This time, we saved the company name to a variable called CompanyName.

Saving the answer to the CompanyName variable in a question node
Question node settings. Asking "Which company's report would you like to create?" and saving the entire response to CompanyName (string). This is the "variable set" state.

3.4 The Complete Topic Overview

Following the same approach, add a second question node and save the quarter to the Quarter variable.
The completed topic flows like this:

Complete topic overview
The completed topic. Trigger → Question 1 (save company name to CompanyName) → Question 2 (save quarter to Quarter) → Confirmation message, flowing from top to bottom.

To summarize, this topic creates a conversation that "when activated, asks for the company name and quarter in order, and saves each to a variable." A topic is a component where you visually assemble "when to activate (trigger)," "what order to ask and guide (nodes)," and "where to save answers (variables)."

3.5 Testing: Having a Conversation

Let's run the created topic in the test chat.
When I entered "I'd like you to accept a report creation request," the topic activated and the first question was returned.

Topic activated in the test chat and the first question was returned
When asked "I'd like you to accept a report creation request," the topic activates and responds with "Which company's report would you like to create?"

What's notable here is that the user didn't specify "use this topic." The agent compared the phrasing with the topic's description (written in 3.2) and determined "this is a report request acceptance," then activated it. This is how topics behave under generative orchestration.

When I continued by answering the company name (CloudNova) and quarter (Q2 2025) in order, the topic completed the acceptance. The actual exchange in the test chat looked like this:

Agent: Hello, I am the KPI Report Creation Assistant. Please let me know what you need.
You: I'd like you to accept a report creation request
Agent: Which company's report would you like to create? (e.g., CloudNova / StreamForge / Datapeak)
You: CloudNova
Agent: Please tell me the target quarter. (e.g., Q1 2026)
You: Q2 2025
Agent: I will create the KPI report for CloudNova Q2 2025. Please wait a moment.

Even with the vague phrasing "I'd like you to accept a report creation request," the topic activated and captured the company name and quarter one by one, completing the acceptance. At this point, the execution trace on the left shows "which topic was selected and what happened."

Execution trace and summary of captured information
The left execution trace shows the "Report Request Acceptance" topic as completed. The right chat shows an acceptance message reflecting the captured company name (CloudNova) and quarter (Q2 2025).

The captured company name and quarter are reflected directly in the response. This is because the CompanyName and Quarter variables saved in the question nodes are used in the confirmation message. By saving to variables, you can retrieve and use those values later.

3.6 Testing: From Topic to Tool

After acceptance was complete, the agent proposed next steps such as "charting metrics like ARR" or "creating a Word-format report." When I asked "Please turn this KPI report into a Word file," the agent referenced the knowledge (registered KPI summaries) and then called a tool ("KPI Report Fill-in (Word)" prompt from the next chapter), generating a Word-format KPI comparison report.

The summary of the generated report is as follows (from the agent's response; target period: FY2025 Q2):

KPI Metric CloudNova StreamForge Datapeak
ARR (millions of yen) 1,800 1,150 2,600
NRR (%) 118% 104% 126%
Operating Profit Margin (%) 12.5% −3.0% 18.4%

The agent also included insights such as "Datapeak leads in both ARR and NRR with the highest operating profit margin. CloudNova has a high NRR and strong customer retention. StreamForge has a negative operating profit margin and needs improvement in both growth and profitability," and announced that the KPI comparison report (Word format) was complete (figures are fictional test data).

After acceptance, the agent called the report fill-in tool
When asked "Please turn it into a Word file," the agent referenced the knowledge and called the "KPI Report Fill-in (Word)" tool. The left trace shows 3 steps: Acceptance → Knowledge reference → Fill-in (Word), and the right displays the KPI comparison report (Word format) generated by the tool.

This shows how "the topic receives information through conversation, then the tool takes over the processing"—the connection between components. In the next chapter, we'll look inside this "tool."

4. Tools: Building Processing with AI Prompts

A tool is a component that adds one "capability" to the agent.
Opening "Add a tool" displays a list of types you can add.

Add a tool menu
Adding a tool. New creation options include Agent flow / Prompt / Model Context Protocol (MCP) / Computer use. The bottom row shows connectors for Office 365, Teams, SharePoint, etc.

The main types you can create from scratch are:

Type What it is
Agent Flow A flow that automates a fixed procedure (covered in the next chapter)
Prompt Natural language AI inference. Analyzes and transforms text, documents, and data
Model Context Protocol (MCP) A common protocol for agents to connect to external data and tools
Computer use UI-based operation of web and desktop apps (Copilot Credits billing: 5 credits/step for standard model, 15 for premium)

In addition to these, connectors such as Office 365 Outlook, Microsoft Teams, and SharePoint, as well as REST APIs, can be added as tools.

Of these, the easiest way to create "processing" is with a prompt. A prompt tool receives input, performs AI inference according to instructions (a prompt), and returns the result. The "KPI Report Fill-in (Word)" that the agent called in Chapter 3 is also this type of prompt tool. Let's look at its contents.

4.1 Writing Instructions in the Prompt Builder

Creating a new prompt opens the prompt builder.
Write the instructions (prompt) on the left and review results on the right as you build. This is "where you enter the prompt."

Prompt builder overview
Prompt builder. Instructions (prompt) on the left, model to use at the top center, output format and results on the right.

Write "what kind of AI this is" in the instructions. For this KPI report fill-in, I wrote instructions to "fill in the given KPI figures into the designated fields of a Word template."

4.2 Choosing a Model

Near the instructions, there's a field for selecting the model to use. This is where you decide which AI model will be used for the prompt's processing.

Model selection dropdown
Model selection. Divided into Basic, Standard, and Premium grades; the default is GPT-4.1 mini (Basic). Claude and xAI models also appear at the bottom.

As of June 2026, the following models were available in my environment:

Grade Model (examples)
Basic (default) GPT-4.1 mini
Standard GPT-4.1, GPT-5 chat, Claude Sonnet 4.6
Premium GPT-5 reasoning, Claude Opus 4.6

Without any changes, the default GPT-4.1 mini (Basic) is used. The idea is to start with this default—it's sufficient for light summarization or fill-in tasks—and switch to a higher-grade model only when you need more complex reasoning.

4.3 Defining Inputs and Outputs

A prompt tool is essentially a set of three elements: "input → AI inference → output." Here we define the entry point (input) and exit point (output).

  • Input: Where you define the data passed to this tool from outside (set in the tool details screen)
  • Output: What format the result is returned in (text / JSON / document; selected in the prompt builder)

First, input. The tool details screen has an "Input" section.

Input field on the tool details screen
Tool details screen. "Input" is not configured (no input). The "Done" field at the bottom controls the agent's behavior after the tool finishes (default is "No response") and is separate from the output format.

No input is needed this time. This tool has the KPI figures to fill in written directly in the instructions (prompt), so no input is required. If you want to change the company name, quarter, and KPIs per call, you can add inputs here and pass values when calling from the agent (that dynamic passing approach will be covered in a later "documentation" installment).

Next, output. The output format is selected in the "Output" in the upper right of the prompt builder seen in 4.1. The default is text; choose JSON for structured output, or Document (preview feature) when you want to create a Word file.

Output format selection
Opening "Output" in the upper right of the prompt builder. You can choose from text, JSON, or document. We selected "Document" here to create a Word file.

With document output, you provide a Word template with blank fields, and the AI model fills in the appropriate values for each field and outputs a Word file.

To summarize, this tool creates a single process: "Input: none (KPIs embedded in instructions) → AI inference: selected model determines values to fill in → Output: Document (Word)." The Word report the agent returned in 3.6 was generated by exactly this tool.

5. Agent Flows: Deterministic Automated Processing

An agent flow is a component that executes a fixed procedure from top to bottom in order.
While topics handle "conversation" and prompts handle "one-shot AI inference," agent flows are suited for reliably executing multi-step automated processing like "fetch data, process it, create a file..."

5.1 Building Steps in the Flow Designer

Agent flows are built in a dedicated flow designer.
Starting from a trigger, actions are arranged in order from top to bottom.

The flow I created for this series goes through these steps: "Get values from Excel → Create a summary comment with a prompt → Create a Word file → Issue a sharing link."

Note that the Word document the agent returned in 3.6 was generated by the prompt tool in Chapter 4 alone. The flow in this Chapter 5 is a separate, more complex example that includes Excel aggregation and file distribution.

Steps in the flow designer
Flow designer. Triggered by "When an agent calls a flow," then executing in order from top: Get rows (Excel) → Run a prompt → Create file → Create sharing link.

Looking at each step reveals the nature of flows clearly:

  • Get rows: Read values from Excel Online (connector)
  • Run a prompt: Call a prompt like the one in Chapter 4 (AI inference) within the flow
  • Create file / Create sharing link: Create a file in OneDrive and issue a sharing link (connector)

In this way, a flow is a component that combines connectors and AI inference in a fixed sequence. You can divide responsibilities within a single procedure—leaving flexible parts (like generating summary comments) to AI and mechanical, reliable parts (like reading Excel or creating files) to connectors.

5.2 Checking Execution Status and Connectors

Flows have an overview screen where you can check the execution history and the connectors (connections) being used.

Flow overview and execution history
Flow overview screen. The execution history at the bottom shows past executions completed "successfully." On the right, the connections used by this flow are listed (Excel Online, Dataverse, OneDrive).

The execution history shows when each run occurred and whether it succeeded. Since a flow is a component that executes a fixed procedure, you can review this history afterward to confirm "did it run through the same steps correctly every time."

A flow can be added to an agent as a "tool." This means the agent calls the flow as needed and has it execute the fixed procedure (this is what was meant in Chapter 2 by "flows become selectable as tools").

5.3 When to Use Flows vs. Topics and Prompts

Why is a flow necessary separate from "topics" and "prompts"?

Because there are processes where you need to follow exactly the same steps reliably every time. AI generation is flexible, but it doesn't always produce identical results. On the other hand, business processes like "get values from Excel → aggregate → fill into Word → issue sharing link" should run through exactly the same steps every time. The basic approach is to leave deterministic processes like these to flows, and only use prompts for the parts that need flexibility like text generation.

6. Summary

We confirmed the three components for building "behavior" into an agent through a single use case.

  • Topic: Designs the conversation flow (trigger + nodes). Created a "Report Request Acceptance" topic from scratch, saved company name and quarter to variables, and confirmed how the agent activates the topic based on the request.
  • Tool (Prompt): Creates a single input → AI inference → output process. Confirmed the instructions, model, and I/O on screen. Well-suited for flexible generation processing like filling in Word documents.
  • Agent Flow: Executes a fixed procedure reliably. Well-suited for deterministic processing like Excel aggregation and file distribution.

The key distinction is: "topics build conversations, tools add capabilities, flows automate procedures." And as we saw today, these don't just work independently—they connect, like "topic accepts input → tool or flow handles processing," to accomplish a single task together.

References

Share this article