Building agents with Copilot Studio
By Emil Björk · Microsoft business apps consultant, Gothenburg
How to design Copilot Studio agents — topics vs generative answers, knowledge grounding, actions, multi-turn dialogs, and operational patterns.
On this page (10)
Building a useful Copilot Studio agent is straightforward in mechanics and demanding in discipline. The platform is generous; the design choices around it decide whether the agent is a hit or a forgotten experiment.
Decide what the agent is for
Before opening Copilot Studio, write down one sentence: "This agent helps [audience] do [task] by [capability]." If you can't write that sentence cleanly, the agent will sprawl. The good ones are narrow.
Topics vs generative answers
Two complementary mechanisms:
-
Topics are structured conversation paths — named triggers, branching nodes, prompts, variable-setting, conditional branching, calls to actions. Topics are deterministic: given input X, do exactly Y. The right pattern for critical flows ("reset my password", "open a ticket", "check my order status") where you need predictable behaviour, hand-off paths, and audit.
-
Generative answers use the LLM to synthesise responses from connected knowledge sources (SharePoint, websites, documents, Dataverse). The right pattern for the long tail of "how do I" questions where authoring an explicit topic for each variation would be infeasible.
A well-designed agent has 10–30 topics covering critical flows and generative answers picking up the rest.
Knowledge sources.
- SharePoint sites — index your internal documentation, knowledge base, policy docs.
- Public websites — point at a public domain for indexed retrieval.
- Dataverse tables — answer questions grounded in your CRM data.
- File uploads — for static reference content.
- External services — through custom connectors.
Citations link generative answers back to the source, so users can verify and audit can review.
Actions
Actions let the agent do things, not just answer. Built-in actions can call Power Automate flows, REST APIs, Dataverse operations, or third-party connectors. The agent decides when to call an action based on the conversation and the action's description, so write action names and descriptions clearly — they're how the LLM matches user intent to capability.
Multi-turn dialogs
Topics support multi-turn dialogs with variables, conditional branches, and user clarifications. When the agent needs information before acting (e.g. "I'll open a case; what's your contact email?"), the dialog gathers it cleanly with validation and fallbacks.
Hand-off
When the agent can't help, hand off gracefully. Configure escalation to a human agent through Omnichannel for Customer Service, or to a team via Teams, or to email — whichever fits the channel.
Channels
A single agent publishes to Teams, the web, Power Pages, WhatsApp, SMS, Facebook Messenger, Omnichannel for Customer Service. Channel-specific tweaks (e.g. card layouts for adaptive-card-capable channels) handle the variation.
Testing
The Copilot Studio designer includes a test pane with conversation playback and an issue tracker. Build a regression test set — known good prompts and their expected behaviour — and re-run before publishing.
Telemetry
Every conversation is logged with topic triggers, action calls, knowledge hits, and outcomes. Use the analytics to identify topics that aren't triggering when they should, generative answers that lack source coverage, and topics that escalate too often.
Governance
Microsoft Purview integrates for content policies, sensitive-data detection, and DLP. Multi-environment ALM (dev → test → prod) is supported through solutions.
Operational reality
Ship a small agent. Measure adoption and resolution rate. Iterate weekly for the first month. Grow the topic and knowledge surface based on actual user prompts, not imagined ones.
Further reading
Related guides
- Copilot agents vs Copilot StudioHow Microsoft's agent strategy splits — Copilot Studio for building custom agents, declarative agents in Microsoft 365 Copilot, autonomous agents.
- Copilot Studio for Dynamics 365Building AI agents on top of Dynamics 365 with Copilot Studio — topics, knowledge sources, generative answers, and Dataverse integration.
- Microsoft 365 Copilot for Dynamics 365How Microsoft 365 Copilot reaches into Dynamics 365 — graph connectors, agents, and the licensing layers that determine what users actually get.
- AI Builder explainedMicrosoft's no-code AI model library inside the Power Platform — pre-built models, custom training, and what AI Builder is good at.
- AI Builder document automation, in depthHow AI Builder's document automation works — pre-built models, custom training, output structure, and the right way to integrate it with Dynamics 365.
Browse every guide in Power Platform or just Copilot & AI.
Copilot & AI in Dynamics 365
Was this helpful?
Signals which guides land and which need work. No account, no comment box — corrections go through the contact page.
Spot something wrong or want a topic covered? Send a correction or a topic request — both are welcome.