> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to dbt

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

**Authentication:** Bearer Token
**Categories:** Developer Tools, Databases
**Tools:** 22: 17 read, 3 write, 2 destructive
**Users sign in with:** Access token
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=DBTCLOUD)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the dbt connection

   In **AgentKit > Connections**, create a dbt connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   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 = 'dbtcloud'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize dbt:', 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: 'dbtcloud_accounts_list',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "dbtcloud"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize dbt:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="dbtcloud_accounts_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their dbt credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'dbtcloud_account_get',
  toolInput: {
    account_id: 12345,
  },
  connector: 'dbtcloud',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="dbtcloud_account_get",
    tool_input={
        "account_id": 12345,
    },
    connection_name="dbtcloud",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `dbtcloud_account_get`

Get Account · Read-only

Get one dbt account by ID.
Returns its name, plan, state, run_slots, developer seat counts and settings.
Use this to check an account's plan and limits. Use dbtcloud_accounts_list to find account IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345

Example input: `{"account_id":12345}`

### `dbtcloud_accounts_list`

List Accounts · Read-only

List the dbt accounts the token can access.
Returns each account's id, name, plan, state and run_slots.
Use this to find the account_id every other dbt tool needs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `dbtcloud_environment_get`

Get Environment · Read-only

Get one dbt environment by ID.
Returns its name, type, deployment_type, dbt_version, custom_branch and credentials reference.
Use this when you know the environment_id. Use dbtcloud_environments_list to browse.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `environment_id` (`integer`, required): ID of the environment. Example: 218762
- `project_id` (`integer`, required): ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542

Example input: `{"account_id":12345,"environment_id":218762,"project_id":270542}`

### `dbtcloud_environment_variables_list`

List Environment Variables · Read-only

List the environment variables of a dbt project with their value in each environment.
Returns each variable name with its project default and per-environment values; secret values are masked.
Use this to see how a project is configured across environments.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `project_id` (`integer`, required): ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542

Example input: `{"account_id":12345,"project_id":270542}`

### `dbtcloud_environments_list`

List Environments · Read-only

List the environments of a dbt project.
Returns each environment's id, name, type (development or deployment), deployment_type (production or staging), dbt_version and custom_branch.
Use this to find an environment_id for filtering jobs and runs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `project_id` (`integer`, required): ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542
- `deployment_type` (`string`, optional): Only environments of this deployment type: production or staging. Example: production. One of: `production`, `staging`.
- `limit` (`integer`, optional): Maximum number of environments to return, up to 100. Example: 25
- `offset` (`integer`, optional): Number of environments to skip, for paging. Example: 25

Example input: `{"account_id":12345,"project_id":270542}`

### `dbtcloud_job_get`

Get Job · Read-only

Get one dbt job by ID.
Returns its name, environment, execute_steps (dbt commands), triggers, schedule, settings and the most recent runs when requested.
Use this to inspect a job before running it.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `job_id` (`integer`, required): ID of the job. Get it from dbtcloud_jobs_list. Example: 43167
- `include_related` (`string`, optional): Related objects to include, comma-separated: most_recent_run, most_recent_completed_run. Example: most_recent_run

Example input: `{"account_id":12345,"job_id":43167}`

### `dbtcloud_jobs_list`

List Jobs · Read-only

List the jobs in a dbt account, optionally for one project or environment.
Returns each job's id, name, project_id, environment_id, execute_steps, triggers, schedule and state.
Use this to find a job_id before dbtcloud_job_run. Use dbtcloud_job_get for one job.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `environment_id` (`integer`, optional): Only jobs in this environment. Example: 218762
- `limit` (`integer`, optional): Maximum number of jobs to return, up to 100. Example: 25
- `name_contains` (`string`, optional): Only jobs whose name contains this text (case-insensitive). Example: nightly
- `offset` (`integer`, optional): Number of jobs to skip, for paging. Example: 25
- `order_by` (`string`, optional): Field to sort by; prefix with - for descending. Example: -id
- `project_id` (`integer`, optional): Only jobs in this project. Example: 270542

Example input: `{"account_id":12345}`

### `dbtcloud_project_get`

Get Project · Read-only

Get one dbt project by ID.
Returns its name, description, connection, repository, environments and dbt_project_subdirectory.
Use this when you know the project_id. Use dbtcloud_projects_list to browse.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `project_id` (`integer`, required): ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542

Example input: `{"account_id":12345,"project_id":270542}`

### `dbtcloud_projects_list`

List Projects · Read-only

