Tag: Agent Development

Configure agent response formatting (AB-620 Exam Prep)

This post is a part of the AB-620: Designing and Building Integrated AI Agent Solutions in Copilot Studio Exam Prep Hub.
This topic falls under these sections:
Plan and configure agent solutions (30–35%)
   --> Configure topics
      --> Configure agent response formatting


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Introduction

One of the most important responsibilities of an AI Agent Builder is designing responses that are easy for users to read, understand, and act upon. Even if an agent provides accurate information, poorly formatted responses can confuse users and reduce confidence in the solution.

Microsoft Copilot Studio provides several methods for formatting responses, ranging from simple text to sophisticated interactive experiences using Adaptive Cards. Choosing the correct response format depends on the audience, communication channel, business process, and complexity of the information being presented.

For the AB-620 exam, you should understand not only how to configure response formatting, but also when each formatting option should be used.


Why Response Formatting Matters

Well-designed responses help users:

  • Understand information quickly
  • Complete tasks efficiently
  • Reduce misunderstandings
  • Improve user satisfaction
  • Increase adoption of AI agents
  • Reduce unnecessary follow-up questions

Poorly formatted responses often lead to:

  • Long walls of text
  • Missing important information
  • Difficult navigation
  • User frustration
  • Increased support requests

Types of Agent Responses

Copilot Studio supports multiple response formats.

Plain Text Responses

The simplest response format.

Example:

Your request has been submitted successfully.

Advantages

  • Fast
  • Works across all channels
  • Universal compatibility

Limitations

  • Limited visual appeal
  • Difficult to organize large amounts of information
  • No interactive elements

Best used for:

  • Confirmations
  • Greetings
  • Short answers
  • Status messages

Rich Text Responses

Rich text improves readability by organizing information.

Examples include:

  • Headings
  • Paragraphs
  • Bullets
  • Numbered lists
  • Hyperlinks
  • Basic formatting

Example

Instead of:

Your laptop has shipped. Tracking number 123456. Expected delivery Friday.

Use:

Your Order Has Shipped

Tracking Number:

123456

Expected Delivery:

Friday

Rich text greatly improves the user experience.


Markdown Formatting

Many Copilot Studio responses support Markdown formatting.

Common Markdown elements include:

Bold

**Important**

Result:

Important


Italics

*Reminder*

Result:

Reminder


Lists

• Review your request
• Submit approval
• Wait for confirmation

or

1. Sign in
2. Select your project
3. Submit the request

Links

