How to build a Copilot agent: two real agents, step by step
Build a company handbook agent and a product answers agent in Copilot Agent Builder, about 15 minutes each. Every click shown, no code needed.
By Daniel Will · Updated · 14 min read
An agent is a version of Copilot set up for one job, with its own instructions and its own documents. Most “build an agent” tutorials use a toy example: a gardening coach, a trivia game. This guide doesn’t. These are two of the most common agents businesses use, and we show you how to build each one from scratch for your own company in Agent Builder, with no code. Both work only from your own documents in SharePoint (Microsoft 365’s shared file storage), and you can build each one in an afternoon. Anyone on Microsoft 365 can build one. People with a paid Copilot seat (license) use them at no extra cost.
- Company Handbook: staff ask about time off, benefits, safety rules and procedures, and get an answer with the exact section it came from.
- Product and Service Answers: your front desk and sales staff ask about products, prices, warranties and returns, and get a cited answer instead of interrupting you.
Before you build
- Check there isn’t a ready-made one. A paid seat already includes Researcher, Analyst and the Word, Excel and PowerPoint Agents. See the levels guide.
- You need Agent Builder. It’s the New agent button in the Copilot app. See Copilot basics if you haven’t found your way around yet.
- Know the cost. People with a paid Copilot seat use agents like these at no extra charge. Colleagues without a seat can use an agent you share, but each answer that searches your files costs about $0.12. That only works after an admin sets up pay-as-you-go billing.
Agent 1 · About 15 minutes once your documents are ready
Company Handbook
What it does: answers staff questions about your policies and procedures, such as time off, holidays, benefits, safety rules, vehicle use and “how do we handle a callback?”, from your own documents, and says exactly where each answer came from.
Step 1: Gather the documents
Make a SharePoint folder for the documents (or use an existing policies library):
- Open SharePoint from the app launcher (the grid of dots at the top left of Outlook).
- Open your company site.
- Select Documents.
- Select + New, then Folder, and name it Handbook.
Put in the current versions of:
- Your employee handbook, broken into sections with headings
- Time off, holidays and pay schedule
- Benefits summaries from your insurer or payroll provider
- Safety procedures, vehicle and equipment rules
- How-to procedures: opening and closing, job handoff, customer complaints
Give each policy a name and number, and give sections headings (“Leave Policy HR-03, Section 2: Accrual”). The agent names the document and section each answer came from (a citation), so clear names mean clear citations. Remove old versions. Then check who can open the folder: select it, select ⋯ (more actions), thenManage access, and remove anyone who shouldn’t see it.
Let Copilot do the tidying
You don’t have to rename and reformat every document by hand. Open a policy in Word, open Copilot and ask it to do the work, then check the result and save it to the folder. If your plan doesn’t let Copilot edit in Word, attach the document in Copilot Chat with the + button and paste the result back.
Prompt in Word
This is our time off policy. Give it the title “HR-03 Time Off and Holidays”, split it into numbered sections with clear headings (Section 1: Who this covers, Section 2: Accrual, and so on), and keep the wording of each rule exactly as it is. List anything that looks out of date or contradicts itself so I can fix it.Step 2: Create the agent
- In the Copilot app, select New agent, then Skip to configure.
- Name: Company Handbook (30 characters maximum).
- Description: “Answers questions about our company policies and procedures, with the policy and section for every answer.”
Step 3: Paste the instructions
Instructions are the standing rules the agent follows every time. This is a shortened version. A full version runs to about 4,900 characters, well under the 8,000-character limit. Replace [Company] with your company’s name:
Instructions
You are the Company Handbook assistant for [Company] employees. You help staff understand company policies and procedures accurately and clearly.Knowledge: Answers must be grounded only in the documents in the Handbook folder. Do not use general knowledge or assumptions. If the answer is not in the documents, say so and suggest the employee ask [owner or office manager].
Always cite your source: document name, policy number and section, for example: “Full-time employees earn 10 paid days off in their first year. (Time Off Policy, HR-03, Section 2)”
Ask before answering when it depends on details you don’t have, such as full-time or part-time, how long they’ve worked here, or which crew or location. Ask one question at a time, starting with the most important.
Lead with the answer, then the details. Use short bullet points. Plain language, no HR jargon.
Do not give legal, medical or disciplinary advice about a specific situation. Explain what the policy says and refer them to [owner or office manager].
If a question isn’t about company policy or procedures, say this assistant only covers policies and procedures.
End every answer with: “AI-generated from our handbook. Check anything important with [owner or office manager].”
Two lines do most of the work. “Answers must be grounded only in the documents in the Handbook folder”(“grounded” means based on) makes it much less likely to fill gaps with generic policies from the internet. Microsoft says Agent Builder can’t fully block general knowledge, which is why the citation rule and your testing matter.“Ask one question at a time” stops it from answering “How much PTO do I get?” before it knows whether the person is full-time.
Step 4: Add knowledge and starter prompts
- Knowledge (the files the agent answers from): add the Handbook folder and nothing else. An agent pointed at your whole SharePoint will find old drafts too.
- In SharePoint, open the Handbook folder and copy its address from the browser’s address bar.
- Back in Agent Builder, paste the address into the Knowledge box and press Enter. (Or select the cloud icon, Attach cloud files, then More places, your site and the folder.)
- Wait a few minutes. New files show Preparing until the agent can use them.
- Turn on Only use specified sources.
- Leave Search all websites off.
- Starter prompts (sample questions shown to people when they open the agent):
- “What types of time off can I take as a full-time employee?”
- “What happens in my first 90 days?”
- “What are our paid holidays this year?”
- “What’s the procedure if a customer calls about a problem after we’ve left the job?”
Upload the files, or link the folder?
Agent Builder also lets you upload documents straight into the agent. That’s fine for a quick trial, but an uploaded file is a copy. When a policy changes, you have to remove the old file from the agent and upload the new one, and that’s easy to forget. Linking the SharePoint folder is better for anything you’ll keep. Update the document in the folder and the agent answers from the new version, with no one having to touch the agent.
Step 5: Test with questions you know the answers to
Select the Try it tab at the top. Ask ten questions whose answers you know, and check each response for:
- Right answer, matching the document.
- Right citation: the policy and section it names actually say that.
- Right behavior when the answer isn’t there: it says so instead of making one up.
When the answers are right:
- Select Create at the top right. The agent is now private to you.
- Select Share.
- Type the names, a group or email addresses, and set them to Can chat.
- Keep the Handbook folder selected, so the folder is shared with them too. People only get answers from files they can open.
- Select Add.
Agent 2 · About 15 minutes once your documents are ready
Product and Service Answers
What it does: answers your staff’s questions about what you sell, such as specs, options, prices, lead times, warranties, returns and repairs, from your own product and service documents, with a cited source every time.
Step 1: Gather the documents
Create a SharePoint folder called Products and Services with:
- This year’s price list or rate sheet
- Product or service sheets: one per product line, with specs and options
- Warranty terms, return and repair policy
- Your top 20 customer questions with the answers you give (write them down once; the agent reuses them forever)
Let Copilot find your common questions
With a paid Copilot seat, Copilot can read your own inbox and draft the list for you. In Copilot Chat, switch toWork and ask: “Look through my email from customers in the last six months. List the 20 questions they ask most, with the answer we usually give, as a Word document with one heading per question.” Check every answer before it goes in the folder: the agent will repeat whatever you put there.
Step 2: Create the agent
- New agent › Skip to configure.
- Name: Product Answers.
- Description: “Answers questions about our products, services, prices, warranties and returns from our own documents.”
Step 3: Paste the instructions
The instructions, including two rules for pricing:
Instructions
You are Product Answers, an assistant for [Company] staff.When asked what you can do, reply: “I answer questions about [Company] products and services, prices, repairs, returns and warranties.”
Use documents from the Products and Services folder as your only source of information.
If you can’t find the information, say so and suggest the person check with [name or team] directly.
Keep responses concise and always include a cited source.
Only quote prices from the current price list, and say which document and date the price came from. Never estimate a price that isn’t listed.
When comparing products or options, show the comparison in a table.
Step 4: Add knowledge and starter prompts
- Knowledge: the Products and Services folder, added the same way. Turn on Only use specified sources and leave Search all websites off.
- Starter prompts:
- “What can you do?”
- “What’s the warranty on [your most popular product]?”
- “Recommend an option for a customer who needs [common need].”
- “Compare [product A] and [product B] in a table.”
Test it the same way as the handbook agent, then create and share it.
Want it on your public website for customers? That’s a different tool. Copilot Studio has aWebsite Q&A template that answers from your site’s pages. Customer-facing agents are billed per message in Copilot Credits (Microsoft’s pay-as-you-go units). The templates are meant as a starting point for internal use, so a public chatbot needs more setup and testing than the steps above.
Rules that make an agent reliable
The agents that work well all follow the same few rules:
- One job, narrowly defined. “Company policies and procedures,” not “anything about the company.”
- One hand-picked source of documents. A single folder of current documents, not a whole SharePoint site.
- “Only from these documents.” Every strong sample agent tells it not to use general knowledge for business answers. Turn on Only use specified sources too. Neither blocks general knowledge completely, so test.
- “Always cite.” Citations let staff check answers in seconds, and they show you quickly when a document is wrong or out of date.
- A clear exit. What to say, and who to send people to, when the answer isn’t there.
- Ask before assuming. A sample IT help desk agent, shared by Microsoft’s developer community, puts it well: “Do not immediately suggest all resolution options. Instead, progressively narrow down to the right resolution by asking targeted clarifying questions.”
Test it before you share it
Before anyone else sees it, try to catch it out:
- A question with a known answer. Is it right, and is the citation real?
- A question that depends on missing details. Does it ask, or guess?
- A question that isn’t covered. Does it admit it, or invent a policy or a price?
- Something off-topic. Does it stick to its job?
- The same question twice. Are the answers consistent?
When an answer is wrong, fix the instructions or the documents. The problem is almost never how the question was asked.
Share it and keep it current
- Share the agent with specific people or a group, much like sharing a file (the steps are at the end of Agent 1).
- To offer it to everyone, open Share and turn on Org-wide sharing for chat access. Any owner can do this unless your admin has limited it. It then shows up in the Agent Store for everyone.
- To pin it so it shows up for everyone without searching, ask your Microsoft 365 admin. They submit it to your org catalog, deploy it, then pin it (Microsoft 365 admin center › Agents › All agents › Manage pinned agents). Up to three agents can be pinned.
- People can also call it from any Copilot chat by typing @ and its name.
- Give it an owner who replaces documents in the folder when policies or prices change, and reads a sample of answers once a month.
- Tell the team what it’s for, what it isn’t for, and who to ask when it can’t help.
Next step: agents that take action
Both agents above answer questions. The bigger time savings come when an answer turns into finished work: a quote built from your past estimates and price list, filled into your template, saved to the customer’s folder, emailed for approval and followed up automatically. Agent Builder agents can’t take those actions. That’s a job for Copilot Studio andPower Automate:
- Power Automate cloud flows (automations that run steps for you) on the standard connectors, the built-in links to Outlook, Teams, SharePoint, OneDrive, Excel, Forms and Approvals, are included with Microsoft 365 Business plans, with no per-run charge.
- A rule-based Copilot Studio agent (fixed questions and buttons, no AI, published to Teams) can collect job details and hand them to a flow with no per-use charges.
- An AI Copilot Studio agent that reads job photos or free-form requests runs on Copilot Credits at $0.01 each, and needs billing set up first. Microsoft doesn’t charge seat holders for agents used inside the company, within fair-use limits. Agents that serve customers, run on their own, or are used by staff without a seat do use credits, usually cents per conversation.
- A flow with an AI step or a Word template is a premium flow. It needs Power Automate Premium ($15 per user a month) or $0.60 a run.
Designing that well, so you only pay for AI where it saves more than it costs, is most of what we do in an assessment.
Want a head start? Our free tools site has Copilot agent and Power Automate flow templates with click-by-click setup guides, from a morning email triage agent to a request approvals flow.
Sources
- My Company Policy agent: github.com/microsoft/m365-agent-templates (MIT license)
- Product Support declarative agent: github.com/pnp/copilot-pro-dev-samples, samples/da-product-support
- IT Helpdesk declarative agent: github.com/pnp/copilot-pro-dev-samples, samples/da-ITHelpdesk
- Build agents with Agent Builder: learn.microsoft.com/microsoft-365/copilot/extensibility/agent-builder-build-agents
- Website Q&A template: learn.microsoft.com/microsoft-copilot-studio/template-website-q-and-a
- Agents in Copilot Chat and billing: learn.microsoft.com/copilot/agents
- Add knowledge in Agent Builder: learn.microsoft.com/microsoft-365/copilot/extensibility/agent-builder-add-knowledge
- Share agents from Agent Builder: learn.microsoft.com/microsoft-365/copilot/extensibility/agent-builder-share-manage-agents
- Pin agents: learn.microsoft.com/microsoft-365/admin/manage/agent-registry
- Copilot Studio billing rates: learn.microsoft.com/microsoft-copilot-studio/requirements-messages-management