List the projects in a dbt account.
Returns each project's id, name, connection, repository, dbt_project_subdirectory and state.
Use this to find a project_id. Use dbtcloud_project_get for one project.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `limit` (`integer`, optional): Maximum number of projects to return, up to 100. Example: 25
- `name_contains` (`string`, optional): Only projects whose name contains this text (case-insensitive). Example: analytics
- `offset` (`integer`, optional): Number of projects to skip, for paging. Example: 25

Example input: `{"account_id":12345}`

### `dbtcloud_repositories_list`

List Repositories · Read-only

List the Git repositories connected to a dbt project.
Returns each repository's id, remote_url, git_clone_strategy and state.
Use this to see which repository a project builds from.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `project_id` (`integer`, required): ID of the dbt project. Get it from dbtcloud_projects_list. Example: 270542
- `limit` (`integer`, optional): Maximum number of repositories to return, up to 100. Example: 25
- `offset` (`integer`, optional): Number of repositories to skip, for paging. Example: 25

Example input: `{"account_id":12345,"project_id":270542}`

### `dbtcloud_run_artifact_get`

Get Run Artifact · Read-only

Download one artifact file from a dbt run, such as run_results.json or manifest.json.
Returns the file content; JSON artifacts come back as JSON text.
Use this to read test results or model metadata. manifest.json can be many megabytes; prefer run_results.json for results.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `path` (`string`, required): Artifact path from dbtcloud_run_artifacts_list. Example: run_results.json
- `run_id` (`integer`, required): ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265
- `step` (`integer`, optional): Step index to read the artifact from; defaults to the last step. Example: 2

Example input: `{"account_id":12345,"path":"<path>","run_id":314159265}`

### `dbtcloud_run_artifacts_list`

List Run Artifacts · Read-only

List the artifact files a dbt run produced.
Returns file paths such as manifest.json, run_results.json, catalog.json and sources.json.
Use this to see what dbtcloud_run_artifact_get can download.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `run_id` (`integer`, required): ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265

Example input: `{"account_id":12345,"run_id":314159265}`

### `dbtcloud_run_get`

Get Run · Read-only

Get one dbt job run by ID.
Returns its status, status_humanized, job, trigger, git details, timing, and with include_related=run_steps each step's command, status and logs.
Use this to follow or debug a run. Use dbtcloud_run_artifact_get for manifest.json or run_results.json.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `run_id` (`integer`, required): ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265
- `include_related` (`string`, optional): Related objects to include, comma-separated: trigger, job, run_steps, debug_logs. Example: run_steps,job

Example input: `{"account_id":12345,"run_id":314159265}`

### `dbtcloud_runs_list`

List Runs · Read-only

List job runs in a dbt account, newest first by default, optionally for one job, project or environment, or by status.
Returns each run's id, job_definition_id, status (1 queued, 2 starting, 3 running, 10 success, 20 error, 30 cancelled), status_humanized, git_branch, created_at, finished_at and duration.
Use this to check recent runs. Use dbtcloud_run_get for one run's steps.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `environment_id` (`integer`, optional): Only runs in this environment. Example: 218762
- `job_definition_id` (`integer`, optional): Only runs of this job. Example: 43167
- `limit` (`integer`, optional): Maximum number of runs to return, up to 100. Example: 25
- `offset` (`integer`, optional): Number of runs to skip, for paging. Example: 25
- `order_by` (`string`, optional): Sort field: id, created_at or finished_at; prefix with - for descending. Defaults to -id. Example: -created_at. Default: `-id`.
- `project_id` (`integer`, optional): Only runs in this project. Example: 270542
- `status` (`integer`, optional): Only runs with this status: 1 queued, 2 starting, 3 running, 10 success, 20 error, 30 cancelled. Example: 20. One of: `1`, `2`, `3`, `10`, `20`, `30`.

Example input: `{"account_id":12345}`

### `dbtcloud_users_list`

List Users · Read-only

List the users in a dbt account.
Returns each user's id, first_name, last_name, email, license type and permissions.
Use this to find who has access to an account.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `license_type` (`string`, optional): Only users with this license: analyst, developer, it or read_only. Example: developer. One of: `analyst`, `developer`, `it`, `read_only`.
- `limit` (`integer`, optional): Maximum number of users to return, up to 100. Example: 25
- `offset` (`integer`, optional): Number of users to skip, for paging. Example: 25
- `search` (`string`, optional): Only users whose name or email matches this text. Example: alex

Example input: `{"account_id":12345}`

### `dbtcloud_webhook_get`

Get Webhook · Read-only

Get one dbt webhook subscription by ID.
Returns its name, client_url, event_types, job_ids, active flag and delivery status.
Use this when you know the webhook ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `subscription_id` (`string`, required): ID of the webhook subscription. Example: wsu_12345abcde

Example input: `{"account_id":12345,"subscription_id":"<subscription_id>"}`

