[Yandex Cloud documentation](../../../index.md) > [Tutorials](../../index.md) > [Serverless technologies](../index.md) > Integration with Yandex and Yandex Cloud services > [Creating a skill for Alice](index.md) > Management console, CLI, and API

# Creating a skill for Alice using serverless technology via the management console, Yandex Cloud CLI, or API


To create a skill for Alice using serverless technology via the Yandex Cloud management console, CLI, or API:

To add a skill for Alice based on a [function](*functions):

1. [Get your cloud ready](#before-you-begin).
1. [Prepare the skill code](#prepare-code).
1. [Create a function and a function version](#create-function).
1. [Add the function link to the Alice's skill](#add-link).
1. [Test the skill](#test).

If you no longer need the resources you created, [delete](#clear-out) them.

Learn more about developing a skill for Alice [here](https://yandex.ru/dev/dialogs/alice/doc/development-docpage/#test__dev-cycle).

## Getting started {#before-you-begin}

Sign up for Yandex Cloud and create a [billing account](../../../billing/concepts/billing-account.md):
1. Navigate to the [management console](https://console.yandex.cloud) and log in to Yandex Cloud or create a new account.
1. On the **[Yandex Cloud Billing](https://center.yandex.cloud/billing/accounts)** page, make sure you have a billing account linked and it has the `ACTIVE` or `TRIAL_ACTIVE` [status](../../../billing/concepts/billing-account-statuses.md). If you do not have a billing account, [create one](../../../billing/quickstart/index.md) and [link](../../../billing/operations/pin-cloud.md) a cloud to it.

If you have an active billing account, you can create or select a [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) for your infrastructure on the [cloud page](https://console.yandex.cloud/cloud).

[Learn more about clouds and folders here](../../../resource-manager/concepts/resources-hierarchy.md).

## Prepare the code for the Alice's skill {#prepare-code}

To create a function [version](*function_version), you can use one of the [code upload formats](*upload_formats). In this example, we will upload the code to Yandex Cloud Functions as a ZIP archive.

{% list tabs group=programming_language %}

- Python {#python}

    1. Download the [parrot.py](https://github.com/yandex-cloud-examples/yc-serverless-alice-skill/blob/main/parrot.py) example file from the GitHub repo.
    1. Create a ZIP archive named `parrot-py.zip` with the `parrot.py` file.

- Node.js {#node}

    1. Download the [index.js](https://github.com/yandex-cloud-examples/yc-serverless-alice-skill/blob/main/index.js) example file from the GitHub repo.
    1. Create a ZIP archive named `parrot-js.zip` with the `index.js` file.

{% endlist %}

## Create a function and a function version {#create-function}

Once created, the function will contain only information about itself, i.e., its name, description, unique ID, etc. The actual skill code will be added to the function version.

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the [folder](*folder) to create your function in.
  1. Click ![plus](../../../_assets/console-icons/plus.svg) **Create resource** and select ![curly-brackets-function](../../../_assets/console-icons/curly-brackets-function.svg) **Function**.
  1. Give the function a [name](*naming), e.g., `my-parrot-function`.
  1. Click **Create**.
  1. Create a function version:

      {% list tabs group=programming_language %}

      - Python {#python}

        1. From the list of programming languages, select `Python 3.12`.
        1. Disable **Add files with code examples** and click **Continue**.
        1. Prepare the function code:

            * In the **Code source** field, select `ZIP archive` and attach the `parrot-py.zip` archive you created earlier.
            * In the **Entry point** field, specify `parrot.handler`.
        1. Configure the version:

            * **Timeout**: `2`.
            * **Memory**: `128 MB`.
            * Leave the other settings at their defaults.
        1. Click **Save changes**.

      - Node.js {#node}

        1. In the list of programming languages, select `Node.js 18`.
        1. Disable **Add files with code examples** and click **Continue**.
        1. Prepare the function code:

            * In the **Code source** field, select `ZIP archive` and attach the `parrot-js.zip` archive you created earlier.
            * In the **Entry point** field, specify `index.handler`.
        1. Configure the version:

            * **Timeout**: `2`.
            * **Memory**: `128 MB`.
            * Leave the other settings at their defaults.
        1. Click **Save changes**.

      {% endlist %}

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. To create a function, run this command:

      ```bash
      yc serverless function create \
        --name my-parrot-function
      ```

      Result:

      ```text
      id: d4el0mi6ps6s********
      folder_id: b1g5bhjofg7o********
      created_at: "2026-06-15T08:16:02.695Z"
      name: my-parrot-function
      http_invoke_url: https://functions.yandexcloud.net/d4el0mi6ps6s********
      status: ACTIVE
      ```

  1. To create a function version, run this command:

      {% list tabs group=programming_language %}

      - Python {#python}

        ```
        yc serverless function version create \
          --function-name my-parrot-function \
          --runtime python312 \
          --entrypoint index.handler \
          --memory 128m \
          --execution-timeout 5s \
          --source-path ./parrot-py.zip
        ```

        Result:

        ```text
        done (2s)
        id: d4easr8ok281********
        function_id: d4el0mi6ps6s********
        created_at: "2026-06-15T08:42:20.771Z"
        runtime: python312
        entrypoint: index.handler
        resources:
          memory: "134217728"
        execution_timeout: 5s
        image_size: "4096"
        status: ACTIVE
        tags:
          - $latest
        concurrency: "1"
        log_options:
          folder_id: b1g5bhjofg7o********
        ```

      - Node.js {#node}

        ```
        yc serverless function version create \
          --function-name my-parrot-function \
          --runtime nodejs18 \
          --entrypoint index.handler \
          --memory 128m \
          --execution-timeout 5s \
          --source-path ./parrot-js.zip
        ```

        Result:

        ```text
        done (2s)
        id: d4etv45m1vor********
        function_id: d4el0mi6ps6s********
        created_at: "2026-06-15T08:45:25.313Z"
        runtime: nodejs18
        entrypoint: index.handler
        resources:
          memory: "134217728"
        execution_timeout: 5s
        image_size: "4096"
        status: ACTIVE
        tags:
          - $latest
        concurrency: "1"
        log_options:
          folder_id: b1g5bhjofg7o********
        ```

      {% endlist %}

- API {#api}

  To create a function, use the [create](../../../functions/functions/api-ref/Function/create.md) REST API method for the [Function](../../../functions/functions/api-ref/Function/index.md) resource or the [FunctionService/Create](../../../functions/functions/api-ref/grpc/Function/create.md) gRPC API call.

  To create a function version, use the [createVersion](../../../functions/functions/api-ref/Function/createVersion.md) REST API method for the [Function](../../../functions/functions/api-ref/Function/index.md) resource or the [FunctionService/CreateVersion](../../../functions/functions/api-ref/grpc/Function/createVersion.md) gRPC API call.

{% endlist %}

## Add the function link to the Alice's skill {#add-link}

{% list tabs %}

- Yandex Dialogs UI

  1. Go to the Alice skill page in your [dashboard.](https://dialogs.yandex.ru/developer/)
  1. Click ![circle-plus](../../../_assets/console-icons/circle-plus.svg) **Skill for Alice** and do the following in the window that opens:

      1. In the **Skill name** field, specify a unique name for the skill you are creating.
      1. In the **Backend** field, select **Function in Yandex Cloud**. Select the function you created earlier from the drop-down list.

          {% note warning %}

          The list shows the functions that you are allowed to view. To attach a function to a skill, you need permission to invoke the function. This permission comes with the [functions.functionInvoker](*functions_invoker) role or higher.

          {% endnote %}

      1. Leave all the other parameter values unchanged and click **Save** at the top of the page.

{% endlist %}

[*functions_invoker]: The `functions.functionInvoker` role allows you to invoke functions. For more information on access management in Yandex Cloud, see [this guide](../../../iam/concepts/access-control/index.md).

## Test the skill {#test}

{% list tabs %}

- Yandex Dialogs interface

  1. In your Yandex Dialogs [account](https://dialogs.yandex.ru/developer/), select **Testing** in the left-hand menu on the page with the skill you created earlier.
  1. If everything is set up correctly, the **Chat** section will display a message inviting you to start a conversation: `Hello! I'll repeat anything you say to me.`.
  1. Send a message with any text and make sure the response contains the same text.

{% endlist %}

## How to delete the resources you created {#clear-out}

To stop the skill, [delete](../../../functions/operations/function/function-delete.md) the function.

[*functions]: With Yandex Cloud Functions functions, you can place your code in Yandex Cloud and run on request or trigger. For more information, see [Function](../../../functions/concepts/function.md).

[*folder]: A folder is a logical space where you create and group your Yandex Cloud resources. Just like folders in your file system, Yandex Cloud folders make resource management simpler. For more information, see [Folder](../../../resource-manager/concepts/resources-hierarchy.md#folder).

[*naming]: The naming requirements are as follows:
* It must be between 3 and 63 characters in length.
* It can only contain lowercase Latin letters, numbers, and hyphens.
* It must start with a letter and cannot end with a hyphen.

[*function_version]: A version contain the function code, execution parameters, as well as all required dependencies. You can use different versions of the same function at different development stages. For more information, see [Function versions](../../../functions/concepts/function.md#version).

[*upload_formats]: There are several ways to upload a function version code: in the editor in the management console, from local files and directories, or as an archive. For more information, see [Code upload format](../../../functions/concepts/function.md#upload).

#### Useful links {#see-also}

* [Creating a skill for Alice using Terraform](terraform.md)