Autonomous Agents, Testing, and Publishing

Add human approval and replay protection before an agent acts on its own. Evaluate it with checkable rubrics, then verify publishing, host behavior, and identity separately.


What you'll learn

  • Return truthful terminal statuses from an autonomous flow with human approval
  • Prevent duplicate work with a replay guard placed before any action
  • Evaluate answers with test sets and rubrics you can check
  • Verify publication, host behavior, and identity as separate outcomes
  • Estimate Copilot Credit consumption for a metered audience
On this page

Until now, every run began when you pressed Test. An autonomous agent starts from an event, acts without someone watching, and reports to people who may rely on that report.

The agent therefore needs evidence for each claim it makes. You'll place approval and replay protection before consequential actions, define truthful terminal statuses, evaluate the results against checkable criteria, and keep publication evidence separate from what the agent does in a real host.

Events turn chat agents autonomous

A conversation-driven agent waits for a person to type. An event-driven agent starts working when another system reports a change (a record enters a "Submitted" state, say) and runs a flow without anyone watching. That single shift raises the stakes, because now the agent's report is the only thing a downstream person sees.

The discipline is to remember what an event proves: that work started. It doesn't prove the input was valid, that a required approval happened, or that a record was created. Those are separate facts, each earned at its own step. A well-built autonomous flow makes that explicit by returning one of a small set of terminal statuses, and by meaning them precisely:

  • CompletedAutomatically: the amount did not need approval and the task was created.
  • Approved: a human approved and the task was created.
  • Rejected: a human declined. No task exists.
  • InvalidInput: validation stopped processing before any action.
  • Failed: an action was attempted but did not create the task.

"Approved" can never describe automatic work, and neither success status is allowed until a destination record exists. Getting these apart, in your head and in the flow, is most of what autonomous safety is.

Human approval belongs before the action

Put a human in the loop before any consequential action, not after. A common design gates on a threshold: above some amount, pause for a person's decision. At or below it, process automatically. The approval request should carry everything the approver needs to decide: the request, requester, amount, purpose, the action approval authorizes, and what rejection means.

Approval authorizes an attempt. It doesn't guarantee the outcome. If a human approves and the create step then fails, the honest status is Failed: not "Approved," not "queued," not "escalated." The agent may report only what a verified action produced. This is the single rule that keeps an autonomous agent trustworthy: never describe approval, creation, notification, or escalation unless the returned status confirms it.

Repetition is its own hazard. Systems redeliver events, and a repeated event with the same request ID must not create a second task. Put a replay guard before approval or creation: if a record with that ID already exists, request no approval, attempt no create, return a replay-specific non-success status, and leave the matching count at exactly one. Replay protection is boring to build and costly to skip. One duplicated order teaches the lesson the hard way.

Approval is not completion

A human clicking Approve authorizes an attempt. Nothing more. If the create step then fails, return Failed and say so. An autonomous agent that reports "task created" on the strength of an approval erodes trust in automation.

Instructions that forbid unproven claims· copilot-studio
Bad example

Tell the user the request was handled and give them a reassuring status update.

Good example

Report the flow's returned Status exactly: - Approved means a human approved and the task was created. - Rejected means no task was created. - CompletedAutomatically means the task was created without approval. - InvalidInput means validation or replay protection stopped processing. - Failed means the attempted task creation did not complete. Never describe approval, task creation, notification, queuing, or escalation unless the returned status and message confirm it.

Why this works: An agent that echoes only the verified terminal status: a failed create after approval is reported as a failure, never as a completed task.

An approval request that gives the human enough to decide· copilot-studio
Bad example

Ask the manager to approve PR-1042 so we can continue.

Good example

Review purchase request PR-1042. Requester: Maya Chen Amount: $8,600 Purpose: Annual security assessment renewal Approve to create the renewal task. Reject to finish without creating a renewal task.

Why this works: A decision the approver can make without hunting for context, and a clear statement of exactly what approval and rejection each cause.

Evaluate agents with checkable rubrics

Clicking through a few prompts isn't evaluation. Build a test set: named cases, each pairing an input with an expected, observable behavior. Microsoft's Copilot Agent Kit provides test types for different boundaries, such as Response Match for stable text, Topic Match for routing, and Generative Answers for knowledge answers whose wording varies, so you protect the right property for each case instead of exact-matching everything.

Keep two things separate: the acceptance criterion (the business requirement, like "states 16 weeks, full-time status, and 12 months of service") and the configured oracle (the rule the test applies). An answer can violate the real requirement while passing a loose oracle. That gap is itself a finding: the agent is incomplete and the oracle is weak.

For knowledge answers, the Kit uses an AI judge that grades from 1 to 5 against a rubric, with a documented passing threshold of 5 and support for comparing its grades to a human's.

A vague rubric, such as "give a 5 for a good answer," is useless. A checkable one, such as "give a 5 only when all three required facts appear," is a real acceptance test. When a case fails, classify it (agent behavior, oracle configuration, a missing dependency, and so on) and fix the right thing. The one move you never make is weakening a correct criterion to turn a failure green. An outcome label like "Answered," or a top AI grade, isn't proof the facts are right.

A rubric an AI judge can apply· copilot-studio
Bad example

Give a 5 when the answer is good and lower scores when it needs improvement.

Good example

Give a 5 only when the response states all three required facts: 16 weeks of leave, regular full-time status, and 12 continuous months of service. Give no more than 4 if any required fact is missing. Give no more than 2 if the response contradicts the fixture or invents an exception.

Why this works: Grades that track the business requirement (a one-fact answer can no longer score a 5), so the AI judge and a human reviewer converge instead of disagreeing.

