Custom Copilots, Agents & Prompt Libraries
Learn how to build AI agents with Microsoft Copilot Studio and create reusable prompt libraries that your organisation can share and standardise.
What is Copilot Studio?
Copilot Studio is Microsoft's low-code/no-code platform for building custom AI agents. These agents can answer questions from your business data, automate workflows, and integrate directly into Teams, SharePoint, websites, or Microsoft 365 Copilot itself.
Think of it as building your own specialised ChatGPT — but one that knows your company's data, follows your rules, and can take actions in your systems.
The Microsoft Agent Landscape
Agent Builder (in M365 Copilot)
Quick way to create simple agents right inside Microsoft 365 Copilot using natural language. Great for personal or team productivity agents.
Copilot Studio
Full low-code platform for building sophisticated agents with custom knowledge, topics, actions, and multi-channel deployment.
Azure AI Foundry
Pro-code platform for developers building complex AI solutions with custom models, fine-tuning, and advanced orchestration.
Agents SDK / Toolkit
Open-source dev kit for building agents in code (TypeScript/Python) with full control over the agent framework.
What You'll Learn
- How to build a custom agent from scratch in Copilot Studio
- How to connect knowledge sources (SharePoint, websites, Dataverse)
- How topics and conversation flows work
- How to add actions (Power Automate, connectors, APIs)
- How to create and organise a reusable prompt library
- How to build knowledge packs for consistent AI responses
- How multi-agent orchestration and MCP integration works
Copilot Studio: Lite vs Full
Since late 2025, Microsoft offers two tiers. Understanding which to use saves licensing headaches.
🔹 Copilot Studio Lite
Included with Microsoft 365 Copilot licence
- Build simple internal agents
- Knowledge from SharePoint, websites, files
- Deploy to Teams and M365 Copilot
- No usage limits for internal agents
- No extra cost
Best for: FAQ bots, helpdesks, onboarding assistants, team knowledge agents
🔸 Copilot Studio Full
Requires separate licence + Azure subscription
- Everything in Lite, plus:
- Autonomous agents (trigger-based)
- External channel deployment (websites, apps)
- 1,400+ external connectors
- Multi-agent orchestration
- Advanced Power Automate integration
- Pay-as-you-go with Copilot Credits
Best for: Customer-facing bots, complex workflows, external integrations, autonomous processes
How to Access Copilot Studio
Build Your First Agent
Create an agent in minutes using natural language — no code required.
Creating the Agent
Help employees find answers about company HR policies, including leave, benefits, and onboarding procedures.
The Instructions (System Prompt)
The Instructions field is essentially the agent's system prompt — it defines personality, behaviour, and constraints. This can be up to 8,000 characters. Good instructions include:
- Role — "You are a helpful HR assistant for Sustainsys Consulting"
- Tone — "Be professional but friendly, use UK English"
- Boundaries — "Only answer questions about HR policies. For other topics, redirect to the appropriate team"
- Format — "Keep answers concise. Use bullet points for lists. Always cite the source document"
Test As You Build
Copilot Studio has a live test panel on the right side. After every change, click "Start new test session" and try asking questions. This is the fastest feedback loop — change instructions, test, refine, repeat.
Connect Knowledge Sources
Knowledge sources are what make your agent smart about your specific business data. Without them, the agent only has generic AI knowledge.
Available Knowledge Types
| Source | What It Does | Best For |
|---|---|---|
| Public Websites | Searches URLs via Bing for relevant snippets | Product docs, public FAQs |
| SharePoint | Searches SharePoint sites, libraries, lists | Internal policies, handbooks, wikis |
| OneDrive Files | Upload specific files/folders | Specific documents, guides |
| File Uploads | Upload PDFs, DOCX, PPTX directly | Quick testing, small doc sets |
| Dataverse | Structured data tables + file columns | CRM data, business records, glossaries |
| Graph Connectors | External systems indexed in M365 Graph | ServiceNow, Salesforce, Jira, custom |
| Outlook & Teams | Emails, chats, channel messages | Context from communications |
Adding Knowledge
How It Works Under the Hood
When you add knowledge, Copilot Studio:
- Chunks uploaded files into smaller pieces for faster processing
- Creates vector embeddings for semantic search (stored in Dataverse)
- When a user asks a question, it finds the most relevant chunks that match
- Feeds those chunks to the LLM as context for generating the response
- Returns the answer with citations back to the source
This is essentially a managed RAG pipeline — the same architecture you've been building with ChromaDB and LlamaIndex, but handled by Microsoft's infrastructure.
Topics & Conversation Flow
Topics are the building blocks of your agent's behaviour — think of them as "intents" with built-in conversation logic.
What Are Topics?
A topic is a discrete conversation path your agent can follow. It has:
- Trigger phrases — what the user says to activate it (e.g., "book a meeting room", "reset my password")
- Conversation nodes — the steps: ask questions, show messages, call actions, branch based on conditions
- Variables — store user input and pass data between nodes
Two Orchestration Modes
Classic Orchestration
Topics are matched by trigger phrases. The agent follows a structured conversation tree you design. Predictable and controlled.
Good for: Strict workflows, compliance scenarios, guided processes
Generative Orchestration
The AI dynamically decides which topic/knowledge/action to use based on context. More flexible, more conversational.
Good for: Open-ended Q&A, knowledge assistants, natural conversations
Creating a Topic
Actions, Tools & Integrations
Actions turn your agent from a Q&A bot into something that can actually do things — send emails, create tickets, update records.
What Can Agents Do?
| Tool Type | Description | Example |
|---|---|---|
| Power Automate Flows | Run automated workflows | Submit a leave request, create a Jira ticket |
| Connectors (1,400+) | Pre-built integrations with external services | Query Salesforce, post to Slack, read from SAP |
| Custom Connectors | Connect to your own APIs | Call your internal REST API |
| MCP Servers | Model Context Protocol servers | Connect to any MCP-compatible tool |
| Prompts | Reusable AI prompt templates | Summarise, classify, extract data |
| Code Interpreter | Run Python for data analysis | Analyse uploaded CSV, create charts |
Adding an Action
Publishing Your Agent
Once your agent is ready, you can deploy it to multiple channels:
- Microsoft Teams — appears as a chat bot in Teams
- Microsoft 365 Copilot — accessible via @mention in Copilot
- SharePoint — embedded on intranet pages
- Websites — embed via iframe or Web Chat widget (Full tier)
- WhatsApp — connect via Twilio or direct (Full tier)
- Demo website — quick shareable link for testing
Understanding Prompts in Microsoft's Ecosystem
Microsoft has two related but distinct "prompt" concepts. Let's untangle them.
Prompt Gallery (M365 Copilot)
The Prompt Gallery lives inside Microsoft 365 Copilot (the chat experience). It's a catalogue of ready-made prompts that help users get more out of Copilot. Think of it as a recipe book for Copilot users.
- Microsoft-authored prompts — pre-built for Word, Excel, PowerPoint, Outlook, Teams
- User-created prompts — you can save your own effective prompts
- Shared prompts — share with your team or organisation via collections
- Stored securely in Microsoft 365 Substrate data store
Access it at m365.cloud.microsoft/copilot-prompts or within M365 Copilot.
Prompt Builder (Copilot Studio)
The Prompt Builder in Copilot Studio is more powerful — it lets you create reusable, modular AI prompts that guide agents to perform specific tasks. These are essentially prompt templates with dynamic inputs.
- Create prompts for: summarising, classifying, extracting, translating, sentiment analysis
- Use input variables for dynamic context at runtime
- Add knowledge data to ground responses
- Use Power Fx logic inside prompt inputs for calculations and formatting
- Share prompts with other makers and reuse across agents and flows
Prompt Builder = maker/developer prompts (building agents and automations).
A well-organised prompt library strategy covers both audiences.
Build a Prompt Library
A structured collection of reusable prompts that your organisation can share, standardise, and continuously improve.
Organising Your Library
A good prompt library is organised by function, not by tool. Group prompts into categories your teams actually use:
Reporting & Analysis
"Summarise this quarterly report highlighting risks and opportunities" / "Extract KPIs from this spreadsheet"
Content Creation
"Draft a client proposal based on these requirements" / "Write a LinkedIn post about this achievement"
Decision Support
"Compare these two vendor proposals on cost, features, and risk" / "Assess this CV against the job spec"
Communication
"Draft a follow-up email to [client] about [project]" / "Summarise this email thread for my manager"
Creating a Prompt in Copilot Studio
You are a document summariser for Sustainsys Consulting. Given the following document content: [DocumentContent] Provide a summary that includes: - Key findings (3-5 bullet points) - Risks identified - Recommended next steps Keep the summary under 300 words. Use UK English. Format as markdown with clear headings.
[DocumentContent], [ClientName], [TimeFrame]Sharing via M365 Prompt Gallery
For end-user prompts (not agent-builder prompts), use the M365 Prompt Gallery:
- Create prompts in Microsoft 365 Copilot and save them
- Click "Share" to share with specific teams or security groups
- Shared prompts appear in colleagues' Prompt Gallery under "Shared with me"
- Admins can track usage via Copilot analytics
Include format specs — tell it exactly how you want the output.
Add context — "for Sustainsys Consulting" gives better results than generic instructions.
Version your prompts — track what changed and why.
Review regularly — refine your best prompts based on actual usage.
Reusable Knowledge Packs
Combine curated knowledge sources + tested prompts + agent instructions into reusable packages that can be deployed across multiple agents.
What is a Knowledge Pack?
A knowledge pack is a reusable bundle that packages together everything an agent needs to handle a specific domain:
Building a Knowledge Pack
Here's a practical pattern for creating a reusable knowledge pack using the tools available today:
1. Curate Your Documents
Gather the authoritative documents for your domain into a dedicated SharePoint folder or document library. Keep it focused — an HR knowledge pack should only have HR documents, not the entire company wiki.
2. Create a Glossary
Build a glossary of domain-specific terms. In Copilot Studio, this can be a CSV file in Dataverse with columns for term, definition, and context. This helps the agent correctly interpret industry jargon — especially important in fields like financial services and healthcare.
Term,Definition,Context BAU,Business As Usual,Operations and project management SLA,Service Level Agreement,Client contracts and service delivery RAG,Red Amber Green status,Project reporting (not Retrieval Augmented Generation) MoSCoW,Must Should Could Won't,Requirements prioritisation method
3. Write Domain-Specific Instructions
Create a set of agent instructions tailored to this domain. These can be saved and reused across multiple agents:
# HR Policy Assistant Instructions You are an HR policy assistant for Sustainsys Consulting Ltd. ## Behaviour Rules - Always cite the specific policy document and section - If a policy has changed recently, flag that it may have updated - For sensitive topics (disciplinary, redundancy), suggest speaking to HR directly rather than relying solely on policy documents - Use UK employment law terminology ## Response Format - Lead with a direct answer - Follow with the relevant policy details - End with "Source: [document name], Section [X]" ## Glossary Reference - Refer to {Global.Glossary} for term definitions - When users use acronyms, expand them on first use
4. Bundle Prompt Templates
Create prompts specific to this domain and save them in the Prompt Library:
- "Summarise this HR policy for a new starter" (with variable for policy document)
- "Compare two policy versions and highlight what changed"
- "Draft a response to this employee query about [topic]"
5. Package as a Copilot Studio Solution
In Power Platform, you can export your agent (with all its knowledge, topics, and prompts) as a solution. This solution can be imported into other environments — making it a true reusable knowledge pack.
Multi-Agent Orchestration & MCP
For complex business processes, one agent isn't enough. Copilot Studio supports routing tasks to specialised agents.
Multi-Agent Orchestration
With multi-agent orchestration, you can build a system where a primary agent routes tasks to specialised agents based on the user's intent:
Each specialist agent has its own knowledge pack, instructions, and tools. The orchestrator decides which specialist to invoke based on the user's query.
MCP in Copilot Studio
Copilot Studio now supports Model Context Protocol (MCP) — the same standard you've been working with in your LangGraph projects. This means:
- You can connect MCP servers as tools for your agents
- Agents can discover and use MCP-exposed capabilities at runtime
- Your custom MCP servers (like the ones you built for Gmail/weather) could potentially be connected to Copilot Studio agents
- This bridges the gap between your Python/LangGraph agent work and Microsoft's low-code platform
What's Next?
You now understand the full landscape of Microsoft's agent platform and prompt ecosystem.
Hands-On Next Steps
| Action | Where |
|---|---|
| Build a simple knowledge agent | Copilot Studio |
| Explore pre-built prompts | M365 Prompt Gallery |
| Try the Agent Builder | Inside Microsoft 365 Copilot → "New agent" |
| Test Graph API calls in browser | Graph Explorer |
| Read the official learning path | MS Learn: Create agents |
Consulting Opportunities
These skills map directly to consulting engagements you could offer through Sustainsys:
- Agent Assessment — audit a client's M365 environment and identify high-value agent use cases
- Knowledge Pack Development — build domain-specific knowledge packs for financial services, healthcare, biosciences
- Prompt Library Strategy — design and deploy organisation-wide prompt libraries with governance
- Custom Agent Development — build sophisticated agents with Power Automate integration
- Bridge Building — connect custom Python/LangGraph solutions to Copilot Studio via MCP
Key Resources
- Copilot Studio documentation
- Agent adoption resources
- Copilot Studio Kit — testing, governance, analytics tools
- Prompts overview
- Skills for Copilot Studio (community)
