> ## Documentation Index
> Fetch the complete documentation index at: https://cofounder.appeeky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor (Cloud Agents)

> Hand feature-gap builds to Cursor Cloud Agents — Appeeky triggers a run, Cursor opens the PR.

Like [Hermes](./hermes) and [OpenClaw](./openclaw), **Cursor** lets the Co-founder delegate well-scoped build tasks to a coding agent. Unlike self-hosted gateways, Cursor runs on **Cursor's cloud** — you connect an API key and grant GitHub repo access in Cursor. Appeeky packages the strategic brief and launches a run via the [Cloud Agents API](https://cursor.com/docs/cloud-agent/api/endpoints). Appeeky never runs code.

This is the `engineering_delegate` action with `provider: "cursor"`.

## How it works

```
Co-founder run
  → feature gap + evidence detected
  → reasoner emits `engineering_delegate` (provider: cursor)
  → you approve it (delegations always require explicit approval)
  → Appeeky POSTs to Cursor: POST /v1/agents
  → Cursor Cloud Agent clones your repo, implements, runs tests
  → Cursor opens a draft PR (autoCreatePR)
  → Appeeky polls run status and surfaces PR link in briefings
```

Appeeky stores `{agentId}:{runId}` as the action's `external_id` and reconciles status via `GET /v1/agents/{id}/runs/{runId}` (scheduled poller \~every 10 minutes, plus manual refresh).

## Prerequisites

1. **Cursor account** with Cloud Agents enabled ([cursor.com/dashboard](https://cursor.com/dashboard)).
2. **API key** from [Cursor Dashboard → API Keys](https://cursor.com/dashboard/api).
3. **GitHub repo access** — the target `owner/repo` must be reachable by Cursor (connect GitHub in Cursor and authorize the repository).
4. **Appeeky GitHub integration** (recommended) — maps each app to `owner/repo` so delegations include the correct target.

Cloud agent usage is **billed to your Cursor account**, not Appeeky.

## Setup

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X PUT https://api.appeeky.com/v1/cofounder/integrations/cursor \
  -H "X-API-Key: $APPEEKY_KEY" \
  -d '{
    "credentials": { "apiKey": "<CURSOR_API_KEY>" },
    "integrationConfig": {
      "defaultBranch": "main",
      "model": "composer-2"
    }
  }'
```

Before saving, Appeeky calls `GET /v1/models` on the Cursor API to verify the key.

| Field           | Where       | Required | Notes                                                    |
| --------------- | ----------- | -------- | -------------------------------------------------------- |
| `apiKey`        | credentials | ✅        | Cursor Dashboard → API Keys                              |
| `defaultBranch` | config      | —        | Starting branch when the task omits one (default `main`) |
| `model`         | config      | —        | Model id from `GET /v1/models`; omit for Cursor default  |

## Enable

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
PUT /v1/cofounder/preferences
{ "enabledIntegrations": ["cursor"] }
```

(Connecting via the dashboard does this automatically.)

## What Appeeky sends

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
POST https://api.cursor.com/v1/agents
Authorization: Basic <base64(apiKey:)>

{
  "name": "appeeky:<appId>:<task-slug>",
  "prompt": { "text": "# Engineering task from App Co-founder\n…" },
  "repos": [{ "url": "https://github.com/owner/repo", "startingRef": "main" }],
  "autoCreatePR": true,
  "mode": "agent"
}
```

The brief always ends with **draft-PR-by-default guardrails**.

## Safety model

* **No Appeeky secrets leave Appeeky** beyond the task brief. Repo access is via your Cursor + GitHub authorization.
* **Always approval-gated.** Delegations never auto-run by autopilot level.
* **Read mode blocks it.** In `agentMode: read`, no delegations are proposed.
* **Rate-limited.** Same caps as other coding agents (default: 10/day, 3 in-flight).
* **Traceable.** Each run name carries `appeeky:<appId>:<task-slug>`.

## Appeeky MCP in Cursor (optional)

You can also connect [Appeeky MCP in Cursor](/docs/mcp-cursor) so agents have live ASO intelligence while coding. That is separate from this integration — this flow is Co-founder → Cursor delegation.

## Disable

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
DELETE /v1/cofounder/integrations/cursor
```
