Deli z drugimi prek


Overview of Bot Framework Composer

Note

This article applies to classic chatbots only. To extend copilots created in Copilot Studio, you don't need to use Bot Framework Composer. All features described in this article are available for copilots, directly in Copilot Studio.

Enhance your copilot by developing custom topics with Bot Framework Composer and then adding them to your Copilot Studio copilot.

Composer is integrated into Copilot Studio to allow developers and business users to build copilots together. Composer lets you extend your copilot with Bot Framework functionality, including:

  • Adaptive dialogs
  • Language Generation (LG)
  • Regular expressions (RegEx)
  • Adaptive Cards

Using Composer with Copilot Studio lets you access conversational memory and context, including the variables defined in Copilot Studio. This memory and context lets you create topics to handle interruptions, cancellations, and context switching. You can also add Adaptive Cards to display interactive elements like images and videos, forms, and more in the copilot.

There are various prebuilt functions and expressions in Composer for you to use, and the ability to define multiple variations of a phrase for the copilot to randomly select at runtime.

Custom topics added with Composer are deployed, hosted, and executed together with the rest of Copilot Studio copilot content, and don't require any more Azure hosting.

Important

Composer integration isn't available to users who only have the Teams Microsoft Copilot Studio license. You must have a trial or full Microsoft Copilot Studio license.

Prerequisites

Understand key Composer terms

Composer uses a different set of terms to describe similar concepts used in Copilot Studio. Here are some key terms to understand:

  • dialog: Dialogs are the basic building block in Composer and serve as containers for triggers. Each dialog represents a portion of the bot's functionality that contains instructions for what the bot does and how it reacts to user input. To learn more about dialogs, see Dialogs as conversational building blocks in Composer.

  • main dialog: A bot's main dialog is the first dialog that appears in the bot explorer and is created when you import your Copilot Studio copilot into Composer. The main dialog should never be deleted, as it corresponds to your Copilot Studio copilot.

  • trigger: Triggers are the main component of a dialog and let you catch and respond to events. Each trigger has a condition and a collection of actions to execute when the condition is met. You can think of triggers as the equivalent of topics in Copilot Studio. To learn more about triggers, see Triggers.

  • action: Actions are the main components of a trigger that enable you to send a response, create and assign values to properties, manipulate the conversational flow, manage dialogs, and many other activities. You can think of actions as the equivalent of nodes in Copilot Studio.

Composer features not supported with Copilot Studio

The following Composer features aren't supported with Copilot Studio:

Unsupported feature Additional information
LUIS (language understanding) Recognizer Default Recognizer in Composer is set to Microsoft Copilot Studio Natural Language Understanding (NLU).
Bot Framework Orchestrator Bot Framework Orchestrator isn't supported in Composer for Copilot Studio.
Custom recognizer Custom recognizer isn't supported in Composer for Copilot Studio.
Bot skills Can't invoke Bot skills in Composer content meant for Copilot Studio.
QnA Maker This feature isn't available in Composer for Copilot Studio.
OAuth Login and User Sign Out These types of actions aren't supported in Composer for Copilot Studio.
Dialog Inputs and Outputs Dialog Inputs and Outputs aren't supported in Composer for Copilot Studio.
Entity detection in trigger phrases in Composer Can't use # getUserName my name is {username=userName} in Composer.
Testing in Bot Framework Emulator All Composer content should be published and then tested in Copilot Studio.

Guidelines for creating content for Copilot Studio in Composer

There are a few key guidelines to follow when using Composer to create content for Copilot Studio:

  • The topics from your Copilot Studio copilot are displayed in Composer as dialogs. You can't edit these dialogs in Composer; selecting them opens the relevant topics in Copilot Studio for editing.

    Screenshot of the list of topics in Composer that were imported from a Copilot Studio copilot.

  • Copilot Studio global variables are accessed in Composer by using the virtualagent scope. This scope doesn't appear in Composer's property reference menu, but you can access it by entering an expression directly.

  • Publishing content in Composer makes the changes available for testing, but doesn't automatically publish your Copilot Studio copilot. To publish your copilot changes to channels, use the Publish feature in Copilot Studio.

  • Use a Begin a Microsoft Copilot Studio Topic action to call Copilot Studio topics in Composer.

    Screenshot of Composer's add action menu.

  • You can add new Composer triggers of any kind to your main (also known as "root") dialog.

  • You can send messages and ask questions from these Composer triggers.

  • You can't use the Regular expression recognizer in the main dialog. Using the Regular expression recognizer in the main dialog prevents you from publishing your Composer content to Copilot Studio. However, you can use the Regular expression recognizer in any other Composer dialog.

  • You can add any Composer events and triggers to newly created dialogs.

  • On the Bot Responses page, the Common section should be empty. Using any assets there results in validation errors and prevents you from publishing your Composer content to Copilot Studio.

    Screenshot of the common bot responses section empty.

  • Each Composer dialog has its own bot response (.lg) and language understanding (.lu) resources. For example, a bot that speaks English (US) and has a dialog named dialog1 has one dialog1.en-us.lg file and one dialog1.en-us.lu file.

  • The main dialog in Composer should never be deleted, as it corresponds to your Copilot Studio copilot. The main dialog can have zero or more triggers.

  • You can capture telemetry in Composer dialogs and triggers and use Application Insights to analyze it with Kusto queries for adaptive dialogs. For more information, see Capture telemetry with Application Insights.

For a deep dive on Composer dialogs, events, triggers, and how to create advanced bot content with Bot Framework, refer to the following resources:

References

To learn more about developing in Composer, see these resources:

Get started with Bot Framework Composer