Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Yandex

Scalekit connector
Open markdown

The Yandex connector lets your AI agent act in each user's Yandex account. Each user signs in to Yandex once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 62 tools.

Tools
62
What they doRead · write · destructive
30 · 24 · 830 read24 write8 destructive
Users sign in with
OAuth app
Your own Yandex app

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Yandex connection

    In AgentKit > Connections, create a Yandex connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    Yandex connections use your own OAuth app. Register one with Yandex and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Yandex connection.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'yandex'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Yandex:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'yandex_id_get_user_info',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • yandex_disk_get_infoGet information about the connected user's Yandex Disk.Read-only

    Get Disk Info

    Get information about the connected user's Yandex Disk. Returns total and used space in bytes, trash size, and the system folder paths. Use to check free space before uploading. Use Get Resource to look inside a folder. Requires the cloud_api:disk.info scope.

    Inputs

    This tool takes no inputs.

  • yandex_disk_get_operation_statusCheck the status of a background Yandex Disk operation such as copying, moving, deleting, or uploading from a URL.Read-only

    Get Operation Status

    Check the status of a background Yandex Disk operation such as copying, moving, deleting, or uploading from a URL. Returns an object with status: success, failed, or in-progress. Use after a tool returned an operation link (HTTP 202); pass the ID at the end of that link. Requires cloud_api:disk.read.

    Inputs

    operation_idstringrequired
    ID of the operation, which is the last segment of the operation link returned with HTTP 202. Example: 790f5cb8e4cb8e7dbd8b9a3e5a4b7a2d.
  • yandex_disk_get_public_resourceGet metadata for a published Yandex Disk file or folder using its public key or link, including the first page of a public folder's contents.Read-only

    Get Public Resource

    Get metadata for a published Yandex Disk file or folder using its public key or link, including the first page of a public folder's contents. Returns the resource's name, type, size, MIME type, timestamps, and an embedded item list for folders. Use for links shared by others. Use Get Resource for items on the connected user's own Disk. Works with a valid access token; no Disk scope is needed for public items.

    Inputs

    public_keystringrequired
    Public key or full public link of a published Yandex Disk file or folder. Example: https://disk.yandex.com/d/AbCdEf123 or the key returned by Publish Resource.
    limitinteger
    Maximum number of items to return. Yandex Disk returns 20 when omitted. Example: 50.
    offsetinteger
    Number of items to skip from the start of the list, for pagination. Example: 20.
    pathstring
    Path inside the published folder, relative to its root. Only needed when Public Key points to a folder and you want a resource within it. Example: /photos/cat.png.
    preview_cropboolean
    When true, crops the preview to the size given in Preview Size. Only applies when Preview Size is set. Example: true.
    preview_sizestring
    Size of the file preview image link to include in each item. Use S, M, L, XL, XXL, XXXL, a width such as 120, a height such as x145, or an exact size such as 120x240. Omit for no preview.
    sortstring
    Property to sort a public folder's items by. Allowed: name, path, created, modified, size. Prefix with a hyphen for descending order. Example: -modified.one of namepathcreatedmodifiedsize-name-path-created-modified-size
  • yandex_disk_get_resourceGet metadata for a file or folder on Yandex Disk, including the first page of a folder's contents.Read-only

    Get Resource

    Get metadata for a file or folder on Yandex Disk, including the first page of a folder's contents. Returns the resource's name, path, type (file or dir), size, MIME type, created and modified times, md5, and public URL if published; for a folder, an embedded list of its items. Use to browse a folder or inspect one file. Use List All Files to search every folder by file type, and Get Trash Resource for items in Trash. Requires cloud_api:disk.read or cloud_api:disk.app_folder.

    Inputs

    pathstringrequired
    Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Use / for the Disk root. Example: /Documents.
    fieldsstring
    Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
    limitinteger
    Maximum number of items in a folder to return. Yandex Disk returns 20 when omitted. Example: 50.
    offsetinteger
    Number of items in a folder to skip from the start of the list, for pagination. Example: 20.
    preview_cropboolean
    When true, crops the preview to the size given in Preview Size. Only applies when Preview Size is set. Example: true.
    preview_sizestring
    Size of the file preview image link to include in each item. Use S, M, L, XL, XXL, XXXL, a width such as 120, a height such as x145, or an exact size such as 120x240. Omit for no preview.
    sortstring
    Property to sort a folder's items by. Allowed: name, path, created, modified, size. Prefix with a hyphen for descending order. Example: -modified.one of namepathcreatedmodifiedsize-name-path-created-modified-size
  • yandex_disk_get_trash_resourceList the contents of Yandex Disk Trash or read metadata for one trashed item.Read-only

    Get Trash Resource

    List the contents of Yandex Disk Trash or read metadata for one trashed item. Returns resource metadata with an embedded list of items; each item includes origin_path, the path before it was trashed. Use to find an item before Restore From Trash or Delete From Trash. Use Get Resource for items not in Trash. Requires cloud_api:disk.read.

    Inputs

    pathstringrequired
    Path to the file or folder on Yandex Disk, starting at the Disk root with a slash. Use / for the Trash root. Example: /.
    fieldsstring
    Comma-separated list of response properties to keep; embedded keys use dots. Omit to return the full response. Example: name,_embedded.items.path.
    limitinteger
    Maximum number of items to return. Yandex Disk returns 20 when omitted. Example: 50.
    offsetinteger
    Number of items to skip from the start of the list, for pagination. Example: 20.
    preview_cropboolean
    When true, crops the preview to the size given in Preview Size. Only applies when Preview Size is set. Example: true.
    preview_sizestring
    Size of the file preview image link to include in each item. Use S, M, L, XL, XXL, XXXL, a width such as 120, a height such as x145, or an exact size such as 120x240. Omit for no preview.
    sortstring
    Property to sort Trash items by. Allowed: name, path, created, modified, size. Prefix with a hyphen for descending order. Example: -modified.one of namepathcreatedmodifiedsize-name-path-created-modified-size