> ## Documentation Index
> Fetch the complete documentation index at: https://ade-ac1c6011-dependabot-github-actions-actions-cache-6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> Run Cursor as an agent provider in ADE through the Cursor SDK — one of ADE's five agents, scoped to a lane.

[Cursor](https://cursor.com) runs inside ADE as one of its five agent providers, alongside Claude Code, Codex, Factory Droid, and OpenCode. ADE drives Cursor's agent through the official **Cursor SDK** — ADE owns the lane scope, permissions, and system prompt; the SDK owns the model and tool execution.

## Connect Cursor

Cursor chat authenticates with an API key. Add a Cursor API key in **Settings → AI**, or set `CURSOR_API_KEY` in the environment ADE launches from — ADE accepts either.

Once connected, ADE discovers Cursor's available models and they appear in the model picker alongside every other provider. Pick one in any chat header to route that session through Cursor.

<AccordionGroup>
  <Accordion title="How the SDK provider works" icon="gear">
    When a Cursor key is configured, ADE runs the official `@cursor/sdk` in a Node worker pool. The worker creates or resumes a Cursor SDK agent with the selected model in the active lane's worktree, and routes chat turns through SDK runs. Sessions are pooled and reused, SDK events map to ADE's chat event model, and interrupts cancel the run. Because the `ade` CLI is on `PATH`, Cursor agents can call ADE's lane, git, PR, and action tools.
  </Accordion>

  <Accordion title="Connection status" icon="signal">
    ADE shows Cursor's status in **Settings → AI**:

    | Status                        | Meaning                               |
    | ----------------------------- | ------------------------------------- |
    | **Connected** (green)         | Cursor API key found and ready.       |
    | **Not authenticated** (amber) | Cursor API key is missing or invalid. |
  </Accordion>

  <Accordion title="Cursor Agent CLI in the Work tab" icon="terminal">
    You can also launch the `cursor-agent` CLI as a tracked terminal session in the Work tab. ADE probes `cursor-agent` for CLI-only models and merges them into the picker, so the chat-vs-CLI distinction stays clear. This needs the `cursor-agent` binary on your `PATH`.
  </Accordion>

  <Accordion title="Cursor Cloud agents" icon="cloud">
    Kick off Cursor's hosted cloud agents from ADE and follow them in a lane:

    ```bash theme={null}
    ade cursor cloud agents list --text
    ade cursor cloud agents create --repo https://github.com/owner/repo --prompt "fix flaky test" --auto-pr
    ```

    The chat panel can open a cloud agent as an ADE chat (replies still run in the cloud) or jump to it on cursor.com.
  </Accordion>

  <Accordion title="Troubleshooting" icon="circle-question">
    * **Authentication failed** — add a Cursor API key in **Settings → AI**, or set `CURSOR_API_KEY` in ADE's launch environment.
    * **Models not appearing** — discovery serves last-known-good rows and revalidates in the background. If Cursor was just connected, restart ADE or refresh in **Settings → AI**.
    * **Session errors** — confirm the key is valid and the selected model is available; check developer logs at **Settings → Developer → Log file**.
  </Accordion>
</AccordionGroup>

<CardGroup cols={2}>
  <Card title="AI providers" icon="brain" href="/configuration/ai-providers">
    Connect each agent and set defaults.
  </Card>

  <Card title="Agent chat" icon="comments" href="/chat/overview">
    Run Cursor in a lane and compare it with other providers.
  </Card>
</CardGroup>
