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

# Cursor

> Connect Cursor IDE to track AI-assisted code generation

Connect Cursor to track your team's AI-assisted development activity, code generation metrics, and agent usage.

## What's tracked

* **IDE usage** — Daily per-user request counts for chat, composer, agent, and Cmd+K
* **Code generation** — AI-assisted code creation
* **Agent activity** — Cursor Agent and Bugbot usage
* **Acceptance rates** — How often AI suggestions are accepted
* **Cost tracking** — actual per-user Cursor spend

## Prerequisites

* Cursor **Team** or **Enterprise** plan (the Admin API is not available on Hobby or Pro plans)
* Team administrator access in Cursor
* Active Cursor subscription

## Setup

<Steps>
  <Step title="Get your API key">
    In the [Cursor dashboard](https://www.cursor.com/dashboard?tab=settings), go to **Settings** and find the **Cursor Admin API Keys** section. Click **Create New API Key**, name it, and copy the key immediately — it is only shown once.
  </Step>

  <Step title="Add to Weave">
    Go to **Data** → **Cursor** → **Connect**, select **Cursor Teams plan** or **Cursor Enterprise plan**, and click **Set up admin API key** on the **Admin API key** card. On the **Provide Cursor API key** card, click **Add an API key**.
  </Step>

  <Step title="Wait for sync">
    Weave will begin syncing your Cursor data. This may take a few minutes.
  </Step>

  <Step title="Verify connection">
    Check that Cursor data appears in AI metrics
  </Step>
</Steps>

## Cursor components tracked

Weave tracks three Cursor components separately:

**Cursor IDE** (Foreground AI)

* Interactive code suggestions and completions
* Tab acceptance and code generation
* Manual AI interactions

**Cursor Agent** (Background AI)

* Autonomous task execution
* Multi-file refactoring
* Automated code changes

**Cursor Bugbot** (Background AI)

* Automatic bug detection
* Suggested fixes
* Code quality improvements

## Metrics enabled

Once connected, you can track:

* **[AI code LOC](/metrics/ai-code-loc)** — Lines generated by Cursor
* **[AI output percentage](/metrics/ai-output-percentage)** — Portion of output from Cursor
* **[AI efficiency index](/metrics/ai-efficiency-index)** — Impact on productivity
* **[AI tool costs](/metrics/ai-tool-costs)** — actual Cursor spend per engineer

## Cost tracking

Cursor cost is **actual billed spend**, not an estimate. Weave reads it from the Cursor Admin API. When your key can read Cursor's usage events, Weave adds up each event's `chargedCents` (model cost plus any Cursor token-rate charges). Otherwise it uses each member's `spendCents` for the current billing cycle from the team spend endpoint. Because this comes straight from Cursor's billing, the dollar figures match your Cursor dashboard rather than a list-price approximation.

* **What you see** — per-user spend, attributable to individual engineers and teams
* **Source** — the same Cursor Admin API key you connect during setup (no extra configuration)
* **Requirements** — a Cursor **Team** or **Enterprise** plan; the Admin API isn't available on Hobby or Pro

You don't need to enter subscription details for Cursor — the spend comes directly from the API.

## Custom gateways and BYOK

If your organization points Cursor at your own inference gateway — a custom AWS Bedrock proxy, a self-hosted LiteLLM instance, or any bring-your-own-key (BYOK) setup — instead of paying Cursor directly, the Admin API integration goes blind for that traffic:

* **Admin API integration** — reports **\$0 and no usage** for gateway-routed requests. It only knows about inference Cursor itself billed; once a request leaves through your gateway, Cursor's servers never see it. There's no configuration fix on your end — this is a server-side visibility gap, not a setup mistake.
* **[Cursor plugin](/tutorials/weave-plugin-installation)** — still captures prompts, sessions, file edits, and tool calls per developer, but **not tokens or cost**. The plugin reports what happened in the editor, not what your gateway billed.
* **For cost and token visibility on gateway-routed traffic** — have your gateway send [AI Gateway](/integrations/ingest-api#ai-gateway-logs-only) logs to Weave. That path is a server-side integration (your gateway posts one log record per inference request), so it works independent of Cursor and captures the cost/token data the Admin API can't.

Run all three together for full coverage: the plugin for per-developer activity, AI Gateway ingest for real cost, and the Admin API for anything not routed through your own gateway.

## Sync frequency

Cursor data syncs every 3 hours via API polling.

## Troubleshooting

<AccordionGroup>
  <Accordion icon="key" title="API key not working">
    If the API key fails to connect:

    1. Verify the key is from a Cursor organization account (not personal)
    2. Ensure the key hasn't expired
    3. Check that you have admin permissions
    4. Contact Cursor support if issues persist
  </Accordion>

  <Accordion icon="chart-line" title="No data appearing">
    If Cursor metrics aren't showing:

    1. Verify team members are using Cursor actively
    2. Check that users are logged into the organization account
    3. Wait up to 3 hours for the next sync cycle
    4. Check the **Sync status** on the **API** row under **Data** → **Cursor**
  </Accordion>

  <Accordion icon="users" title="Missing team members">
    If some developers aren't tracked:

    1. Ensure they're logged into the Cursor organization account
    2. Verify they have active Cursor subscriptions
    3. Check that they've accepted code suggestions recently
    4. Wait for the next sync. Weave refreshes the Cursor member list on every sync
  </Accordion>
</AccordionGroup>

## Data privacy

Weave syncs usage metadata and prompt content from Cursor:

* Usage statistics and session duration
* Code acceptance rates
* Agent activity counts
* Subscription and cost data
* User prompt text from AI-assisted commits (used for activity classification)

**We never access:**

* Source code content or diffs
* Cursor's AI responses
* File paths or project structure

## Related integrations

* [Cursor plugin](/tutorials/weave-plugin-installation) — per-machine plugin for per-developer prompt and edit telemetry (works on any plan)
* [Cline](/ai-tools/cline) — Alternative AI coding assistant
* [Windsurf](/ai-tools/windsurf) — Alternative AI IDE
* [Claude Code](/ai-tools/claude-code) — CLI-based AI assistant


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.