Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Control D

Scalekit connector
Open markdown

The Control D connector lets your AI agent act in each user's Control D account. Each user connects their own Control D access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 46 tools.

Tools
46
What they doRead · write · destructive
22 · 17 · 722 read17 write7 destructive
Users sign in with

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 Control D connection

    In AgentKit > Connections, create a Control D connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. 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 = 'controld'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Control D:', 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: 'controld_account_get',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Control D credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • controld_account_getGet the Control D account the API token belongs to.Read-only

    Get Account

    Get the Control D account the API token belongs to. Returns the user's ID, email, plan, status and settings. Run it first to confirm the connection.

    Inputs

    This tool takes no inputs.

  • controld_analytics_levels_listList the analytics (logging) levels an endpoint can use.Read-only

    List Analytics Levels

    List the analytics (logging) levels an endpoint can use. Returns each level's ID and title.

    Inputs

    This tool takes no inputs.

  • controld_analytics_regions_listList the storage regions for analytics logs.Read-only

    List Analytics Storage Regions

    List the storage regions for analytics logs. Returns each region's ID (PK), title and country.

    Inputs

    This tool takes no inputs.

  • controld_device_ips_listList the IP addresses learned or authorized for an endpoint.Read-only

    List Endpoint IPs

    List the IP addresses learned or authorized for an endpoint. Returns each IP with its location, ISP and last-seen time.

    Inputs

    device_idstringrequired
    ID (PK) of the endpoint (device or resolver). Get it from controld_devices_list. Example: abcd1234efgh.
  • controld_device_types_listList endpoint types and icons, such as desktop-windows, mobile-ios or router.Read-only

    List Endpoint Types

    List endpoint types and icons, such as desktop-windows, mobile-ios or router. Returns each type's icon ID and name. Use the icon IDs with controld_device_create.

    Inputs

    This tool takes no inputs.

  • controld_devices_listList endpoints (devices and resolvers) in the account.Read-only

    List Endpoints

    List endpoints (devices and resolvers) in the account. Returns each endpoint's ID, name, type, status, profiles, DNS resolver addresses and settings.

    Inputs

    This tool takes no inputs.

  • controld_internal_domains_listList internal domain entries, which send matching queries to your own resolvers or the OS resolver.Read-only

    List Internal Domains

    List internal domain entries, which send matching queries to your own resolvers or the OS resolver. Returns each entry's ID, domain, mode, resolvers and comment.

    Inputs

    x_force_org_idstring
    Sub-organization ID to act in, for parent organization accounts. Example: org_12345.
  • controld_ip_getGet the public IP address and data center the API sees for the caller.Read-only

    Get Caller IP

    Get the public IP address and data center the API sees for the caller. Returns the IP, its type and the Control D PoP that answered.

    Inputs

    This tool takes no inputs.