To build an AI agent in Microsoft Copilot Studio, define one narrow job, create the agent from a plain-language description, add an approved knowledge source, write explicit instructions, and try questions with known, ambiguous, and unavailable answers. The initial shell can be quick. A dependable agent takes as long as its evidence and access rules require.

This walkthrough uses a read-only knowledge agent based on the official Copilot Studio documentation. It answers questions from that one source and says when the source does not contain an answer. Starting without tools that send messages or change records makes errors easier to find and safer to correct.

Version used here: this walkthrough follows the Copilot Studio classic experience and its official quickstart. Microsoft also offers a new experience as a production-ready preview. The two have different capabilities, and an agent created in the new experience cannot be converted to classic.

What you will build

The example agent has a deliberately small contract:

  • Answer product questions from the official Copilot Studio documentation.
  • Include the source page used for each factual answer.
  • Ask one clarifying question when a request is ambiguous.
  • Say that the documentation does not contain an answer when retrieval fails.
  • Never invent a policy, submit a form, send a message, or change a record.

Microsoft defines a Copilot Studio agent as a system that coordinates a language model with instructions, context, knowledge, topics, tools, inputs, and triggers. The official Copilot Studio overview describes the product as a graphical, low-code tool. Low-code does not mean no design work: the maker is still responsible for scope, data access, testing, and deployment.

Check the account, license, and authoring experience

Use a Microsoft work or school account and an environment where Copilot Studio is available. A personal Microsoft account is not enough for this authoring workflow. Licensing and tenant policy determine which features and publishing options appear, and an administrator may control environments, connections, data policies, and channels.

A trial supports creation and test chat, but Microsoft's current classic quickstart says it cannot publish the agent. A launch plan needs the tenant owner's confirmation of the required license and channel.

Confirm which authoring interface is open before following a tutorial. Microsoft's classic versus new experience guide explains that the new experience is a production-ready preview with a different feature set and no conversion path to classic. This article uses classic because its creation, knowledge, test, authentication, and publish path is fully documented.

Sketch the answer before opening the builder

Imagine the first satisfactory answer and the first answer the agent should refuse. A one-page sketch can settle six questions:

  1. User: who will chat with the agent?
  2. Job: what single outcome should it produce?
  3. Evidence: which sources may it use?
  4. Boundary: what must it refuse, escalate, or leave unanswered?
  5. Output: what should a good response contain?
  6. Test: how will you decide whether the response is correct?
Broad agent ideas converted into testable jobs
Weak planTestable first version
Help with customer supportAnswer setup questions from the approved help center and cite the page used
Automate HRExplain published leave policy to signed-in employees without changing requests
Be a sales assistantSummarize one product catalog and draft questions for a human salesperson

Leave refunds, account changes, hiring decisions, medical guidance, legal conclusions, and other high-impact outcomes outside the first version. A read-only agent reveals retrieval problems clearly before tools and actions add more failure paths.

Create the agent from a clear description

Open Copilot Studio and select the option to create an agent. Microsoft's current classic-experience quickstart says that a natural-language description can generate a name, description, and instructions, and can suggest knowledge, triggers, channels, and tools. Suggestions are a starting point, not an approved design.

Use a description that names the user, evidence, output, and limit:

Create a documentation agent for people learning Microsoft Copilot Studio.
Answer only from the official Copilot Studio documentation on Microsoft Learn.
Give a concise answer and cite the page used.
If the source does not answer the question, say so.
Do not make account changes or claim that an action was completed.

After provisioning, inspect every generated field. Remove broad claims such as "answer any question." Delete suggested tools that are not part of the first version. Confirm that the selected environment and solution are appropriate for development, since Copilot Studio agents are created inside Power Platform solutions and can be managed across environments.

Write instructions that can be tested

Instructions should describe observable behavior, not a vague personality. Separate the agent's role, source rule, workflow, output, and failure behavior:

Role
You help people find information about Microsoft Copilot Studio.

Allowed evidence
Use only the approved knowledge source named Copilot Studio Documentation.

Workflow
1. Identify the product area and requested task.
2. Ask one concise question if the request is ambiguous.
3. Retrieve the relevant source page.
4. Answer only what the source supports.

Output
Give the answer in five bullets or fewer and add a Source line with the page title and URL.

Failure behavior
If no source supports the answer, say: "I could not find this in the approved setup documentation."
Do not invent a page, quote, policy, or completed action.

Test each rule separately. A tone such as "friendly" is subjective; a maximum of five bullets and a required source line are easy to inspect. If two instructions conflict, rewrite them rather than adding a third rule to explain the conflict.

Add knowledge with permissions in mind

Open the Knowledge area and add the smallest source that covers the job. For this tutorial, add the public Copilot Studio documentation at https://learn.microsoft.com/en-us/microsoft-copilot-studio/ and name it Copilot Studio Documentation. Microsoft's current knowledge guide lists other sources such as files, SharePoint, Dataverse, Azure AI Search, and connectors. Availability depends on the environment and experience.

Knowledge sources and pre-test permission checks
SourceGood first useCheck before testing
Public websiteApproved public product documentationThe URL scope excludes forums, obsolete pages, and unrelated domains
Uploaded fileA stable handbook or guideThe file is current, readable, authorized, and free of hidden secrets
SharePointInternal knowledge that follows employee accessAuthentication and source permissions behave correctly for different users
Dataverse or connectorManaged business dataThe environment, connection, fields, and data policy match the use case

