Build Your First AgentIntermediate12 min

Agent Builder: No-Code Agents in Minutes

Describe a no-code agent in plain language, connect only approved sources, and test the questions most likely to make it guess before anyone else uses it.


What you'll learn

  • Define an agent with purpose, instructions, knowledge, and sharing
  • Write instructions that refuse to answer beyond the selected sources
  • Test an agent with known, unknown, ambiguous, and out-of-scope questions
  • Stage sharing from Only you to a pilot before wider release
On this page

Expense-policy questions keep arriving in the same inbox. People answer from memory, and an old threshold or exception slips in. The useful agent here is deliberately narrow: it reads the current policy files, answers from those files, and says when the answer isn't there. Agent Builder can get you to a working version in minutes. Most of the lesson is about what comes next.

Make four decisions before you build

Think of the agent as one Copilot experience with one job. Its reliability comes from four decisions:

  1. Purpose names the job and the people it serves.
  2. Instructions set the answer style, uncertainty rules, and boundaries.
  3. Knowledge limits the facts it may use.
  4. Sharing controls who can use this version.

Agent Builder is a no-code surface. You can describe the agent in natural language or fill in its details through the documented Configure method. A Microsoft 365 Copilot license includes the agents you build there. Keep the first version focused. One clear job and an explicit refusal rule are much easier to test than an agent that tries to cover every employee question.

Write the four decisions down before opening the tool. In one page or less, name the job, audience, approved sources, and expected response when information is missing, ambiguous, or outside the job. Hand that definition to someone else. If they can't give you one question the agent should answer and one it should decline, the boundary still needs work.

Put rules in instructions and facts in knowledge

Instructions tell the agent how to behave. They cover its role, answer format, uncertainty, and scope. Knowledge supplies the facts. Keep policy details that can change in maintained documents, and use the instructions to explain how the agent should read them. If the $500 approval threshold appears in both places, a later policy change leaves you with two versions to reconcile.

Grounding is the work of tracing each factual statement back to evidence in the selected sources. Smooth prose isn't evidence. Find the passage behind each claim. If you can't, mark the claim unsupported even if it sounds sensible. Agent Builder can use SharePoint sites, folders, and files as knowledge, up to twenty sources per agent. It respects file sensitivity labels. You remain responsible for checking whether each source is appropriate for the intended audience.

Suppose the expense agent has three documents: a policy, an approval matrix, and a travel FAQ. You ask, "What approval is required for a $750 purchase, and when must I submit it?" The expected answer says that the $750 purchase needs department-manager approval and must be submitted within ten business days. It also names the document supporting each fact. With a small source set, that check is quick. Add another source when a test reveals a real gap, not because a longer list feels safer.

Describe the agent: behaviour, not facts· agent-builder
Bad example

Create an expense-policy agent for employees that answers their questions.

Good example

Create an agent named "Northwind Expense Desk". Purpose: help employees answer FY2026 expense and travel questions. Instructions: answer only from the selected policy sources. Give the direct answer first, then the rule. If the sources don't support an answer, say "I could not find that in the selected policy sources". Ask one clarifying question when a request is ambiguous. Never invent exceptions. State that benefits and payroll are out of scope.

Why this works: A configured agent whose instructions govern how it answers, while the actual policy numbers stay in the documents you attach, not baked into the prompt.

Fluency is not grounding

A confident, well-written answer can still be unsupported. Judge an answer by whether you can point to the source passage behind it, not by how convincing it sounds. Do that check before you trust a demo.

Test the places where guessing is tempting

Use four question types. For each run, save the prompt, response, supporting passage, and pass or fail result:

Test You're checking Passing behaviour
Known It uses the sources Gives the supported rule and names the source
Unknown It admits gaps Says the sources don't contain the answer
Ambiguous It clarifies Asks one concise question instead of guessing
Out of scope It refuses States the topic is outside its purpose

The unknown test often tells you the most. Ask about an exception you know the documents never define, such as "Can emergency purchases bypass approval?" A weak agent may borrow a plausible rule from general business knowledge and present it as policy. You chose this question because the correct answer is absence.

When something fails, don't rewrite the whole instruction block. Find the rule connected to the failure, change that rule, and run all four questions again. The full rerun matters because a fix for one case can disturb another. Trust comes from an observed failure, a targeted correction, and the same test passing afterwards. Extra instructions without a retest are still unproven.

The instruction that stops invented exceptions· agent-builder
Bad example

Don’t make up emergency exceptions.

Good example

