Build Your First Autonomous Agent with Copilot Studio

Build Your First Autonomous Agent with Copilot Studio

How to Build Your First Autonomous Agent

Introduction

  • Overview of building an autonomous agent using Co-Pilot Studio.
  • Focus on use cases and reasons for creating autonomous agents.
  • Scenario involves a customer-facing returns policy for a retailer.

Building the Agent

  • Aim to create an agent that processes return requests autonomously.
  • Emphasis on moving beyond chat experiences to handle workflows independently.
  • The project will not include human escalation; it will be fully autonomous.

Getting Started with Co-Pilot Studio

  • Introduction to Co-Pilot Studio as a no-code tool for building agents.
  • Free trial available; no license needed for testing and building.
  • Starting by creating a new agent named "returns agent."

Configuring the Agent

  • Importance of providing clear descriptions for the agent's purpose.
  • Description should outline the agent's role in handling return requests.
  • Avoid creating overly complex agents with multiple responsibilities.

Adding Knowledge and Instructions

  • Each agent should focus on being an expert in a specific domain or process.
  • Plan to upload knowledge files after provisioning the agent is complete.

How Does an Autonomous Agent Work?

Understanding the Process

  • An autonomous agent automates processes without traditional if-then logic, using knowledge instead.
  • It utilizes a returns policy and can send emails to customers based on their inquiries.
  • The trigger for actions can be an incoming email or other forms like web forms or phone calls.

Enabling Generative AI Features

  • Generative AI is activated to determine responses, moving away from traditional topic triggers.
  • The agent uses descriptions to decide actions without a predefined flowchart, mimicking human decision-making.
  • Ensure generative AI capabilities are enabled in settings for optimal functionality.

Adding Knowledge Sources

  • Upload the returns policy document as knowledge; it must be closed before uploading.
  • Uploaded documents are indexed for AI reasoning but require updates if changes occur externally.
  • Other options include connecting to websites or SharePoint for internal use cases.

Managing Knowledge Scope

  • Limit the AI's general knowledge usage by disabling its ability to answer questions outside the returns policy.
  • This ensures that responses are strictly based on provided information rather than general assumptions.

Testing the Agent

Getting Started with Generative AI

  • The speaker discusses activating generative AI capabilities and testing functionality step by step.
  • Demonstrates returning an item using the correct returns policy from a single knowledge source.
  • Introduces the concept of enabling actions for the agent to make decisions based on knowledge.

Implementing Actions

  • Describes how to set up actions similar to Power Automate, focusing on sending emails.
  • Explains that flows can be used for retrieving information but focuses on a simple email action.
  • Mentions using Outlook connector for sending emails and the need for authentication.

Configuring Email Action

  • The action is renamed to "send an email" for clarity in instructions provided to the agent.
  • Emphasizes clear descriptions for actions, detailing what the email will communicate regarding returns.
  • Discusses options for escalating emails to a human before sending them out.

Setting Up Email Parameters

  • Inputs required include recipient, subject, and body of the email; dynamic filling is possible.
  • Shows how to set specific values like subject line while allowing generative AI to handle content.
  • Confirms minimal input requirements while leveraging generative AI capabilities effectively.

Testing Email Functionality

  • Reviews setup steps confirming generative mode must be enabled for functionality.
  • Prepares to test by providing specific instructions related to item return queries via email.

How to Automate Email Responses

Overview of Email Automation

  • Discusses the initial setup for automating email responses using Flybys dollars.
  • Emphasizes the ease of populating emails without needing a complex flow; encourages questions for better understanding.

Instructions and Triggers

  • Introduces the concept of giving instructions in natural language instead of building a traditional flow.
  • Explains how to instruct an assistant-like system to handle customer inquiries effectively.

Task Execution

  • Details on pasting instructions that guide the agent through tasks similar to human interaction.
  • Mentions changing subject lines for demo purposes and outlines tasks to perform upon receiving an email.

