> **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 Cursor

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

**Authentication:** Bearer Token
**Categories:** Developer Tools, AI
**Tools:** 24: 19 read, 5 write, 0 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=CURSOR)

## 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 Cursor connection

   In **AgentKit > Connections**, create a Cursor 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 = 'cursor'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Cursor:', 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: 'cursor_agents_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 = "cursor"
   identifier = "user_123"

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

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

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Cursor 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: 'cursor_agent_get',
  toolInput: {
    agent_id: '<agent_id>',
  },
  connector: 'cursor',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="cursor_agent_get",
    tool_input={
        "agent_id": "<agent_id>",
    },
    connection_name="cursor",
    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.

### `cursor_agent_get`

Get Agent · Read-only

Get one Cursor Cloud Agent by ID.
Returns the agent's id, name, status (ACTIVE or ARCHIVED), env, dashboard url, latestRunId, repos, and branch and pull request settings.
Use this for an agent's configuration. Use cursor_run_get for the status and result of its work, which live on runs.

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

Inputs:

- `agent_id` (`string`, required): ID of the Cloud Agent, in bc-<uuid> form. Get it from cursor_agents_list or from the agent object that cursor_agent_create returns. Example: bc-00000000-0000-0000-0000-000000000001

Example input: `{"agent_id":"<agent_id>"}`

### `cursor_agent_usage_get`

Get Agent Usage · Read-only

Get token usage for a Cursor Cloud Agent, in total and per run, or for one run only.
Returns totalUsage and a runs list, each with input, output, cache-write, cache-read and total token counts.
Use this to report what an agent consumed. This endpoint is in early access; accounts without it get 403 feature_unavailable.

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

Inputs:

- `agent_id` (`string`, required): ID of the Cloud Agent, in bc-<uuid> form. Get it from cursor_agents_list or from the agent object that cursor_agent_create returns. Example: bc-00000000-0000-0000-0000-000000000001
- `run_id` (`string`, optional): Optional run ID, in run-<uuid> form, to scope usage to a single run. Omit it to get usage for every run on the agent. An unknown run ID returns 404 run_not_found. Example: run-00000000-0000-0000-0000-000000000001

Example input: `{"agent_id":"<agent_id>"}`

### `cursor_agents_list`

List Agents · Read-only

List the Cursor Cloud Agents owned by the API key's user, newest first, optionally filtered to one GitHub pull request.
Returns a page of agents (id, name, status ACTIVE or ARCHIVED, env, url, latestRunId, timestamps) and a nextCursor for the next page.
Use this to find an agent ID. Use cursor_agent_get for one agent's repos and PR settings, and cursor_runs_list for its runs.

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

Inputs:

- `cursor` (`string`, optional): Pagination cursor. Pass the nextCursor value from the previous response to fetch the next page; omit it for the first page. A null nextCursor means there are no more pages. Example: eyJvZmZzZXQiOjIwfQ
- `include_archived` (`boolean`, optional): Whether to include archived agents in the results. Defaults to true. Example: false. Default: `true`.
- `limit` (`integer`, optional): Maximum number of agents to return in one page, from 1 to 100. Defaults to 20. Example: 10. Default: `20`.
- `pr_url` (`string`, optional): Only return agents working on this GitHub pull request URL. Example: https://github.com/your-org/your-repo/pull/123

Example input: `{}`

### `cursor_artifact_download_url_get`

Get Artifact Download URL · Read-only

Get a temporary download link for one file a Cursor Cloud Agent produced.
Returns a presigned url that stays valid for 15 minutes and its expiresAt time; it does not return the file contents.
Use this after cursor_artifacts_list, passing an artifact path it returned.

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

Inputs:

- `agent_id` (`string`, required): ID of the Cloud Agent, in bc-<uuid> form. Get it from cursor_agents_list or from the agent object that cursor_agent_create returns. Example: bc-00000000-0000-0000-0000-000000000001
- `path` (`string`, required): Path of the artifact relative to the workspace's artifacts/ directory, exactly as returned in the path field of cursor_artifacts_list. Example: artifacts/screenshot.png

Example input: `{"agent_id":"<agent_id>","path":"<path>"}`

### `cursor_artifacts_list`

List Artifacts · Read-only