[Employee Portal](https://contoso.com)

Depending on the channel, links may appear as clickable hyperlinks.


Code Blocks

Useful when returning:

  • JSON
  • XML
  • PowerShell
  • SQL
  • REST requests

Example

{
"status":"Complete"
}

Although primarily useful for IT scenarios, formatted code blocks improve readability significantly.


Using Variables in Responses

Most responses contain dynamic information.

Instead of static text:

Hello Customer

Use variables:

Hello {User.Name}

Examples include:

  • Customer name
  • Order number
  • Case ID
  • Ticket status
  • Product information
  • Appointment time

Dynamic responses create personalized conversations.

Example:

Instead of

Your appointment has been confirmed.

Return

Hello John,
Your appointment for Tuesday at 2:00 PM has been confirmed.

Formatting Dynamic Data

When displaying variables, consider formatting.

Examples include:

Dates

Instead of:

2026-07-03T18:30:00Z

Display

July 3, 2026
6:30 PM

Currency

Instead of:

1249.95

Display

$1,249.95

Percentages

Instead of

0.82

Display

82%

Proper formatting improves professionalism and reduces confusion.


Structuring Long Responses

Avoid overwhelming users with lengthy paragraphs.

Instead:

Break responses into logical sections.

Example:


Support Ticket Created

Ticket Number:

87421

Priority:

High

Estimated Response:

2 Hours

Next Steps

• Monitor your email

• Reply if additional information is requested

• Close the ticket after resolution


This structure is much easier to scan.


Using Adaptive Cards

Adaptive Cards provide rich interactive user experiences.

Instead of displaying only text, an Adaptive Card can include:

  • Images
  • Buttons
  • Forms
  • Multiple columns
  • Input fields
  • Choice selections
  • Action buttons
  • Hyperlinks

Example use cases:

  • Expense approval
  • Vacation requests
  • IT support forms
  • Purchase approvals
  • Customer surveys
  • Product recommendations

Adaptive Cards are especially valuable when users need to make decisions directly inside the conversation.


Benefits of Adaptive Cards

Advantages include:

  • Interactive experiences
  • Improved usability
  • Reduced typing
  • Consistent design
  • Mobile-friendly layouts
  • Better user engagement

Rather than asking:

Would you like Option A or Option B?

An Adaptive Card can present two buttons the user simply clicks.


Adaptive Card Components

Common elements include:

Text Blocks

Display formatted text.

Example:

Vacation Request

Images

Useful for:

  • Employee photos
  • Product images
  • Maps
  • Company logos

Fact Sets

Display key-value information.

Example

Employee:

John Smith

Department:

Finance

Status:

Pending


Input Controls

Examples include:

  • Text boxes
  • Date pickers
  • Toggle switches
  • Dropdown lists
  • Rating controls

Action Buttons

Examples:

Approve

Reject

View Details

Submit

Cancel

Buttons simplify user interaction.


Images in Responses

Images improve engagement when used appropriately.

Common examples include:

  • Product photos
  • Company logos
  • Equipment diagrams
  • Employee pictures
  • Charts

Avoid using decorative images that do not add business value.


Hyperlinks

Responses often direct users to other systems.

Examples:

  • Knowledge articles
  • HR portal
  • SharePoint
  • Microsoft Teams
  • ServiceNow
  • Dynamics 365
  • Internal documentation

Rather than displaying long URLs, use descriptive text.

Good example:

Open the Employee Benefits Portal

Poor example:

https://contoso.sharepoint.com/sites/hr/benefits/documents...

Tables

Some channels support table formatting.

Tables work well for:

  • Pricing
  • Inventory
  • Order summaries
  • Project status
  • Performance metrics

Example

ProductQuantityStatus
Laptop3Ready
Monitor2Backordered

Tables improve readability compared to long sentences.


Lists

Bulleted lists are excellent for:

  • Instructions
  • Requirements
  • Features
  • Benefits
  • Action items

Example

Before submitting:

  • Verify your information
  • Upload required documents
  • Review your answers
  • Click Submit

Response Tone

Formatting is not only visual—it also influences communication style.

Agents should be:

Professional

Friendly

Clear

Concise

Helpful

Avoid:

  • Excessive technical jargon
  • Large blocks of text
  • Ambiguous wording
  • Robotic language
  • Unnecessary repetition

AI-Generated Responses vs Authored Responses

Copilot Studio supports both authored and AI-generated responses.

Authored Responses

Created manually by the designer.

Advantages:

  • Predictable
  • Consistent
  • Easier compliance
  • Controlled wording

Best for:

  • Policies
  • Compliance
  • Legal information
  • HR guidance

AI-Generated Responses

Generated using enterprise knowledge sources and generative AI.

Advantages:

  • Dynamic
  • Flexible
  • Natural conversations
  • Less maintenance

Best for:

  • FAQs
  • Large knowledge bases
  • Documentation
  • Internal support

Designers should ensure AI-generated responses still follow organizational formatting guidelines.


Channel Considerations

Different deployment channels render responses differently.

Examples include:

  • Microsoft Teams
  • Web chat
  • Mobile applications
  • Custom websites
  • Power Apps
  • Omnichannel Customer Service

Not every channel supports every formatting feature.

Adaptive Cards, images, buttons, and Markdown may behave differently depending on the target platform.

Before deployment, always validate that responses render correctly on every supported channel.


Accessibility Considerations

Well-formatted responses should also be accessible.

Best practices include:

  • Use descriptive button labels.
  • Avoid relying solely on color to convey meaning.
  • Keep language simple and readable.
  • Organize information with headings and lists.
  • Provide alternative text for images where supported.
  • Ensure sufficient spacing between sections.
  • Keep interactive cards uncluttered.

Accessibility improves usability for all users and supports inclusive design principles.


Performance Considerations

Overly complex responses can affect user experience.

Recommendations include:

  • Avoid unnecessarily large Adaptive Cards.
  • Limit excessive images.
  • Keep responses concise.
  • Return only relevant information.
  • Avoid deeply nested card layouts.
  • Use buttons instead of requiring users to type common responses.

Simple, focused responses generally provide the best user experience.


Common Design Mistakes

Candidates should recognize poor response design.

Common mistakes include:

  • Returning paragraphs instead of structured content.
  • Showing raw JSON or API output to users.
  • Displaying poorly formatted dates and currencies.
  • Using inconsistent terminology.
  • Creating overly large Adaptive Cards.
  • Mixing multiple unrelated tasks into one response.
  • Ignoring channel limitations.
  • Forgetting to test rendering across deployment targets.

Best Practices

When configuring agent responses:

  • Choose the simplest format that satisfies the business requirement.
  • Use Markdown to improve readability.
  • Personalize responses with variables.
  • Display business data in user-friendly formats.
  • Use Adaptive Cards for interactive experiences.
  • Maintain consistent formatting across topics.
  • Design for accessibility.
  • Test responses on every deployment channel.
  • Keep messages concise and action-oriented.
  • Use buttons and structured layouts to reduce user effort.

AB-620 Exam Tips

For the exam, remember the following:

  • Understand the differences between plain text, Markdown, rich text, and Adaptive Cards.
  • Know when Adaptive Cards provide value over standard text responses.
  • Be familiar with using variables to personalize responses.
  • Understand how channel capabilities influence formatting choices.
  • Recognize when authored responses are preferable to AI-generated responses.
  • Know how formatting improves usability, accessibility, and user satisfaction.
  • Expect scenario-based questions requiring you to choose the most appropriate response format for a given business requirement.

This topic is frequently tested through scenarios in which you must balance user experience, maintainability, accessibility, and channel compatibility. A strong understanding of response formatting principles will help you design professional, effective AI agents in Microsoft Copilot Studio.


Practice Exam Questions


Question 1

A company is building a Copilot Studio agent that helps employees submit vacation requests. Users should be able to review the request details and either approve or cancel the submission without typing additional text.

Which response format should you use?

A. Plain text response

B. Adaptive Card with action buttons

C. Markdown with bullet lists

D. AI-generated response

Correct Answer: B

Explanation:

Adaptive Cards support interactive controls such as buttons, input fields, and forms. Since users need to take immediate action by selecting Approve or Cancel, an Adaptive Card provides the best user experience. Plain text and Markdown can display information but cannot provide rich interactive controls.


Question 2

An agent returns the following response:

Order Number: 84562
Status: Shipped
Expected Delivery: July 8

The designer wants the response to be easier to scan while maintaining compatibility across nearly all deployment channels.

Which approach should be used?

A. Convert the response into an Adaptive Card

B. Replace the response with AI-generated text

C. Format the response using Markdown headings and spacing

D. Display the information as raw JSON

Correct Answer: C

Explanation:

Markdown formatting improves readability while remaining compatible with most supported channels. An Adaptive Card could also work, but it introduces unnecessary complexity when only simple formatting is required.


Question 3

A Copilot Studio agent retrieves a customer’s first name from Microsoft Dataverse before responding.

How should the response be personalized?

A. Hard-code the customer’s name into every response.

B. Ask the customer to type their name every time.

C. Insert a variable that contains the customer’s name.

D. Return the customer ID instead.

Correct Answer: C

Explanation:

Variables allow responses to dynamically personalize information using data retrieved during the conversation. This reduces user effort and improves the conversational experience.


Question 4

A developer wants an agent to return troubleshooting instructions that include several PowerShell commands.

Which formatting option provides the clearest presentation?

A. Store the commands in a Fact Set.

B. Display the commands inside an image.

C. Place the commands inside an Adaptive Card button.

D. Format the commands using a code block.

Correct Answer: D

Explanation:

Code blocks preserve formatting and spacing, making PowerShell commands easier to read and copy. Images prevent copying, and buttons are intended for actions rather than displaying scripts.


Question 5

An HR agent returns employee handbook information that rarely changes and must always match company policy exactly.

Which response type is most appropriate?

A. Authored response

B. AI-generated response

C. Adaptive Card

D. Markdown-generated summary

Correct Answer: A

Explanation:

Policy and compliance information should use authored responses because administrators maintain complete control over wording and consistency. AI-generated responses may paraphrase information, which is undesirable for official policy.


Question 6

A product catalog agent must display several products with images, prices, descriptions, and “View Details” buttons.

Which response format is most appropriate?

A. Plain text

B. Markdown bullet list

C. Adaptive Card

D. Code block

Correct Answer: C

Explanation:

Adaptive Cards are designed for structured, interactive presentations that include images, buttons, and organized information, making them ideal for product catalogs.


Question 7

A support agent currently returns the following response:

Ticket created. Number 87321. Priority High. Assigned to Network Team. Estimated completion 2 hours.

What is the best improvement?

A. Replace the response with a hyperlink.

B. Separate the information into headings and labeled sections.

C. Convert the information into XML.

D. Remove the priority information.

Correct Answer: B

Explanation:

Organizing related information into labeled sections makes responses easier to scan and understand. The content remains the same while improving readability.


Question 8

An organization deploys the same agent to Microsoft Teams, a company website, and a mobile application.

Why should response formatting be tested on every deployment channel?

A. Every channel supports identical formatting capabilities.

B. Adaptive Cards only work on websites.

C. AI-generated responses cannot be used on Teams.

D. Different channels may render formatting and interactive components differently.

Correct Answer: D

Explanation:

Channel capabilities vary. Some channels support full Adaptive Cards and Markdown, while others may partially support or render features differently. Testing ensures a consistent user experience.


Question 9

An agent retrieves the following value from a database:

2026-08-14T13:30:00Z

What is the best way to present this information?

A. Display the raw timestamp.

B. Convert it to binary.

C. Format it into a user-friendly date and time.

D. Replace it with the database record ID.

Correct Answer: C

Explanation:

Users should see dates and times in an understandable format rather than technical timestamp values. Proper formatting improves usability and professionalism.


Question 10

A designer wants to improve accessibility for all users interacting with a Copilot Studio agent.

Which design choice best supports this goal?

A. Use descriptive button labels and well-structured responses.

B. Rely only on color to indicate status.

C. Replace text with images whenever possible.

D. Display all information in a single paragraph.

Correct Answer: A

Explanation:

Accessibility best practices include meaningful button labels, organized layouts, headings, and clear language. Relying solely on color or replacing text with images reduces accessibility, while large blocks of text make responses harder to understand.


Exam Readiness Checklist

Before taking the AB-620 exam, ensure you can:

  • ✔ Differentiate between plain text, Markdown, rich text, and Adaptive Cards.
  • ✔ Identify when to use authored versus AI-generated responses.
  • ✔ Configure dynamic responses using variables.
  • ✔ Select the most appropriate formatting for business scenarios.
  • ✔ Design responses that improve readability and usability.
  • ✔ Understand how deployment channels affect response rendering.
  • ✔ Apply accessibility best practices to agent responses.
  • ✔ Format dates, currencies, percentages, and other dynamic values appropriately.
  • ✔ Recognize when interactive controls improve the user experience.
  • ✔ Evaluate response formatting decisions based on business requirements, user experience, and maintainability.

These scenario-based questions reflect the style of the AB-620 certification exam, where selecting the most appropriate design choice is often more important than simply knowing a feature exists.


Go to the AB-620 Exam Prep Hub main page

Implement error handling in agent flows (AB-620 Exam Prep)

This post is a part of the AB-620: Designing and Building Integrated AI Agent Solutions in Copilot Studio Exam Prep Hub.
This topic falls under these sections:
Plan and configure agent solutions (30–35%)
   --> Create and monitor agent flows in Copilot Studio
      --> Implement error handling in agent flows


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Introduction

Error handling is a critical component of designing reliable AI agent solutions in Microsoft Copilot Studio. Regardless of how well an agent is designed, failures can occur due to unavailable services, invalid user input, authentication problems, network interruptions, connector failures, or unexpected business logic. A well-designed agent anticipates these situations and responds gracefully instead of simply failing.

For the AB-620 certification exam, you should understand how to design resilient agent flows that detect, manage, and recover from errors while maintaining a positive user experience.


Why Error Handling Matters

Enterprise AI agents frequently interact with multiple systems, including:

  • Microsoft Dataverse
  • Microsoft 365
  • Dynamics 365
  • Power Automate
  • Azure services
  • REST APIs
  • Third-party SaaS applications
  • Databases

Every external dependency introduces potential points of failure.

Without proper error handling, users may experience:

  • Confusing responses
  • Broken conversations
  • Incomplete business transactions
  • Duplicate operations
  • Lost data
  • Poor customer satisfaction

Good error handling minimizes these risks.


Common Sources of Errors

User Input Errors

Users may provide:

  • Invalid dates
  • Incorrect email addresses
  • Unsupported values
  • Missing required information
  • Unexpected free-form responses

Example:

User:
“I need vacation starting February 31.”

The agent should recognize the invalid date and ask for correction.


Authentication Errors

An agent may require the user to sign in before accessing protected resources.

Possible failures include:

  • Expired authentication tokens
  • Missing permissions
  • Incorrect identity
  • Authentication timeout

Example:

“I cannot access your HR information until you sign in.”


Authorization Errors

Authentication verifies identity.

Authorization verifies permissions.

Example:

A user successfully signs in but lacks permission to:

  • Approve expenses
  • View payroll
  • Modify customer records

The agent should explain the permission issue rather than displaying a generic failure.


Connector Failures

Power Platform connectors may fail because:

  • Service unavailable
  • Invalid credentials
  • API throttling
  • Timeout
  • Configuration problems

Example:

Salesforce connector unavailable.

The agent should notify the user and optionally retry later.


REST API Errors

Custom APIs may return:

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 429 Too Many Requests
  • 500 Internal Server Error

Good flows interpret these responses appropriately.


Network Problems

Temporary issues include:

  • Slow internet
  • DNS failures
  • Temporary outages
  • Firewall issues

Agents should distinguish between temporary and permanent failures.


Data Validation Errors

Examples:

  • Required fields missing
  • Duplicate IDs
  • Invalid formats
  • Business rule violations

Instead of terminating the conversation, the agent should request corrected information.


Principles of Good Error Handling

Fail Gracefully

Never expose technical errors.

Poor response:

Exception 0x800401…

Better response:

“I couldn’t complete your request because the service is temporarily unavailable. Please try again in a few minutes.”


Provide Helpful Guidance

Users should know:

  • What happened
  • What they can do next
  • Whether retrying will help

Example:

“The inventory service is unavailable. You can try again later or contact support.”


Preserve Conversation Context

If possible, maintain previously collected information.

Example:

Instead of asking all questions again, resume from the failed step after recovery.


Validate Early

Catch errors before calling external systems.

Validate:

  • Required fields
  • Email format
  • Date format
  • Numeric values
  • Business rules

Earlier validation reduces unnecessary API calls.


Retry Temporary Failures

Some failures are temporary.

Examples:

  • Network interruptions
  • Service throttling
  • Temporary outages

Automatic retries may succeed without involving the user.

Avoid excessive retries that overload services.


Error Handling in Copilot Studio

Copilot Studio allows makers to design conversational logic that accounts for exceptions.

Typical techniques include:

  • Conditional branches
  • Variable validation
  • Alternative conversation paths
  • Power Automate error responses
  • Custom messages
  • Human escalation
  • Confirmation prompts

Using Conditions

Conditional logic helps detect problems before continuing.

Example:

If Order ID exists
Continue
Else
Ask user for Order ID

Another example:

If Email format valid
Continue
Else
Request valid email

Using Variables Safely

Agent variables should always be checked before use.

Example:

If CustomerID is empty
Collect CustomerID
Else
Continue

This prevents null or missing values from causing downstream failures.


Handling Power Automate Flow Errors

Many Copilot Studio actions invoke Power Automate.

A flow should return structured results.

Example response:

Status = Success
Message = Order Created

or

Status = Failed
Reason = Customer Not Found

The agent can then decide how to respond.


Returning Structured Error Messages

Instead of generic text, return structured outputs.

Example:

FieldValue
SuccessFalse
ErrorCodeCustomerNotFound
ErrorMessageCustomer does not exist

This makes downstream handling easier.


Human-in-the-Loop Recovery

Sometimes automation should stop and transfer the conversation.

Examples:

  • Sensitive requests
  • Escalations
  • Financial approvals
  • Legal questions
  • Repeated failures

The agent can:

  • Create a support ticket
  • Notify a supervisor
  • Transfer to a live agent
  • Request manual review

Timeout Handling

External systems may respond slowly.

Best practices include:

  • Notify users that processing is occurring.
  • Set reasonable timeout limits.
  • Offer retry options.
  • Continue asynchronously when appropriate.

Example:

“This is taking longer than expected. I’ll let you know once the request is complete.”


Handling Missing Knowledge

Generative answers may not find relevant information.

Instead of hallucinating, the agent should:

  • State that it cannot locate the information.
  • Suggest alternative resources.
  • Escalate if appropriate.

Example:

“I couldn’t find an answer in the available company knowledge.”


Logging Errors

Users should not see technical logs, but administrators need diagnostic information.

Useful logging includes:

  • Timestamp
  • User session
  • Connector used
  • API endpoint
  • Error code
  • Conversation step
  • Flow name
  • Correlation ID

Logs simplify troubleshooting.


Monitoring Repeated Failures

A single failure may not indicate a problem.

Repeated failures could indicate:

  • Broken connector
  • Expired credentials
  • API changes
  • Service outage
  • Poor conversation design

Administrators should monitor trends rather than isolated events.


User-Friendly Error Messages

Good messages are:

  • Clear
  • Brief
  • Non-technical
  • Actionable

Poor:

Error 500

Better:

“The order system is temporarily unavailable. Please try again later.”


Designing Recovery Paths

Recovery should allow users to continue.

Examples:

  • Retry operation
  • Correct invalid input
  • Use another data source
  • Escalate to human
  • Skip optional step
  • Resume later

Preventing Duplicate Operations

Retries can accidentally repeat transactions.

Example:

If payment succeeds but confirmation fails, retrying may charge the customer twice.

Best practices include:

  • Confirmation checks
  • Transaction IDs
  • Idempotent operations
  • Duplicate detection

Security During Errors

Error messages should never expose:

  • Connection strings
  • Passwords
  • Tokens
  • API keys
  • Stack traces
  • Internal server names

Always sanitize user-facing responses.


Designing for Resilience

Resilient agents include:

  • Input validation
  • Authentication checks
  • Authorization checks
  • Retry logic
  • Timeout handling
  • Alternative conversation paths
  • Human escalation
  • Structured error messages
  • Logging
  • Monitoring

Exam Tips

For the AB-620 exam, remember:

  • Validate user input before calling external services.
  • Use conditions to prevent invalid operations.
  • Handle connector failures gracefully.
  • Avoid exposing technical details to users.
  • Return structured responses from Power Automate flows.
  • Escalate complex or sensitive failures to humans when appropriate.
  • Monitor recurring failures using telemetry and logs.
  • Design recovery paths instead of ending conversations abruptly.
  • Protect sensitive information in all error messages.
  • Build resilient conversational experiences that maintain user trust.

Practice Exam Questions

Question 1

An agent calls a REST API that occasionally returns HTTP 429 (Too Many Requests). What is the BEST design strategy?

A. Permanently disable the API call

B. Retry the request after an appropriate delay

C. Ignore the error and continue

D. Ask the user to refresh their browser

Answer: B

Explanation: HTTP 429 indicates rate limiting. The appropriate strategy is to wait and retry rather than immediately failing or repeatedly calling the service.


Question 2

A Power Automate flow fails because a required input variable is empty. What should the agent do first?

A. Retry the flow indefinitely

B. Display the raw flow error

C. Prompt the user to provide the missing information

D. End the conversation

Answer: C

Explanation: Missing required inputs should be collected before attempting the operation again.


Question 3

Which information should NOT be included in a user-facing error message?

A. A friendly explanation

B. Suggested next steps

C. Whether the operation can be retried

D. API keys and stack traces

Answer: D

Explanation: Sensitive implementation details should never be exposed to users because they create security risks.


Question 4

A connector to an external CRM system is temporarily unavailable. Which response provides the best user experience?

A. “Unhandled exception occurred.”

B. End the conversation immediately.

C. “The CRM service is temporarily unavailable. Please try again shortly.”

D. Continue as though the update succeeded.

Answer: C

Explanation: Users should receive clear, actionable information without misleading them or exposing technical details.


Question 5

Why should agent flows validate user input before invoking external services?

A. It reduces unnecessary API calls and catches errors earlier.

B. It guarantees network availability.

C. It eliminates authentication requirements.

D. It automatically fixes invalid data.

Answer: A

Explanation: Early validation improves efficiency, reduces failures, and enhances the overall user experience.


Question 6

A flow returns the following values:

  • Success = False
  • ErrorCode = CustomerNotFound
  • ErrorMessage = Customer does not exist

Why is this approach recommended?

A. It hides all errors from administrators.

B. It increases API response speed.

C. It provides structured information that downstream logic can evaluate.

D. It replaces logging.

Answer: C

Explanation: Structured responses enable agent logic to make consistent decisions based on defined outcomes.


Question 7

When should an agent transfer a conversation to a human?

A. Every time an API call completes

B. When repeated failures or business requirements require manual intervention

C. After every authentication request

D. Only after restarting the conversation

Answer: B

Explanation: Human escalation is appropriate for scenarios where automation cannot safely or effectively complete the task.


Question 8

Which practice helps prevent duplicate transactions when retrying failed operations?

A. Ignoring retries

B. Deleting transaction history

C. Removing confirmation messages

D. Using transaction IDs or idempotent operations

Answer: D

Explanation: Idempotency and unique transaction identifiers help ensure repeated requests do not produce duplicate results.


Question 9

Why should administrators monitor recurring flow failures?

A. To identify underlying service or configuration issues

B. To reduce conversation length

C. To eliminate authentication

D. To prevent users from accessing the agent

Answer: A

Explanation: Repeated failures often indicate systemic issues such as expired credentials, connector problems, or service outages.


Question 10

Which statement best describes resilient agent design?

A. Errors should always terminate the conversation.

B. Users should always see detailed exception information.

C. Agents should anticipate failures, recover where possible, and provide helpful guidance.

D. External systems should never be called.

Answer: C

Explanation: Resilient agents are designed to recover gracefully, guide users through problems, and continue conversations whenever practical.


Go to the AB-620 Exam Prep Hub main page

Create an agent flow (AB-620 Exam Prep)

This post is a part of the AB-620: Designing and Building Integrated AI Agent Solutions in Copilot Studio Exam Prep Hub.
This topic falls under these sections:
Plan and configure agent solutions (30–35%)
   --> Create and monitor agent flows in Copilot Studio
      --> Create an agent flow


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Introduction

Agent flows are an important capability in Microsoft Copilot Studio that enable AI agents to execute structured business processes, automate tasks, and interact with enterprise systems. While conversational AI allows users to communicate naturally with an agent, agent flows provide the deterministic workflow that performs the actual business operations behind the conversation.

An agent flow combines AI reasoning with automation by orchestrating actions such as retrieving data, calling APIs, invoking connectors, running Power Automate flows, making decisions, and returning results to the user. Instead of simply answering questions, an agent can complete end-to-end business tasks such as creating support tickets, approving requests, updating customer records, or retrieving inventory information.

For the AB-620 exam, you should understand how to design, create, configure, and optimize agent flows, how they interact with topics and tools, and when they should be used instead of conversational logic alone.


What Is an Agent Flow?

An agent flow is a structured sequence of actions that enables an AI agent to complete one or more business tasks.

Unlike free-form conversation, an agent flow follows a defined process to:

  • Collect required information
  • Validate inputs
  • Make decisions
  • Execute actions
  • Interact with external systems
  • Return results
  • Handle errors

Agent flows bridge conversational AI with enterprise automation.


Purpose of Agent Flows

Agent flows allow organizations to automate repeatable business processes while maintaining a natural conversational experience.

Typical objectives include:

  • Automating manual tasks
  • Improving employee productivity
  • Reducing human error
  • Standardizing business processes
  • Connecting to enterprise applications
  • Executing multiple actions in sequence
  • Supporting human approvals
  • Improving customer experiences

Agent Flows vs. Topics

Although both are used within Copilot Studio, they serve different purposes.

TopicsAgent Flows
Manage conversationsExecute business processes
Guide dialoguePerform structured automation
Ask questionsExecute actions
Handle conversational branchingHandle workflow logic
Focus on user interactionFocus on business operations

A topic often initiates an agent flow after gathering the information needed to perform the requested task.


Common Use Cases

Typical business scenarios include:

  • Creating support tickets
  • Resetting passwords
  • Approving expense reports
  • Booking appointments
  • Creating customer records
  • Updating CRM information
  • Retrieving order status
  • Checking inventory
  • Submitting leave requests
  • Processing purchase requests

Components of an Agent Flow

An agent flow typically contains several logical components.

Trigger

The trigger determines when the flow begins.

Triggers may include:

  • User requests
  • Topic invocation
  • Tool execution
  • Business events
  • External requests

Inputs

Inputs provide the information required to perform the workflow.

Examples include:

  • Employee ID
  • Customer number
  • Order number
  • Product ID
  • Date range
  • Email address

Inputs may be:

  • Collected during conversation
  • Retrieved from user profiles
  • Retrieved from enterprise systems
  • Passed from another agent

Variables

Variables temporarily store information while the flow executes.

Examples:

  • Customer name
  • Ticket number
  • Order status
  • Approval result
  • Inventory count

Variables enable information to be reused throughout the workflow.


Conditions

Conditions determine which path the flow follows.

Examples include:

  • If inventory exists
  • If approval is required
  • If customer is authenticated
  • If balance exceeds a threshold
  • If record exists

Conditional logic enables intelligent automation.


Actions

Actions perform the work within the workflow.

Examples:

  • Call a connector
  • Execute a REST API
  • Query Dataverse
  • Run a Power Automate flow
  • Update SharePoint
  • Create a Dynamics 365 record
  • Send an email
  • Post a Teams message

Most business value comes from these actions.


Outputs

Outputs return information to the conversation.

Examples include:

  • Confirmation messages
  • Ticket numbers
  • Order status
  • Approval results
  • Error messages
  • Retrieved records

Outputs become part of the user’s conversational experience.


Planning an Agent Flow

Before creating a flow, identify:

  • Business objective
  • Required systems
  • Required permissions
  • Required data
  • User inputs
  • Decision points
  • Expected outputs
  • Exception scenarios

Proper planning reduces development effort and simplifies maintenance.


Designing the Workflow

A well-designed workflow should follow a logical progression.

Typical design:

  1. Receive request
  2. Authenticate user (if necessary)
  3. Gather required information
  4. Validate input
  5. Execute business actions
  6. Handle exceptions
  7. Return results
  8. Log activity

Keeping workflows organized improves readability and troubleshooting.


Working with Enterprise Systems

Agent flows commonly interact with enterprise systems.

Examples include:

  • Microsoft Dataverse
  • Dynamics 365
  • SharePoint
  • Microsoft Graph
  • SQL Server
  • Azure services
  • SAP
  • Salesforce
  • ServiceNow
  • REST APIs

The agent flow coordinates communication between these systems.


Using Connectors

Connectors simplify integrations by providing prebuilt access to services.

Benefits include:

  • Reduced development effort
  • Secure authentication
  • Standardized operations
  • Easier maintenance
  • Faster implementation

Whenever possible, use built-in connectors before creating custom integrations.


Using REST APIs

When no connector exists, agent flows can call REST APIs.

Typical scenarios include:

  • Proprietary business applications
  • Legacy systems
  • Third-party cloud services
  • Internal web services

Planning API authentication and error handling is essential.


Calling Power Automate Flows

Complex automation can be delegated to Power Automate.

Examples:

  • Multi-step approvals
  • Document generation
  • File processing
  • Notifications
  • Data synchronization
  • Scheduled processing

Agent flows and Power Automate complement one another rather than replacing each other.


Working with Variables

Variables improve workflow flexibility.

Common uses include:

  • Passing values between actions
  • Storing intermediate results
  • Formatting outputs
  • Performing calculations
  • Tracking workflow state

Proper naming conventions improve maintainability.


Conditional Logic

Business workflows often require decision making.

Examples:

If employee exists
Retrieve leave balance
Else
Return employee not found

Or:

If inventory > 0
Complete purchase
Else
Notify out of stock

Decision logic makes workflows responsive to business conditions.


Error Handling

Errors should always be anticipated.

Examples include:

  • Invalid user input
  • Authentication failures
  • Missing records
  • API timeouts
  • Network failures
  • Permission issues
  • Connector failures

Good error handling includes:

  • Logging
  • User-friendly messages
  • Retry logic (when appropriate)
  • Graceful termination
  • Human escalation if needed

Security Considerations

Agent flows often execute sensitive business operations.

Security planning should include:

  • Microsoft Entra ID authentication
  • Role-Based Access Control (RBAC)
  • Least privilege
  • Secure connectors
  • Secret management
  • Data Loss Prevention (DLP)
  • Audit logging

Never grant more permissions than necessary.


Performance Considerations

Efficient agent flows improve user satisfaction.

Recommendations:

  • Minimize unnecessary API calls.
  • Avoid duplicate data retrieval.
  • Reuse variables.
  • Execute independent actions efficiently.
  • Reduce unnecessary conversation steps.
  • Optimize connector usage.

Performance directly impacts user experience.


Reusability

Many agent flows support multiple agents.

Examples:

  • Employee lookup
  • Customer search
  • Ticket creation
  • Identity verification
  • Knowledge retrieval
  • Approval processing

Reusable flows reduce maintenance effort.


Monitoring Agent Flows

After deployment, monitor:

  • Execution success rate
  • Execution failures
  • Average completion time
  • Connector errors
  • API failures
  • User abandonment
  • Authentication failures

Monitoring enables continuous improvement.


Testing Agent Flows

Testing should verify:

  • Correct input validation
  • Business logic
  • Decision paths
  • API integration
  • Connector functionality
  • Error handling
  • Security
  • Performance

Both successful and failure scenarios should be tested.


Common Design Mistakes

Avoid:

  • Hardcoding values
  • Ignoring input validation
  • Missing error handling
  • Excessive permissions
  • Long, overly complex workflows
  • Duplicate business logic
  • Poor variable naming
  • Inadequate documentation

Best Practices

  • Clearly define the business objective.
  • Keep workflows modular.
  • Validate all inputs.
  • Use connectors whenever possible.
  • Reuse Power Automate flows.
  • Handle all expected exceptions.
  • Apply least-privilege security.
  • Log important operations.
  • Test every decision path.
  • Monitor production performance.

Exam Tips

For the AB-620 exam, remember:

  • Agent flows automate structured business processes.
  • Topics collect information and often invoke agent flows.
  • Flows commonly use connectors, REST APIs, and Power Automate.
  • Variables store information during execution.
  • Conditional logic determines workflow paths.
  • Proper error handling is essential.
  • Enterprise integrations require secure authentication.
  • Reusable flows simplify maintenance.
  • Monitoring helps optimize reliability and performance.
  • Security and governance apply throughout the workflow lifecycle.

Practice Exam Questions

Question 1

An organization wants its AI agent to create a help desk ticket after collecting the user’s issue description. Which Copilot Studio capability should perform the ticket creation?

A. An agent flow

B. A conversation greeting

C. An Adaptive Card theme

D. A system topic

Correct Answer: A

Explanation: Agent flows are designed to execute structured business processes such as creating tickets, updating records, or calling enterprise systems after the conversational portion has collected the required information.


Question 2

What is the primary purpose of variables within an agent flow?

A. To permanently store customer information

B. To replace enterprise databases

C. To temporarily store and pass information between workflow steps

D. To authenticate users

Correct Answer: C

Explanation: Variables temporarily hold data during flow execution, allowing information such as IDs, names, or API responses to be reused throughout the workflow.


Question 3

A company needs to integrate an agent flow with a proprietary business application that does not have a built-in connector. Which integration approach is most appropriate?

A. Microsoft Dataverse only

B. REST API calls

C. Adaptive Cards

D. Conversation variables

Correct Answer: B

Explanation: When a prebuilt connector is unavailable, REST APIs provide a standard method for integrating with custom or proprietary applications.


Question 4

Which activity should typically occur before an agent flow executes business actions?

A. Delete all conversation variables.

B. Restart the conversation.

C. Validate the required user inputs.

D. Disable authentication.

Correct Answer: C

Explanation: Validating user input before executing business operations helps prevent errors, invalid transactions, and unnecessary API calls.


Question 5

Which statement best describes the relationship between topics and agent flows?

A. Topics replace agent flows.

B. Agent flows replace conversations.

C. Topics manage conversation while agent flows execute structured business processes.

D. Topics only perform API calls.

Correct Answer: C

Explanation: Topics are responsible for conversational interactions, while agent flows automate business logic and integrations.


Question 6

Which design principle improves the maintainability of agent flows?

A. Embedding every business process into one large workflow

B. Hardcoding all configuration values

C. Granting administrator permissions to every connector

D. Creating modular, reusable flows for common business tasks

Correct Answer: D

Explanation: Modular and reusable flows reduce duplication, simplify updates, and improve long-term maintainability.


Question 7

An agent flow calls an external API that occasionally becomes unavailable. What is the best design practice?

A. Assume the API will always be available.

B. Ignore failures and continue processing.

C. Implement appropriate error handling and provide a meaningful response to the user.

D. Disable logging to improve performance.

Correct Answer: C

Explanation: External integrations can fail. Proper error handling, logging, and user-friendly messaging improve reliability and user experience.


Question 8

Why are built-in connectors generally preferred over custom integrations when possible?

A. They eliminate the need for authentication.

B. They provide standardized, supported integrations that reduce development effort.

C. They only work with Microsoft products.

D. They automatically create Power Automate flows.

Correct Answer: B

Explanation: Built-in connectors simplify integration by providing standardized operations, authentication, and ongoing support, reducing the need for custom development.


Question 9

Which metric would be most useful when monitoring the health of an agent flow?

A. Number of PowerPoint presentations created

B. Employee vacation balances

C. Average conversation greeting length

D. Flow execution success and failure rates

Correct Answer: D

Explanation: Monitoring execution success rates, failures, and completion times helps identify reliability and performance issues within agent flows.


Question 10

Which sequence best represents a well-designed agent flow?

A. Execute actions → Collect inputs → Validate inputs → Return results

B. Return results → Execute actions → Authenticate user

C. Collect inputs → Validate inputs → Execute business actions → Return results

D. Execute API calls → Ignore errors → End conversation

Correct Answer: C

Explanation: A well-designed agent flow first gathers and validates the required information before performing business operations and returning the results to the user.


Go to the AB-620 Exam Prep Hub main page