Del via


How to publish a skill to Azure from Composer

APPLIES TO: Composer v1.x and v2.x

Composer lets you export a bot as a skill, which allows it to provide conversational logic to other bots. For example, the Enterprise Assistant Bot template uses a root bot connected to multiple skills. This article describes how to publish a skill as an Azure Web App.

As part of this process:

  • Composer publishes your bot to Azure, along with a skill manifest. The manifest allows your bot to be used as a skill.
  • You can update your bot's allowed callers list, the app IDs of bots that are allowed to use your bot as a skill.

You can use the steps in this article to publish any existing bot as a skill.

Prerequisites

Create a local skill or start with an existing bot

If you don't have a local skill to publish, use the instructions in how to Create and test a local skill to create one.

Generate a skill manifest and publish your skill

Export your skill

  1. Open the project that contains the bot to publish as a skill.

  2. Go to the Create page.

  3. In the bot explorer

    1. To the right of your skill bot, select more options (...).

    2. Then, select Export as a skill from the menu.

      Create a skill manifest.

  4. On the Export your skill page:

    1. Describe your skill. Composer will add this information when it creates your skill's manifest.

      Category Type Required Description
      Manifest Version String Required The skill manifest schema version to use.
      Name String Required The name of the skill.
      Version String Required The version of the skill the manifest describes.
      Publisher Name String Required The name of the skill publisher.
      Description String Optional A human-readable description of the skill.
      Privacy Url String Optional The URI of the privacy description for the skill.
      Copyright String Optional The copyright notice for the skill.
      License String Optional The license agreement for the skill.
      Icon Url String Optional The URL of the icon to show for the skill.
      Tags String Optional A set of tags for the skill. If present, each tag must be unique.

      Tip

      For tables describing the full schema of the Bot Framework skill manifest, read How to write a skill manifest in the Bot Framework SDK documentation.

    2. Select Next.

  5. On the Select dialogs page, select the dialogs that will be accessible to consumer bots—For the EchoSkill bot, this is the EchoSkill dialog.

    • Select Next.
  6. On the Select triggers page, select the triggers to include that can start a task.

    • Don't select any of the triggers. Your skill is expecting an event activity named "startSkill" as the initial activity sent by a root bot to the skill. By default, all new skill manifests include an event activity as an initial activity. However, you'll later need to edit the manifest and republish the skill.
    • Select Next.
  7. On the Which bots can connect to this skill? page, select Next.

    • Don't add allowed callers at this time. It's not needed for this article. You can add allowed callers and republish the skill later.
    • To restrict callers to specific bots, you would add the app ID of each allowed caller.
  8. If you already have a publishing profile for this bot, Composer will use that.

    • If the skill doesn't have a publishing profile yet, Composer displays the Create a publish profile to continue page and prompts you to create a new publishing profile.
      1. Select Create new publish profile to continue.

      2. Follow the instructions and create the publishing profile. Composer will provision resources for your skill bot. For detailed instructions, see how to Publish a bot.

        • Publish to Azure.
        • Create new resources.
        • No optional resources are required for the echo skill.
      3. Composer then provisions and publishes your skill to Azure, which can take a minute or two.

      4. When it completes, it displays a notification that your skill is ready to be shared.

      5. Copy the skill manifest URL. You use the skill manifest URL to connect a consumer bot to the deployed skill.

        Copy the skill manifest URL.

Edit the skill manifest and republish

The skill manifest describes the capabilities of the skill. The skill manifest is located in the skill's project folder, in the manifests subdirectory. This directory also contains a language model (.lu) file for the skill. The language model for this echo skill will be empty.

  1. Edit the skill manifest locally, outside of Composer.

    1. Review the endpoints array.
    2. In the manifest, change activities.EchoSkill.name from EchoSkill to startSkill, the name of the event that the echo skill is designed to receive.
    3. Make any other changes to the manifest that you want to make.
    4. Save your changes.
  2. Back in Composer, go to the Publish view and republish the echo skill from its profile.

  3. Once Composer finishes, open the skill's manifest URL to verify that the correct manifest was published.

    The manifest should look something like:

    {
      "$schema": "https://schemas.botframework.com/schemas/skills/v2.2/skill-manifest.json",
      "$id": "<the-ID-for-your-skill-manifest>",
      "endpoints": [
        {
          "protocol": "BotFrameworkV3",
          "name": "<unique-name-for-this-endpoint>",
          "endpointUrl": "<the-uri-endpoint-for-your-skill>",
          "description": "<a-description-of-this-endpoint>",
          "msAppId": "<ms-appID for-your-skill>"
        }
      ],
      "name": "<the-name-of-your-skill>",
      "version": "<the-version-of-your-skill-the-manifest-describes>",
      "publisherName": "<the-name-of-the-skill-publisher>",
      "description": "<a-description-of-the-skill>",
      "activities": {
        "EchoSkill": {
          "type": "event",
          "name": "startSkill"
        }
      }
    }
    

Now your remote skill is ready!

You can test your skill as a root bot directly in Azure. To do so, use Azure's Test in Web Chat feature. Since you're accessing the bot directly, it behaves as a root bot, and doesn't behave like a skill.

Additional information

A skill's manifest can include dispatch and language model information. This information describes the intents and questions the skill is designed to respond to. It can also provide language models for multiple locales.

  • When you publish your skill, Composer can add dispatch and language model information to the skill's manifest. It uses the language models from the skill bot to do so.
  • When you create a bot that consumes a skill, Composer can use the skill's manifest to generate triggers in the root bot to invoke the skill.

For more information, see About skills in Composer and reuse of conversation logic between bots.

Next steps