Post

Microsoft's AI Stack Decoded, Part 3: Copilot Studio

Building production AI agents without code. When to use Copilot Studio vs Agent Framework, and how to build agents that actually work.

Microsoft's AI Stack Decoded, Part 3: Copilot Studio

The 80/20 of Enterprise AI

Here’s a truth that developers don’t like to hear:

80% of enterprise AI agents don’t need custom code.

They need:

  • A knowledge base (SharePoint, Dataverse, websites)
  • Some business logic (if X, do Y)
  • Integration with existing systems (ServiceNow, SAP, Salesforce)
  • Deployment to where users already are (Teams, web, mobile)

For these use cases, Copilot Studio is the right tool. Not Agent Framework. Not LangChain. Not a custom Python service.

This is Part 3 of the Microsoft AI Stack series. Let’s build some agents without writing code.


What is Copilot Studio?

Copilot Studio is Microsoft’s no-code/low-code platform for building AI agents. It’s the evolution of Power Virtual Agents, but now with:

  • Generative AI — Agents can reason, not just follow scripts
  • Knowledge grounding — Connect to SharePoint, websites, documents
  • Actions — Call Power Automate flows, connectors, APIs
  • Multi-channel deployment — Teams, web, Dynamics, custom apps

Think of it as the “Power Apps for AI agents.”


Building Your First Agent

Step 1: Create the Agent

  1. Go to copilotstudio.microsoft.com
  2. Click CreateNew copilot
  3. Give it a name and description
1
2
Name: Federal Benefits Navigator
Description: Helps federal employees understand their benefits options

Step 2: Define Instructions

This is the system prompt. Be specific:

1
2
3
4
5
6
7
8
9
10
11
12
13
You are a helpful HR assistant for federal employees.

Your role:
- Answer questions about FEHB (health insurance), FERS (retirement), TSP, and FEGLI (life insurance)
- Help employees compare plan options
- Explain enrollment periods and deadlines
- Direct complex questions to their HR specialist

Rules:
- Always base answers on official OPM guidance
- If you're unsure, say so and recommend they contact HR
- Be concise but thorough
- Never provide medical or financial advice

Step 3: Add Knowledge

This is where the magic happens. Connect your agent to actual information:

SharePoint:

1
2
3
4
5
6
Site: https://agency.sharepoint.com/sites/HR
Libraries: 
- Benefits Guides
- Policies
- FAQs
- Open Season Materials

Websites:

1
2
3
- https://www.opm.gov/healthcare-insurance/
- https://www.tsp.gov/
- https://www.opm.gov/retirement-services/

Dataverse:

1
2
3
4
Tables:
- Benefits Plans (current year options)
- Enrollment Deadlines
- HR Contacts by Region

The agent will automatically ground its responses in this knowledge. When someone asks “What’s the deadline for open season?”, it pulls from your actual data.

Step 4: Add Actions

Actions let your agent DO things, not just answer questions:

Look up employee info:

1
2
3
4
5
Action: Get Employee Benefits
Connector: Dataverse
Table: Employees
Filter: Email = @User.Email
Returns: Current plan, Enrollment status, Eligible plans

Submit a request:

1
2
3
4
5
6
7
8
Action: Submit Benefits Question
Connector: ServiceNow
Operation: Create Incident
Fields:
  - Category: HR
  - Subcategory: Benefits
  - Description: @User.Question
  - Caller: @User.Email

Send confirmation:

1
2
3
4
5
6
Action: Send Email Confirmation
Connector: Office 365 Outlook
Operation: Send Email
To: @User.Email
Subject: Your benefits question has been submitted
Body: We received your question and will respond within 2 business days.

Step 5: Deploy

One click to publish to:

  • Microsoft Teams — Appears as a chat bot
  • Website — Embed with an iframe
  • Dynamics 365 — In-context help
  • Power Apps — Inside custom apps
  • Custom channels — API access

Day in the Life Example

Here’s a realistic conversation with our Benefits Navigator:

Employee: When is open season this year?

Agent: Federal Benefits Open Season for 2026 runs from November 11 through December 13, 2026. During this period, you can:

  • Enroll in, change, or cancel your FEHB coverage
  • Enroll in or change your FEDVIP dental/vision coverage
  • Make changes to your FSA elections

Would you like me to explain any of these options in more detail?


Employee: I’m trying to decide between Blue Cross Basic and GEHA Standard. Which one covers more doctors in Virginia?

Agent: Both Blue Cross Basic and GEHA Standard have broad networks in Virginia, but there are differences:

Blue Cross Basic (Standard Option)

  • Network: Nationwide PPO
  • Virginia providers: 95% of hospitals, 89% of physicians
  • Monthly premium (Self + Family): $687.42

GEHA Standard

  • Network: Nationwide PPO
  • Virginia providers: 92% of hospitals, 85% of physicians
  • Monthly premium (Self + Family): $621.38

For the most accurate provider search, I recommend using:

Would you like me to help you compare coverage for a specific doctor or hospital?


Employee: Can you check if my current plan covers the medication Ozempic?

