Cursor
Build workflows with Cursor AI Agents and track usage
Actions
Section titled “Actions” Get Daily Usage Data Fetches daily team usage metrics from Cursor's Admin API.
Launch Cloud Agent Launches a Cursor Cloud Agent to perform coding tasks asynchronously.
Instructions
Section titled “Instructions”To get your API keys, visit the Cursor Dashboard. You may need separate keys for Agents and Admin features.
Get Daily Usage Data
Section titled “Get Daily Usage Data”Component key: cursor.getDailyUsageData
The Get Daily Usage Data component fetches team usage metrics from Cursor’s Admin API.
Use Cases
Section titled “Use Cases”- 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
How It Works
Section titled “How It Works”- Fetches usage data for the specified date range from Cursor’s Admin API
- Returns detailed metrics per user including lines added/deleted, requests, and model usage
Configuration
Section titled “Configuration”- 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)
Output
Section titled “Output”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
Example Output
Section titled “Example Output”{ "data": { "data": [ { "acceptedLinesAdded": 1102, "acceptedLinesDeleted": 645, "agentRequests": 12, "chatRequests": 128, "composerRequests": 45, "date": 1710720000000, "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"}Launch Cloud Agent
Section titled “Launch Cloud Agent”Component key: cursor.launchAgent
The Launch Cloud Agent component triggers a Cursor AI coding agent and waits for it to complete.
Use Cases
Section titled “Use Cases”- 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
How It Works
Section titled “How It Works”- Launches a Cursor Cloud Agent with the specified prompt and configuration
- Waits for the agent to complete (monitored via webhook and polling)
- On success, fetches the agent’s conversation and emits the result together with the messages
Output
Section titled “Output”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_messageorassistant_message) andtext - 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
messagesvia an expression)
Example Output
Section titled “Example Output”{ "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"}