Publishing has separate checkpoints

Publishing gives you several checkpoints, each with a narrow meaning: the authoring test, the publish result, channel availability, host behavior, and identity. An authoring test says nothing about whether publishing completed. Publishing doesn't establish that a channel is available. Opening the host doesn't validate its answers, and correct answers don't validate sign-on or access controls.

Check every destination directly. After publishing, open the real host, such as Teams, Microsoft 365 Copilot, or an approved web page, and start a fresh conversation. Repeat both the grounded and unsupported questions. Unpublished edits won't reach connected channels until you publish again, and a Copilot Studio trial can't publish. Record availability, behavior, and identity separately. The agent may answer correctly while the SSO check remains blocked because you don't have configuration evidence. "Blocked" accurately describes that result.

Real-time voice has extra gates worth knowing before you promise it: it requires Dynamics 365 Contact Center with a Voice channel plus both the Omnichannel administrator and Copilot Studio maker roles, and EU Data Boundary customers can't use it because it depends on cross-geo processing they aren't permitted.

Three columns at publish time

Record availability, behavior, and identity separately for every destination. An agent can pass its answer checks while its SSO test stays blocked for missing configuration evidence. Collapsing those into one verdict hides the gap you most need to see.

Estimate the running cost

Licensing answers two questions that people routinely merge: who is entitled to use the agent, and how is their consumption paid for. Keep them apart. A Microsoft 365 Copilot licensed user (the add-on lists at $30 per user per month, paid yearly) incurs no additional charge for the covered agent interactions. Consumption for other situations is measured in Copilot Credits.

A Copilot Credit isn't one message or one user. Different features cost different amounts. The July 2026 rate table charges, for example, 2 credits per generative answer, 5 per agent action, and 13 per 100 agent-flow actions. Forecast by operation, not by seat: list what the agent does, multiply each by its rate, and add the results. For a metered, non-licensed audience you can turn credits into a rough pay-as-you-go estimate at about $0.01 per credit: 1,630 credits works out to roughly $16.30.

Two guardrails. Separate licensed operations from metered ones so you never charge a licensed user's activity again in the worksheet, and label every number an estimate. Prepaid capacity is also an option for steady usage, but the specific pack prices and any autonomous-trigger surcharges vary by tenant. Have an administrator confirm the current quote before you commit to a billing model.

Try it yourself

Run the autonomy safety matrix

Derive the terminal status for four requests, then prove a replay creates no duplicate. Ten minutes, simulation only, no tenant required.

  1. 01

    Fix the rules: an amount over 5,000 needs human approval. A request must be in "Submitted" state. A task is created only after validation and any approval. Exactly one task may exist per request ID.

  2. 02

    Request ER-2001, Submitted, amount 3,200. Derive the status and whether approval was requested.

    Hint: Below the threshold and valid, so no approval and one automatic task.

  3. 03

    Request ER-2002, Submitted, amount 8,600, the approver approves and the create succeeds. Derive the status and destination row.

  4. 04

    Request ER-2004, Submitted, amount 2,400, but the requester field is empty. Derive the status, approval, and whether any row is created.

  5. 05

    Deliver ER-2001 again with a new run ID. Confirm no approval, no new row, the matching count stays 1, and the status is a replay-specific non-success.

A five-row ledger where each terminal status is justified by evidence, and a replay that leaves exactly one task: the core of safe autonomy.

Every boundary in this module works the same way: a saved draft, a test run, an event, an approval, a publish. At each one, the agent must earn its next claim with evidence, not borrow it from the last step.

Key takeaways

  • An event starts autonomous work. It proves nothing about validation, approval, or completion.
  • Human approval authorizes an attempt. Only a confirmed destination record earns a success status, and a failed create after approval is "Failed."
  • Replay protection checks for an existing record before acting, so a repeated event can't create duplicate work.
  • Evaluate with test sets and checkable rubrics: an "Answered" outcome or a top AI grade is not proof, and you never weaken the criterion to pass.
  • Authoring test, publication, channel availability, host behavior, and identity are separate checkpoints, and a Copilot Studio trial can't publish.

Check your understanding

  1. 1. A request above the threshold is approved by a human, but the action that should create the renewal task fails and no row exists. What status should the automation return?

  2. 2. A previously successful request is delivered again with the same request ID. Where should replay protection run, and what result proves it worked?

  3. 3. A generative-answer case requires three policy facts. The response gives one. The recorded outcome is "Answered," and a vague AI-judge rubric awards the top grade. How should you fix this?

  4. 4. An agent passes its authoring tests and publishing completes, but in web chat it invents an unsupported allowance, and no approved SSO configuration evidence exists. What are the web behavior and identity outcomes?

  5. 5. A metered audience runs 500 generative answers (2 credits each), 100 agent actions (5 each), and 1,000 agent-flow actions (13 per 100). What are the total credits and the approximate pay-as-you-go cost at $0.01 per credit?

  6. 6. You are working in a Copilot Studio trial. What can you not do?

Frequently asked questions

Terms used in this lesson

autonomous agent
An agent that starts work from a system event rather than a person's message, running a flow without direct supervision.
human-in-the-loop
A design where automation pauses for a person's decision before a consequential action, then follows that decision.
replay protection
A guard that checks for an existing record before acting, so a repeated event cannot create duplicate work.
Copilot Credit
A consumption unit tied to a specific agent capability. Different features consume different numbers of credits.
channel
A delivery destination associated with a published agent, such as Teams, Microsoft 365 Copilot, web chat, or voice.

Further reading