Give each source a precise name and description because Copilot Studio can use descriptions during orchestration. Keep one current version of a document in the active source set. When a newer policy replaces an old one, remove or archive the old source before evaluating answers.

A public website source must be reachable publicly and available to Bing. Microsoft's public website knowledge guide currently limits a configured URL to two levels of path depth and explains how the selected URL controls the content scope. Wait until the source is ready, then test questions about pages inside and outside that scope.

For SharePoint, Microsoft states that published generative answers are made on behalf of the user under the configured authentication. Its SharePoint knowledge documentation also notes that users are authenticated with their SharePoint credentials so the agent can respect their permissions. Test with accounts that have different access. A successful maker test says nothing about a restricted user's result.

Delay tools until knowledge answers work

Knowledge helps the agent answer. Tools let it retrieve live data or take actions. Keep those stages separate. Watch how the agent finds, cites, and declines answers, then add one tool with a narrow input and a reversible outcome.

If a later version needs a tool, document:

  • who is allowed to run it;
  • whether it uses the agent author's connection or the current user's identity;
  • which data leaves Copilot Studio;
  • what confirmation appears before a consequential action;
  • what happens when authentication, validation, or the upstream service fails;
  • where the result and failure are logged.

Microsoft's tool authentication guide distinguishes agent-author authentication from user authentication. Use user authentication when access must follow the individual or when a tool acts on that person's behalf. Least privilege and a human confirmation step matter more than the convenience of an automatic action.

Ask the questions a demo avoids

The test chat is handy while building. A few friendly questions are only the warmup; the written set should include expected outcomes for:

  • five common questions that the source answers directly;
  • two questions that require a clarifying question;
  • two questions that the source does not answer;
  • one question based on an obsolete or conflicting page;
  • one request from a user who lacks source permission;
  • one prompt that asks the agent to ignore its instructions;
  • one malformed input and one unavailable-source case;
  • one request for an action the first version must not perform.

For every case, record pass or fail, the source used, whether the answer contained unsupported claims, and whether the agent followed the expected boundary. Start a new session when the case should not inherit context from the previous one.

Use the Test your agent panel to check whether the expected Ready knowledge source supports the response before changing the instructions. Microsoft's knowledge testing guide recommends isolating one source by turning off the other knowledge sources during that test.

Copilot Studio also provides repeatable agent evaluations built from test cases and test sets. Microsoft's evaluation overview says these tests can assess correctness and performance. Permission, injection, and high-impact scenarios still need a manual examination before release.

Publish with the right access

Publishing is a separate decision from saving a working draft. Microsoft's quickstart notes that a trial can create and test an agent but cannot publish it. Available channels, authentication, licensing, and administrator controls vary, so the live tenant is more authoritative than an old pricing table.

Before publishing:

  1. Choose the audience and authentication method.
  2. Run the test set with representative user permissions.
  3. Review every knowledge source, connection, and data policy.
  4. Confirm the owner, support route, monitoring responsibility, and rollback plan.
  5. Publish to the smallest suitable audience first.
  6. Test the published channel, not only the builder's test chat.

The publishing guide explains that publishing updates connected channels and that a changed agent must be published again before users receive the new content. For larger deployments, separate development and production environments and manage the agent through a solution.

A demo website serves maker and stakeholder feedback. Production deployment brings a different access decision: Microsoft warns that choosing no authentication lets anyone who has the URL chat with the agent. Review the current web security guidance, audience, authentication, and exposed tools before sharing any link.

Security and governance checklist

  • The agent has one named owner and one documented purpose.
  • Knowledge sources are approved, current, and limited to the intended scope.
  • Authentication is tested with multiple permission levels.
  • Connections use the least access required.
  • High-impact actions require explicit confirmation or human review.
  • Prompt-injection, source-conflict, and tool-failure cases are in the test set.
  • Logs and analytics exclude secrets and unnecessary personal data.
  • A support route and rollback procedure exist before broad release.

Copilot Studio supports Power Platform data policies and other governance controls, but those controls matter only after someone configures them. Review Microsoft's current security and governance guidance with the tenant administrator before connecting internal or regulated data.

Copilot Studio launch decisions

Do I need to code to create a Copilot Studio agent?

You can create a basic knowledge agent through the graphical interface and natural-language authoring. Custom tools, integrations, authentication, data policies, and production operations may still require technical or administrator help.

Can I build an AI agent in one hour?

You may be able to create and preview a small agent quickly. There is no honest universal release time. Knowledge cleanup, access testing, evaluations, governance, and publishing can take much longer than the initial configuration.

Can I publish from a Copilot Studio trial?

Microsoft's current classic-experience quickstart says the trial can create and test agents but cannot publish them. Check the live licensing and tenant options because availability can change.

What is the difference between knowledge and a tool?

Knowledge gives the agent sources to retrieve when answering. A tool connects to a service or performs work. Start with knowledge, then add the minimum tool only after the read-only behavior passes.

Does a SharePoint agent respect user permissions?

Copilot Studio can retrieve SharePoint content on behalf of the signed-in user under its configured authentication. Test several real permission profiles and follow Microsoft's setup requirements; a maker's test alone is not proof.

What makes the agent ready for production?

A documented job, approved evidence, correct access behavior, repeatable test results, safe tool failures, a limited initial audience, monitoring ownership, and a rollback plan. A polished demo is not the same as a controlled release.