Finalizing Instructions

  • Suggests experimenting with wording in instructions, providing a copy for reference.
  • Highlights key components like friendly greetings and avoiding citations in email responses.

Adding Triggers

  • Describes adding triggers to automate processes without manual input, familiarizing users with Power Platform connectors.
  • Discusses setting parameters for incoming emails, such as inbox selection and subject filters.

Testing Automation

  • Outlines steps taken during testing, including sending a test email with specific criteria.

Understanding Email Flow Automation

Overview of the Flow

  • The flow is designed to trigger when a new email arrives, utilizing specific parameters like email address and subject filter.
  • Editing the flow may cause issues; it's advised to observe without making changes initially.
  • Refreshing the run history shows no runs yet; patience is required as it typically takes about 2 minutes for triggers.

Voice Interaction Capabilities

  • The system can also function as an IVR or voice chat agent, allowing users to interact via phone calls.
  • It utilizes voice recognition to understand queries and respond appropriately, enhancing user experience.

Testing the Trigger

  • A mistake in the subject filter was identified; testing with a corrected demo email was initiated.
  • Real-time testing is emphasized; refreshing will show updates in Power Automate slightly ahead of other interfaces.
  • The trigger successfully processed an incoming email, demonstrating its functionality without manual input.

Finalizing and Publishing

  • The process includes checking knowledge sources and confirming that responses are generated correctly based on received emails.
  • Formatting improvements are still needed for better presentation of automated responses.

How to Publish a Chatbot?

  • The chatbot is published without needing an external facing experience; it runs as an automated flow.
  • The system autonomously waits for emails that meet specific criteria to process requests.
  • A draft email requesting a return of an item purchased with Afterpay is prepared before sending.

Real-Time Email Processing

  • The agent receives the email trigger and processes it, aiming for near real-time response.
  • The email processing involves checking knowledge sources and making decisions based on the content.
  • There are plans for more tutorials on autonomous agents, including travel policy checks.

Learning Journey with Autonomous Agents

  • This tutorial showcases one action from one knowledge source, highlighting the potential for expansion.
  • Feedback and ideas for future tutorials are welcomed as part of the learning journey.
Channel: Lisa Crosbie
Video description

Build Your First Autonomous Agent with Copilot Studio! In this step-by-step beginner tutorial, I take you through how to create your very first autonomous agent using Copilot Studio. I break down the key components, explore why this is such an important concept, and help you understand real scenarios you can explore in your own organisation with this innovative new technology. By the end of this video, you’ll: ✅ Understand the core components of an autonomous agent ✅ Know how to build your own autonomous agent with no code ✅ Understand practical examples and use cases for autonomous agents -------------------------------------------------- Connect with me: ☕ Buy me a coffee: https://www.buymeacoffee.com/lisacrosbie 📘 Get my book: Microsoft Copilot Pro: Step by Step https://www.microsoftpressstore.com/store/microsoft-copilot-pro-step-by-step-9780135369425 🦉 Learn more about AI: https://aka.ms/learnwithlisa 🖇 LinkedIn: https://www.linkedin.com/in/lisa-crosbie/ 📼 TikTok: https://www.tiktok.com/@lisa.crosbie 📚Take my LinkedIn Learning Course: Microsoft Power Platform Fundamentals (PL-900) Exam: Power Apps https://www.linkedin.com/learning/microsoft-power-platform-fundamentals-pl-900-cert-prep-power-apps/ Timestamps 0:00 - Autonomous agents and scenarios 2:20 - Get started with Copilot Studio 2:50 - Create an agent 5:25 - Building blocks of an Autonomous Agent 7:55 - Add knowledge 12:35 - Add actions 18:15 - Add instructions 20:54 - Add a trigger 22:29 - Test your agent 28:58 - Publish your agent and track activity 32:48 - Build agents for Microsoft 365 Copilot