Agent: I can help with that. Let me look up your current plan.

[Calls Get Employee Benefits action]

I see you’re enrolled in GEHA High Option.

For Ozempic (semaglutide):

  • Coverage: Yes, covered under Tier 3
  • Copay: $75 for 30-day supply after deductible
  • Prior Authorization: Required
  • Step Therapy: Must try metformin first

Would you like me to explain the prior authorization process?


When to Use Copilot Studio vs Agent Framework

Use Copilot Studio when…Use Agent Framework when…
Knowledge Q&A is the primary use caseComplex multi-step reasoning
Business users need to maintain itDevelopers own the full stack
Standard connectors cover your integrationsCustom API integrations required
Teams/web deployment is sufficientCustom UX or embedding needed
Quick time to value mattersPerformance optimization critical
Governance/compliance needs are standardCustom audit/logging requirements

The honest answer: Start with Copilot Studio. Move to Agent Framework when you hit its limits.


Advanced Patterns

Topic-Based Routing

For complex agents, define topics that trigger specific behaviors:

1
2
3
4
5
6
7
8
9
10
11
12
Topic: Benefits Enrollment
Triggers:
  - "enroll in benefits"
  - "sign up for insurance"
  - "change my plan"
  
Flow:
  1. Ask: "Are you enrolling for the first time or making a change?"
  2. If first time → New Employee Enrollment flow
  3. If change → Check if Open Season is active
     - If yes → Guide through change process
     - If no → Explain Qualifying Life Events

Generative + Scripted Hybrid

Use generative AI for open-ended questions, but scripted flows for critical processes:

1
2
3
4
5
6
7
8
9
10
11
12
13
Topic: Submit Leave Request
Type: Scripted (not generative)
Reason: Legal/compliance requirements

Flow:
  1. Ask: Leave type (Annual, Sick, FMLA, etc.)
  2. Ask: Start date
  3. Ask: End date  
  4. Ask: Reason (for FMLA/extended leave)
  5. Confirm details
  6. Call: Submit Leave Request action
  7. Send: Confirmation email
  8. Say: "Your leave request has been submitted. Your supervisor will be notified."

Escalation to Human

Always provide an escape hatch:

1
2
3
4
5
6
7
8
9
10
11
12
13
Topic: Talk to Human
Triggers:
  - "talk to a person"
  - "speak to human"
  - "real person"
  - "escalate"
  - "this isn't helping"

Flow:
  1. Say: "I understand you'd like to speak with someone. Let me connect you."
  2. Ask: "Brief description of your issue?"
  3. Call: Create Support Ticket
  4. Say: "I've created ticket #[number]. An HR specialist will contact you within 4 hours."

Governance and Analytics

Copilot Studio includes built-in governance:

Analytics Dashboard:

  • Total sessions
  • Resolution rate (answered vs escalated)
  • User satisfaction scores
  • Top topics
  • Failed queries (what the agent couldn’t answer)

DLP Policies:

  • Block sensitive data in responses
  • Prevent certain topics
  • Require authentication for sensitive actions

Environment Controls:

  • Separate dev/test/prod environments
  • Role-based access to agent editing
  • Solution-based deployment (ALM)

The Agent Factory Pattern

For teams building many agents, consider a factory approach:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# agent-spec.yaml
name: Contract Review Assistant
description: Helps procurement officers review vendor contracts

instructions: |
  You assist federal procurement officers in reviewing contracts.
  Focus on:
  - Identifying non-standard clauses
  - Flagging compliance risks
  - Comparing to agency templates

knowledge:
  - type: sharepoint
    site: https://agency.sharepoint.com/sites/Procurement
    libraries: [Contract Templates, FAR References, Past Performance]

actions:
  - name: flag_for_legal
    description: Escalate contract to legal review
    connector: Power Automate
    flow: Flag Contract for Legal

channels:
  - teams

Deploy with:

1
pac copilot push --from agent-spec.yaml

This lets you version control agents, review changes in PRs, and deploy consistently across environments.


Real-World Examples

Example 1: IT Help Desk

Knowledge: SharePoint IT knowledge base, known issues, how-to guides Actions: Create ServiceNow ticket, Reset password (via Power Automate), Check system status Result: 40% reduction in L1 tickets

Example 2: Policy Q&A

Knowledge: Agency policy SharePoint, FAM/FAH, OPM guidance Actions: None (pure Q&A) Result: Employees find answers in 30 seconds vs 30 minutes searching

Example 3: Onboarding Assistant

Knowledge: New employee handbook, benefits guides, IT setup docs Actions: Request equipment, Schedule orientation, Submit I-9 verification Result: 60% reduction in HR onboarding questions


What’s Next

Copilot Studio handles the 80%. But what about compliance, audit trails, and AI safety at scale? That’s Part 4: The Governance Layer.


This is Part 3 of the “Microsoft AI Stack Decoded” series. Part 1 covers the full platform. Part 2 covers the Agent Framework for developers.

This post is licensed under CC BY 4.0 by the author.