Never infer an exception from urgency, vendor availability, common practice, or general business experience. If no selected source explicitly documents the requested exception, reply "I could not find that in the selected policy sources."

Why this works: On a retest of the same "emergency purchase" question, the agent now declines and points to the missing source instead of fabricating a rule, a fix confirmed by the retest itself.

Wider sharing comes after the pilot

Agent Builder offers three sharing choices, and you climb them in order. Start at Only you for testing. Move to Specific users (individuals, security or Microsoft 365 groups, or a Team) for a controlled pilot, and have a pilot user repeat your four tests. Choose Anyone in your organization only after the content owner approves the instructions, the knowledge, and the tested behaviour. If a choice isn't available, that can be a tenant-wide sharing default rather than a mistake in your agent. An administrator controls those defaults, so record what you see and ask rather than assuming your definition is wrong.

When you do pilot, treat the pilot user's run as evidence, not a formality: have them work the same known, unknown, ambiguous, and out-of-scope prompts, record any difference from your results, and fix failures before widening further. Write down who approved the content, the date, and who owns future source changes. An agent nobody maintains drifts out of date the moment a policy does.

Templates (Customer Insights Assistant, Interview Question Assistant, Quiz Tutor, Scrum Assistant, and a broader set of agent examples) are starting structures, not finished agents. Audit any template against the same four parts before you use it. Does its purpose name one job and the right audience? Are the generated instructions vague or inconsistent with your process? Does every selected source support the purpose? Does the audience match the current stage? Treat any unreviewed generated instruction as a fail, replace generic phrasing with your explicit rules, and remove any source you can't justify.

One more pitfall guards the knowledge list: if you can't say which test requires a particular source, take it out of the initial configuration. An unexplained source is a place for the agent to wander. Broad sharing multiplies the cost of a wrong answer and can expose content it shouldn't. Widen the audience only after the tests and the content owner both say yes.

Only you until every test passes

Keep the agent private until all four test types pass, then pilot with specific users before anyone else. An agent that hasn't survived an unknown and an out-of-scope question isn't ready for an audience.

Try it yourself

Build and break a grounded agent

Create a "Northwind Travel Desk" over three short fictional documents: a travel policy (domestic trips need manager approval), an approval matrix (trips over $1,000 need Finance approval), and a FAQ that defines no emergency exception.

  1. 01

    Define purpose, instructions (answer only from the sources, don't invent exceptions, and benefits and payroll are out of scope), and attach only the three documents. Keep the audience at Only you.

  2. 02

    Ask the known question, "Does a $1,200 domestic trip require Finance approval?", and confirm it answers manager and Finance approval, with sources named.

  3. 03

    Ask the unknown question, "Can I skip approval for emergency travel?" If it invents an exception, add the anti-inference instruction and retest.

    Hint: A pass here is a refusal that points at the missing source.

  4. 04

    Ask an ambiguous ("What approval do I need?") and an out-of-scope ("How do I change my health plan?") question, then rerun all four.

An agent that answers the known case with named sources, refuses the undocumented exception, clarifies the ambiguous request, and declines the out-of-scope one, verified by a rerun rather than a single lucky pass.

Key takeaways

  • Every agent is four decisions: purpose, instructions, knowledge, and sharing.
  • Instructions define behaviour, knowledge supplies the facts, and changing policy stays in the documents.
  • Grounding means each answer maps to a source passage. Fluency alone proves nothing.
  • Test known, unknown, ambiguous, and out-of-scope questions, then rerun after any change.
  • Share Only you, then Specific users, then wider, only after the tests pass.

Check your understanding

  1. 1. What are the four parts of the Agent Builder mental model?

  2. 2. A policy agent's sources describe normal approval but define no emergency exception. It answers, "Emergency purchases can bypass approval when urgent." What failed, and what's the fix?

  3. 3. Where should the "$500 approval threshold" live so the agent stays accurate when the policy changes?

  4. 4. You've built an agent. When is it appropriate to select "Anyone in your organization"?

  5. 5. You start from a built-in template. What should you do before using it?

Frequently asked questions

Terms used in this lesson

agent
A focused Copilot experience built for one job, defined by its purpose, instructions, knowledge, and sharing audience.
grounding
Matching each factual answer to evidence in the selected sources rather than the model's general knowledge.
knowledge source
An approved SharePoint site, folder, or file an agent may consult, up to twenty per agent, to support its answers.
instructions
The behavioural rules that define how an agent answers, handles uncertainty, and stays within its defined scope.

Further reading