Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to AnyDB

Scalekit connector
Open markdown

The AnyDB connector lets your AI agent act in each user's AnyDB account. Each user connects their own AnyDB API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 18 tools.

Tools
18
What they doRead · write · destructive
7 · 8 · 37 read8 write3 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 AnyDB connection

    In AgentKit > Connections, create an AnyDB 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 = 'anydb'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize AnyDB:', 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: 'anydb_auth_check',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their AnyDB 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
  • anydb_auth_checkCheck that the connected AnyDB API key and email are valid.Read-only

    Check Authentication

    Check that the connected AnyDB API key and email are valid. Returns the authentication result. Use this to test the connection.

    Inputs

    This tool takes no inputs.

  • anydb_databases_listList the databases in an AnyDB team.Read-only

    List Databases

    List the databases in an AnyDB team. Returns databases with their IDs (adbid) and names. Use this to get an adbid for the record tools.

    Inputs

    teamidstringrequired
    Team ID, from anydb_teams_list. Example: 507f1f77bcf86cd799439011.
  • anydb_file_download_url_getGet a temporary download or preview URL for a file stored in a record cell.Read-only

    Get File Download URL

    Get a temporary download or preview URL for a file stored in a record cell. Returns the file URL. Use anydb_record_get to find the record and cell position of the file.

    Inputs

    adbidstringrequired
    Database ID, from anydb_databases_list. Example: 507f1f77bcf86cd799439012.
    adoidstringrequired
    Record ID, from anydb_records_list or anydb_records_search. Example: 507f1f77bcf86cd799439013.
    cellposstringrequired
    Cell position where the file is stored. Example: A1.
    teamidstringrequired
    Team ID, from anydb_teams_list. Example: 507f1f77bcf86cd799439011.
    previewboolean
    Set true for a preview URL instead of a download URL. Example: false.
  • anydb_record_getGet one AnyDB record with all its data.Read-only

    Get Record

    Get one AnyDB record with all its data. Returns meta (adoid, adbid, teamid, name, description, status, assignees) and content cells keyed by position with key, type and value. Use anydb_records_list or anydb_records_search to find record IDs.

    Inputs

    adbidstringrequired
    Database ID, from anydb_databases_list. Example: 507f1f77bcf86cd799439012.
    adoidstringrequired
    Record ID, from anydb_records_list or anydb_records_search. Example: 507f1f77bcf86cd799439013.
    teamidstringrequired
    Team ID, from anydb_teams_list. Example: 507f1f77bcf86cd799439011.
  • anydb_records_listList the records in an AnyDB database, optionally under one parent, of one template, filtered, sorted or grouped.Read-only

    List Records

    List the records in an AnyDB database, optionally under one parent, of one template, filtered, sorted or grouped. Returns items with record meta and preview cells, total, hasmore and lastmarker for the next page. Use this to browse. Use anydb_records_search for a keyword search, or anydb_record_get for one record's full content.

    Inputs

    adbidstringrequired
    Database ID, from anydb_databases_list. Example: 507f1f77bcf86cd799439012.
    teamidstringrequired
    Team ID, from anydb_teams_list. Example: 507f1f77bcf86cd799439011.
    filterstring
    Filter as a JSON string. Example: {"Status": "Active"}
    groupbystring
    Field to group results by. Example: Status.
    lastmarkerstring
    The lastmarker from the previous page, to get the next page. Example: 507f1f77bcf86cd799439099.
    pagesizeinteger
    Records per page. Defaults to 50. Example: 50.
    parentidstring
    Only records attached under this parent record ID (such as a folder). Example: 507f1f77bcf86cd799439014.
    previewcellsstring
    Which cells to include in each item's preview, as a JSON string. Example: ["A1", "B1"]
    sortstring
    Sort order as a JSON string. Example: {"field": "name", "order": "asc"}
    templateidstring
    Only records created from this template ID. Example: 507f1f77bcf86cd799439015.
    templatenamestring
    Only records of this template (type) name. Example: Project.
  • anydb_teams_listList the AnyDB teams the connected user belongs to.Read-only

    List Teams

    List the AnyDB teams the connected user belongs to. Returns teams with their IDs and names. Use this first to get a teamid.

    Inputs

    This tool takes no inputs.

  • anydb_record_copyDuplicate an AnyDB record, optionally into another database or under another parent.Write

    Duplicate Record

    Duplicate an AnyDB record, optionally into another database or under another parent. Returns the new record. Choose how attachments are copied with attachments_mode.

    Inputs

    adbidstringrequired
    Database ID, from anydb_databases_list. Example: 507f1f77bcf86cd799439012.
    adoidstringrequired
    Record ID, from anydb_records_list or anydb_records_search. Example: 507f1f77bcf86cd799439013.
    teamidstringrequired
    Team ID, from anydb_teams_list. Example: 507f1f77bcf86cd799439011.
    attachmentsmodestring
    How to handle attachments: noattachments, link (share the same files) or duplicate (copy files). Example: link.one of noattachmentslinkduplicate
    attachtostring
    Parent record ID to attach the copy under. Example: 507f1f77bcf86cd799439014.
    dstadbidstring
    Database ID to copy into. Defaults to the same database. Example: 507f1f77bcf86cd799439017.