### `dbtcloud_webhooks_list`

List Webhooks · Read-only

List the webhook subscriptions of a dbt account.
Returns each webhook's id, name, client_url, event_types, job_ids, active flag and last http_status_code.
Use this to see where run events are sent.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `limit` (`integer`, optional): Maximum number of webhooks to return, up to 100. Example: 25
- `offset` (`integer`, optional): Number of webhooks to skip, for paging. Example: 25

Example input: `{"account_id":12345}`

### `dbtcloud_job_run`

Run Job · Write

Trigger a run of a dbt job, optionally on a different branch or with overridden dbt commands.
Returns the new run with its id and status (1 queued).
Use this to start a job. Use dbtcloud_run_get to follow the run and dbtcloud_run_cancel to stop it.
Uses a run slot and warehouse compute.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `cause` (`string`, required): Short reason for the run, shown in dbt. Example: Triggered by agent after source refresh
- `job_id` (`integer`, required): ID of the job. Get it from dbtcloud_jobs_list. Example: 43167
- `generate_docs_override` (`boolean`, optional): Whether to run dbt docs generate. Example: true
- `git_branch` (`string`, optional): Git branch to check out instead of the environment's branch. Example: feature/new-model
- `git_sha` (`string`, optional): Git commit SHA to check out. Example: 9a8b7c6d
- `schema_override` (`string`, optional): Destination schema to use instead of the target's. Example: dbt_ci_1234
- `steps_override` (`array`, optional): dbt commands to run instead of the job's steps. Example: ["dbt build --select my_model+"]
- `target_name_override` (`string`, optional): Value for target.name. Example: ci
- `threads_override` (`integer`, optional): Number of threads to use. Example: 8
- `timeout_seconds_override` (`integer`, optional): Run timeout in seconds. Example: 3600

Example input: `{"account_id":12345,"cause":"<cause>","job_id":43167}`

### `dbtcloud_run_retry`

Retry Failed Run · Write

Retry a failed dbt job run from the point of failure.
Returns the new run.
Use this after a run errors. Use dbtcloud_job_run to start the whole job again.
Uses a run slot and warehouse compute.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `run_id` (`integer`, required): ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265

Example input: `{"account_id":12345,"run_id":314159265}`

### `dbtcloud_webhook_create`

Create Webhook · Write

Create a webhook that posts dbt job run events to a URL.
Returns the new webhook, including its hmac_secret for verifying deliveries.
Use this to get notified when runs start, finish or fail.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `client_url` (`string`, required): HTTPS URL the events are posted to. Example: https://hooks.example.com/dbt
- `event_types` (`array`, required): Events to send: job.run.started, job.run.completed and/or job.run.errored. Example: ["job.run.completed", "job.run.errored"]
- `name` (`string`, required): Name of the webhook. Example: Slack run alerts
- `active` (`boolean`, optional): Whether the webhook starts active. Defaults to true. Example: true. Default: `true`.
- `description` (`string`, optional): Description of the webhook. Example: Alerts for production jobs
- `job_ids` (`array`, optional): Only send events for these job IDs; leave empty for all jobs. Example: [43167]

Example input: `{"account_id":12345,"client_url":"<client_url>","event_types":["job.run.completed","job.run.errored"],"name":"<name>"}`

### `dbtcloud_run_cancel`

Cancel Run · Destructive

Cancel a queued or running dbt job run.
Returns the run with its updated status.
Use this to stop a run. Use dbtcloud_run_retry to rerun a failed run.

Read only: no. Destructive: yes. Idempotent (safe to retry): no.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `run_id` (`integer`, required): ID of the job run. Get it from dbtcloud_runs_list or the response of dbtcloud_job_run. Example: 314159265

Example input: `{"account_id":12345,"run_id":314159265}`

### `dbtcloud_webhook_delete`

Delete Webhook · Destructive

Delete a dbt webhook subscription.
Returns a confirmation.
Use this to stop sending run events to a URL.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `account_id` (`integer`, required): Your dbt account ID: the number after /accounts/ in your dbt URL, or from dbtcloud_accounts_list. Example: 12345
- `subscription_id` (`string`, required): ID of the webhook subscription. Example: wsu_12345abcde

Example input: `{"account_id":12345,"subscription_id":"<subscription_id>"}`

## Related

Other Developer Tools connectors ([all 200](/agentkit/connectors/?category=developer-tools)):

- [GitHub](/agentkit/connectors/github/): Scalekit connector, OAuth, 217 tools
- [Datadog](/agentkit/connectors/datadog/): Scalekit connector, API key, 105 tools
- [Linear](/agentkit/connectors/linear/): Scalekit connector, OAuth, 64 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
