Skip to content

Cursor

Build workflows with Cursor AI Agents and track usage

To get your API keys, visit the Cursor Dashboard. You may need separate keys for Agents and Admin features.

Component key: cursor.getDailyUsageData

The Get Daily Usage Data component fetches team usage metrics from Cursor’s Admin API.

  • Usage reporting: Track team productivity and AI usage patterns
  • Cost tracking: Monitor usage-based requests and subscription consumption
  • Analytics dashboards: Build custom dashboards with Cursor usage data
  1. Fetches usage data for the specified date range from Cursor’s Admin API
  2. Returns detailed metrics per user including lines added/deleted, requests, and model usage
  • Start Date: Start of the date range (YYYY-MM-DD format, defaults to 7 days ago)
  • End Date: End of the date range (YYYY-MM-DD format, defaults to today)

The output includes per-user daily metrics:

  • Lines added/deleted (total and accepted)
  • Tab completions shown/accepted
  • Composer, chat, and agent requests
  • Subscription vs usage-based request counts
  • Most used model and file extensions
  • Requires a valid Cursor Admin API key configured in the integration
  • Only returns data for active users
{
"data": {
"data": [
{
"acceptedLinesAdded": 1102,
"acceptedLinesDeleted": 645,
"agentRequests": 12,
"chatRequests": 128,
"composerRequests": 45,
"date": 1710720000000,
"email": "[email protected]",
"isActive": true,
"mostUsedModel": "gpt-4",
"subscriptionIncludedReqs": 180,
"totalAccepts": 73,
"totalApplies": 87,
"totalLinesAdded": 1543,
"totalLinesDeleted": 892,
"totalRejects": 14,
"totalTabsAccepted": 289,
"totalTabsShown": 342,
"usageBasedReqs": 5
}
],
"period": {
"endDate": 1710892800000,
"startDate": 1710720000000
}
},
"timestamp": "2026-03-26T19:29:35.841265352Z",
"type": "cursor.getDailyUsageData.result"
}

Component key: cursor.launchAgent

The Launch Cloud Agent component triggers a Cursor AI coding agent and waits for it to complete.

  • Automated code generation: Generate code from natural language prompts
  • PR fixes: Automatically fix issues on existing pull requests
  • Code refactoring: Refactor code based on instructions
  • Feature implementation: Implement new features from specifications
  1. Launches a Cursor Cloud Agent with the specified prompt and configuration
  2. Waits for the agent to complete (monitored via webhook and polling)
  3. On success, fetches the agent’s conversation and emits the result together with the messages

On completion the component emits:

  • status, agentId, prUrl, summary, branchName
  • messages: the agent’s full conversation history (chronological); each message has an id, type (user_message or assistant_message) and text
  • lastMessage: convenience pointer to the final assistant reply — or, if the agent produced no assistant reply, the last message overall (use this, or select from messages via an expression)
{
"data": {
"agentId": "agent_12345",
"branchName": "cursor/agent-550e8400",
"lastMessage": {
"id": "msg_002",
"text": "Refactored login logic and added unit tests.",
"type": "assistant_message"
},
"messages": [
{
"id": "msg_001",
"text": "Refactor the login logic and add tests.",
"type": "user_message"
},
{
"id": "msg_002",
"text": "Refactored login logic and added unit tests.",
"type": "assistant_message"
}
],
"prUrl": "https://github.com/org/repo/pull/42",
"status": "FINISHED",
"summary": "Refactored login logic."
},
"timestamp": "2026-03-26T19:29:35.841265352Z",
"type": "cursor.launchAgent.finished"
}