List the files a Cursor Cloud Agent saved to its workspace's artifacts/ directory, such as screenshots, logs or reports.
Returns each artifact's path (relative to artifacts/), sizeBytes, and updatedAt.
Use this to find an artifact path, then call cursor_artifact_download_url_get to get a link to the file.

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

Inputs:

- `agent_id` (`string`, required): ID of the Cloud Agent, in bc-<uuid> form. Get it from cursor_agents_list or from the agent object that cursor_agent_create returns. Example: bc-00000000-0000-0000-0000-000000000001

Example input: `{"agent_id":"<agent_id>"}`

### `cursor_environment_active_build_get`

Get Active Environment Build · Read-only

Get what a new agent started on a saved Cursor cloud agent environment boots from: one of the environment's builds or Cursor's default image.
Returns type 'build' with the buildId, or type 'universal_image' when agents start on the default image.
Use this to confirm which build new agents use. Use cursor_environment_build_get with the buildId for that build's details.

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

Inputs:

- `environment_id` (`string`, required): UUID of the saved cloud agent environment. Get it from cursor_environments_list. An environment that doesn't exist or isn't visible to the API key returns 404 environment_not_found. Example: 8f14e45f-ceea-4e6b-9c3a-1d2e3f4a5b6c

Example input: `{"environment_id":"<environment_id>"}`

### `cursor_environment_build_get`

Get Environment Build · Read-only

Get one build of a saved Cursor cloud agent environment.
Returns the build's id, environmentId, status, trigger, draft flag, failure details if it failed, and created, updated and completed times.
Use this to check a specific build from cursor_environment_builds_list. A build ID that does not belong to the environment returns 404 build_not_found.

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

Inputs:

- `build_id` (`string`, required): ID of the build, in bld-YYYYMMDD-<uuid> form, as returned by cursor_environment_builds_list or cursor_environment_active_build_get. Example: bld-20260930-3c59dc04-8a1d-4b6e-9f2a-7e5d1c0b9a8f
- `environment_id` (`string`, required): UUID of the saved cloud agent environment. Get it from cursor_environments_list. An environment that doesn't exist or isn't visible to the API key returns 404 environment_not_found. Example: 8f14e45f-ceea-4e6b-9c3a-1d2e3f4a5b6c

Example input: `{"build_id":"<build_id>","environment_id":"<environment_id>"}`

### `cursor_environment_builds_list`

List Environment Builds · Read-only

List the builds of a saved Cursor cloud agent environment, newest first, up to 10 per page.
Returns each build's id, status (IN_PROGRESS, SUCCEEDED, FAILED, CANCELLED or SKIPPED), trigger (RECURRING, CONFIG_CHANGE or MANUAL), draft flag, failure details, and timestamps, plus a nextCursor.
Use this to check whether an environment built successfully. Use cursor_environment_active_build_get to see which build new agents boot from.

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

Inputs:

- `environment_id` (`string`, required): UUID of the saved cloud agent environment. Get it from cursor_environments_list. An environment that doesn't exist or isn't visible to the API key returns 404 environment_not_found. Example: 8f14e45f-ceea-4e6b-9c3a-1d2e3f4a5b6c
- `cursor` (`string`, optional): Pagination cursor. Pass the nextCursor value from the previous response to fetch the next page of up to 10 builds; omit it for the first page. Example: eyJvZmZzZXQiOjEwfQ

Example input: `{"environment_id":"<environment_id>"}`

### `cursor_environment_get`

Get Environment · Read-only

Get one saved Cursor cloud agent environment with its latest saved configuration.
Returns the environment's id, name, owner, repos, timestamps, its environment.json as a JSON-encoded string, the versionId of the latest saved version, and the repoFile it reads configuration from, if any.
Use this to read an environment's setup. Use cursor_environment_history_list to see past changes.

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

Inputs:

- `environment_id` (`string`, required): UUID of the saved cloud agent environment. Get it from cursor_environments_list. An environment that doesn't exist or isn't visible to the API key returns 404 environment_not_found. Example: 8f14e45f-ceea-4e6b-9c3a-1d2e3f4a5b6c

Example input: `{"environment_id":"<environment_id>"}`

### `cursor_environment_history_list`

List Environment History · Read-only

List the changes made to a saved Cursor cloud agent environment, newest first, as the dashboard's History tab shows them.
Returns a page of events (id, createdAt, kind such as created or updated, title, description, source such as dashboard or api, whether it is the current version, and that version's environment.json) and a nextCursor.
Use this to audit or compare configuration changes. Use cursor_environment_get for only the current configuration.

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

Inputs:

- `environment_id` (`string`, required): UUID of the saved cloud agent environment. Get it from cursor_environments_list. An environment that doesn't exist or isn't visible to the API key returns 404 environment_not_found. Example: 8f14e45f-ceea-4e6b-9c3a-1d2e3f4a5b6c
- `cursor` (`string`, optional): Pagination cursor. Pass the nextCursor value from the previous response to fetch the next page; omit it for the first page. A null nextCursor means there are no more pages. Example: eyJvZmZzZXQiOjIwfQ
- `limit` (`integer`, optional): Maximum number of events to return in one page, from 1 to 100. Defaults to 20. Example: 10. Default: `20`.

Example input: `{"environment_id":"<environment_id>"}`

### `cursor_environment_secrets_list`

List Environment Secrets · Read-only

List the Cursor Cloud Agents secrets stored on one saved environment, sorted by name. Secret values are never returned.
Returns one item per secret version (id, name, type runtime_secret, environment_variable or build_secret, repos, createdAt).
Use this for one environment. Use cursor_secrets_list to search across all owners.

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

Inputs:

- `environment_id` (`string`, required): UUID of the saved cloud agent environment. Get it from cursor_environments_list. An environment that doesn't exist or isn't visible to the API key returns 404 environment_not_found. Example: 8f14e45f-ceea-4e6b-9c3a-1d2e3f4a5b6c

Example input: `{"environment_id":"<environment_id>"}`

### `cursor_environments_list`

List Environments · Read-only

List the saved Cursor cloud agent environments the API key can access: the user's personal environments and the team's, most recently updated first.
Returns a page of environments (id, name, owner personal or team, repos, timestamps) and a nextCursor; list items omit the environment.json configuration.
Use this to find an environment ID. Use cursor_environment_get for an environment's configuration.

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

Inputs:

- `cursor` (`string`, optional): Pagination cursor. Pass the nextCursor value from the previous response to fetch the next page; omit it for the first page. A null nextCursor means there are no more pages. Example: eyJvZmZzZXQiOjIwfQ
- `limit` (`integer`, optional): Maximum number of environments to return in one page, from 1 to 100. Defaults to 20. Example: 10. Default: `20`.

Example input: `{}`

### `cursor_me_get`

Get API Key Info · Read-only

Get details about the Cursor API key used by this connection and the user it belongs to.
Returns the API key name, its creation time, and the owning user's ID, email, and first and last name.
Use this to confirm which Cursor account the connection acts as. Use cursor_agents_list to see that account's Cloud Agents.

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

Inputs: none.

Example input: `{}`

### `cursor_models_list`

List Models · Read-only

List the recommended models you can choose for a Cursor Cloud Agent.
Returns each model's id, displayName, description, aliases, the parameters it accepts (such as reasoning effort), and its valid id and params variants.
Use this to pick model_id and model_params for cursor_agent_create. Leave model_id empty on create to use the account's default model.

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

Inputs: none.

Example input: `{}`

### `cursor_repositories_list`

List Repositories · Read-only

List the GitHub repositories the API key's user can reach through Cursor's GitHub App installation.
Returns the url of each accessible repository.
Use this to find a repository_url for cursor_agent_create. Cursor limits this endpoint to 1 call per minute and 30 per hour per user, and it can take tens of seconds for users with many repositories, so reuse earlier results where possible.

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

Inputs: none.

Example input: `{}`

### `cursor_run_get`

Get Run · Read-only

Get the status and result of one run of a Cursor Cloud Agent.
Returns the run's status (CREATING, RUNNING, FINISHED, ERROR, CANCELLED or EXPIRED), timestamps, durationMs, the final assistant reply in result, and the git branches and pull requests the agent pushed.
Use this to poll a run started by cursor_agent_create or cursor_run_create until it reaches a terminal status. Use cursor_runs_list to browse all runs.

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

Inputs:

- `agent_id` (`string`, required): ID of the Cloud Agent, in bc-<uuid> form. Get it from cursor_agents_list or from the agent object that cursor_agent_create returns. Example: bc-00000000-0000-0000-0000-000000000001
- `run_id` (`string`, required): ID of the run, in run-<uuid> form. Get it from cursor_runs_list, from the agent's latestRunId, or from the run object that cursor_agent_create or cursor_run_create returns. Example: run-00000000-0000-0000-0000-000000000001

Example input: `{"agent_id":"<agent_id>","run_id":"<run_id>"}`

### `cursor_runs_list`

List Runs · Read-only

List the runs of one Cursor Cloud Agent, newest first. Each prompt sent to the agent creates one run.
Returns a page of runs (id, status CREATING, RUNNING, FINISHED, ERROR, CANCELLED or EXPIRED, timestamps, durationMs, result text, git branches) and a nextCursor.
Use this to see an agent's history. Use cursor_run_get to poll one run.

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

Inputs:

- `agent_id` (`string`, required): ID of the Cloud Agent, in bc-<uuid> form. Get it from cursor_agents_list or from the agent object that cursor_agent_create returns. Example: bc-00000000-0000-0000-0000-000000000001
- `cursor` (`string`, optional): Pagination cursor. Pass the nextCursor value from the previous response to fetch the next page; omit it for the first page. A null nextCursor means there are no more pages. Example: eyJvZmZzZXQiOjIwfQ
- `limit` (`integer`, optional): Maximum number of runs to return in one page, from 1 to 100. Defaults to 20. Example: 10. Default: `20`.

Example input: `{"agent_id":"<agent_id>"}`

### `cursor_secrets_list`

List Secrets · Read-only

List every Cursor Cloud Agents secret the API key can see across the team, the user, team members and environments, optionally filtered by owner scope, environment, name or repository. Secret values are never returned.
Returns one item per secret version (id, name, type runtime_secret, environment_variable or build_secret, repos, createdAt, and the owner that holds it) and a nextCursor.
Use this for a cross-owner inventory. Use cursor_team_secrets_list for only team secrets, or cursor_environment_secrets_list for one environment.

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

Inputs:

- `cursor` (`string`, optional): Pagination cursor. Pass the nextCursor value from the previous response, together with the same filters, to fetch the next page; omit it for the first page. Example: eyJvZmZzZXQiOjEwMH0
- `environment_id` (`string`, optional): Only list this environment's secrets (a UUID from cursor_environments_list). Cannot be combined with scope team, user or members, which returns 400 validation_error. Example: 8f14e45f-ceea-4e6b-9c3a-1d2e3f4a5b6c
- `limit` (`integer`, optional): Maximum number of secret versions to return in one page, from 1 to 100. Defaults to 100. Example: 10. Default: `100`.
- `name` (`string`, optional): Only return versions with this secret name, ignoring case. Example: NPM_TOKEN
- `repo` (`string`, optional): Only return the versions an agent on this repository gets: versions for that repository and versions for every repository. Cannot be combined with scope members. Example: github.com/acme/api
- `scope` (`string`, optional): Owner filter. 'team' lists only the team's secrets, 'user' only the user's personal secrets, 'environment' only environment secrets, and 'members' the user's personal secrets plus, for a team admin using their own user API key, every other member's personal secrets. Omit it to list everything the key can see. Example: team. One of: `team`, `user`, `members`, `environment`.

Example input: `{}`

### `cursor_team_secrets_list`

List Team Secrets · Read-only

List the Cursor Cloud Agents secrets of the team the API key works in, sorted by name. Secret values are never returned.
Returns one item per secret version (id, name, type runtime_secret, environment_variable or build_secret, repos, createdAt).
Use this for team-wide secrets only. Use cursor_secrets_list to include personal and environment secrets. An API key limited to certain repositories gets 403 repository_access.

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

Inputs: none.

Example input: `{}`

### `cursor_agent_create`

Create Agent · Write

Create a Cursor Cloud Agent and start its first run on a prompt, optionally against a GitHub repository, branch, or pull request.
Returns the new agent (id, name, status, url, repos) and its first run (id, status CREATING or RUNNING).
Use this to start new work. Use cursor_run_create to send a follow-up prompt to an existing agent.
Poll cursor_run_get with the returned agent and run IDs to see when the run finishes.

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

Inputs:

- `prompt` (`string`, required): Task instruction for the agent, in plain language. This becomes the prompt of the agent's first run. Example: Add a README with setup instructions
- `agent_id` (`string`, optional): Optional client-supplied agent ID in bc-<uuid> form, used for idempotency: re-sending the same agent_id returns 409 agent_id_conflict instead of creating a duplicate agent. Omit it to let Cursor generate the ID. Example: bc-00000000-0000-0000-0000-000000000001
- `auto_create_pr` (`boolean`, optional): Whether Cursor opens a pull request when the run completes. Defaults to false. Example: true
- `environment_name` (`string`, optional): Name of the saved Cursor-hosted environment, Team Pool, or self-hosted machine to run in. Only used when environment_type is set. A named cloud environment brings its own repositories, so do not also set repository_url. For type pool it defaults to the pool named default. Example: Release workspace
- `environment_type` (`string`, optional): Where the agent runs. 'cloud' uses Cursor-hosted VMs; 'pool' and 'machine' route to self-hosted workers. Omit it to use the default Cursor-hosted environment. Example: cloud. One of: `cloud`, `pool`, `machine`.
- `image_urls` (`array`, optional): Optional list of up to 5 HTTP or HTTPS image URLs that Cursor fetches and attaches to the initial prompt (PNG, JPEG, GIF, or WebP, up to 15 MB each). Example: ["https://example.com/screenshot.png"]
- `mode` (`string`, optional): Conversation mode for this run. 'plan' explores the code and drafts a plan before coding; 'agent' implements changes directly. Defaults to agent. Example: plan. One of: `agent`, `plan`.
- `model_id` (`string`, optional): Explicit model ID to run the agent with, as returned by cursor_models_list. Omit it to use the account's configured default model. Example: composer-2
- `model_params` (`array`, optional): Optional per-model parameters such as reasoning effort or max mode, only used when model_id is set. Each entry pairs a parameter id with a string value; use only parameters that cursor_models_list reports for the chosen model. Example: [{"id": "thinking", "value": "high"}]
- `name` (`string`, optional): Display name for the agent, 1 to 100 characters. Cursor derives one from the prompt when omitted. Example: Add README with setup instructions
- `pr_url` (`string`, optional): GitHub pull request URL to work on. The agent uses that PR's branches and starting_ref is ignored. repository_url must still be set to the PR's repository. Example: https://github.com/your-org/your-repo/pull/123
- `repository_url` (`string`, optional): GitHub repository URL the agent works in. Required when pr_url or starting_ref is set. Omit it, together with environment_name, to start an agent with no repository. Do not combine with a named cloud environment (environment_name with environment_type cloud). Example: https://github.com/your-org/your-repo
- `skip_reviewer_request` (`boolean`, optional): Whether to skip requesting the API key's user as a reviewer on the pull request Cursor opens. Only applies when auto_create_pr is true. Defaults to false. Example: false
- `starting_ref` (`string`, optional): Branch name or commit SHA in repository_url to start from. Ignored when pr_url is set. Example: main
- `work_on_current_branch` (`boolean`, optional): When false (the default), Cursor pushes commits to a new auto-generated cursor/... branch. When true, Cursor pushes directly to starting_ref, or to the PR's head branch when pr_url is set. Example: false

Example input: `{"prompt":"<prompt>"}`

### `cursor_environment_create`

Create Environment · Write

Create a saved Cursor cloud agent environment, personal or shared with the team, with its repositories and environment.json configuration.
Returns the new environment (id, name, owner, repos, timestamps).
Use this to set up a reusable environment for agents. Use cursor_environment_update to rename one or change its configuration.

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

Inputs:

- `environment_json` (`string`, required): The environment's configuration as a JSON-encoded string, using the same schema as a .cursor/environment.json file (for example install and start commands). An invalid configuration returns 400 validation_error. Example: {"install": "pnpm install", "start": "sudo service docker start"}
- `name` (`string`, required): Display name, 1 to 255 characters. It must differ from the owner's other environment names; a name already in use returns 409 environment_name_conflict. Example: Web app
- `owner` (`string`, required): Who owns the environment. 'personal' creates it for the API key's user; 'team' creates it for the team. Example: personal. One of: `personal`, `team`.
- `repository_urls` (`array`, required): Repository URLs to include, up to 100, or an empty array for an environment without repositories. Cursor must reach each one through your source control integration, otherwise the request returns 400 repository_access. Example: ["https://github.com/your-org/your-repo"]

Example input: `{"environment_json":"<environment_json>","name":"<name>","owner":"personal","repository_urls":["https://github.com/your-org/your-repo"]}`

### `cursor_environment_update`

Update Environment · Write

Rename a saved Cursor cloud agent environment, replace its environment.json configuration, or both in one atomic change.
Returns an empty response (HTTP 204) on success.
Use this to change an existing environment. Set at least one of name or environment_json; the new configuration replaces the old one entirely. Use cursor_environment_get to read the current configuration first.

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

Inputs:

- `environment_id` (`string`, required): UUID of the saved cloud agent environment. Get it from cursor_environments_list. An environment that doesn't exist or isn't visible to the API key returns 404 environment_not_found. Example: 8f14e45f-ceea-4e6b-9c3a-1d2e3f4a5b6c
- `environment_json` (`string`, optional): Replacement configuration as a JSON-encoded string in the .cursor/environment.json format. It replaces the whole configuration. An invalid configuration returns 400 validation_error. Set this, name, or both. Example: {"install": "pnpm install --frozen-lockfile", "start": "sudo service docker start"}
- `name` (`string`, optional): New display name, 1 to 255 characters. It must differ from the owner's other environment names; a name already in use returns 409 environment_name_conflict. Set this, environment_json, or both. Example: Web app (staging)

Example input: `{"environment_id":"<environment_id>"}`

### `cursor_run_cancel`

Cancel Run · Write

Cancel the active run of a Cursor Cloud Agent. Cancellation is final: the run moves to CANCELLED.
Returns the ID of the cancelled run.
Use this to stop work in progress. A run that already finished or was never active returns 409 run_not_cancellable. To continue afterwards, send a new prompt with cursor_run_create.

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

Inputs:

- `agent_id` (`string`, required): ID of the Cloud Agent, in bc-<uuid> form. Get it from cursor_agents_list or from the agent object that cursor_agent_create returns. Example: bc-00000000-0000-0000-0000-000000000001
- `run_id` (`string`, required): ID of the run, in run-<uuid> form. Get it from cursor_runs_list, from the agent's latestRunId, or from the run object that cursor_agent_create or cursor_run_create returns. Example: run-00000000-0000-0000-0000-000000000001

Example input: `{"agent_id":"<agent_id>","run_id":"<run_id>"}`

### `cursor_run_create`

Create Run · Write

Send a follow-up prompt to an existing Cursor Cloud Agent, starting a new run in the same conversation.
Returns the new run (id, agentId, status, timestamps).
Use this to continue or correct an agent's work. Use cursor_agent_create to start a new agent. Fails with 409 agent_busy while another run on the agent is still active; wait for it to finish or call cursor_run_cancel first.

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

Inputs:

- `agent_id` (`string`, required): ID of the Cloud Agent, in bc-<uuid> form. Get it from cursor_agents_list or from the agent object that cursor_agent_create returns. Example: bc-00000000-0000-0000-0000-000000000001
- `prompt` (`string`, required): Follow-up instruction for the agent, in plain language. Example: Also add troubleshooting steps
- `image_urls` (`array`, optional): Optional list of up to 5 HTTP or HTTPS image URLs that Cursor fetches and attaches to the follow-up prompt (PNG, JPEG, GIF, or WebP, up to 15 MB each). Example: ["https://example.com/screenshot.png"]
- `mode` (`string`, optional): Conversation mode for this run. 'plan' explores the code and drafts a plan before coding; 'agent' implements changes directly. Omit it to keep the conversation's current mode. Example: plan. One of: `agent`, `plan`.

Example input: `{"agent_id":"<agent_id>","prompt":"<prompt>"}`

## Related

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

- [GitHub](/agentkit/connectors/github/): Scalekit connector, OAuth, 217 tools
- [Microsoft Entra ID](/agentkit/connectors/microsoftentraid/): Scalekit connector, OAuth, 82 tools
- [Datadog](/agentkit/connectors/datadog/): Scalekit connector, API key, 105 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 |
