Connect a Cursor Cloud Agent
Configure an HTTP integration that lets a Pinter agent start Cursor Cloud Agent runs.
Connect a Cursor Cloud Agent when a Pinter agent needs to delegate a coding request to Cursor. Pinter recognizes Cursor endpoints in HTTP integrations and starts a Cursor agent run with the message generated by the Pinter agent.
Before you begin
You need:
- A Cursor Cloud Agent endpoint that contains the agent ID.
- A Cursor API key authorized to run that agent.
- A Pinter agent to assign to the integration.
- Permission to create integrations.
Create the integration
- Open integrations
In Pinter, go to Integrations at
/integrationsand create an integration. - Select the HTTP channel
Set the channel type to
httpand select the Pinter agent that will use the integration. - Enter the connection configuration
Add the Cursor endpoint and API key to the JSON connection configuration.
{ "endpoint": "https://cursor.com/agents/your-agent-id", "cursor_api_key": "your-cursor-api-key" }You can use
api_keyinstead ofcursor_api_key. Pinter also accepts the credential fromheaders.Authorization,headers.api_key, orheaders.cursor_api_key. - Save and test the integration
Save the integration, assign its tool to an agent, and run a request that delegates a coding task.
Request behavior
When the integration endpoint contains cursor.com, Pinter:
- Extracts the Cursor agent ID from the endpoint path.
- Sends the request to
https://api.cursor.com/v1/agents/{agent_id}/runs. - Adds the API key as a bearer token.
- Sends the Pinter agent message in this payload:
{
"prompt": {
"text": "Review the authentication flow and propose a minimal fix."
}
}
The integration returns the Cursor response to the Pinter agent as JSON.
Handle a busy agent
Cursor returns HTTP 409 when the selected Cloud Agent is already processing
another request. Pinter converts that response into:
{
"status": "failed",
"error": "agent_busy",
"message": "The Cursor Cloud Agent is currently busy processing another request."
}
Wait for the active Cursor run to finish before retrying. Do not immediately
retry in a loop because repeated requests continue to return agent_busy.
Troubleshooting
| Symptom | Check |
|---|---|
| Missing endpoint error | Add endpoint to the connection configuration. |
| Agent ID cannot be extracted | Use a Cursor URL whose path contains the agent ID. |
| Cursor rejects authentication | Check the API key and remove a duplicated Bearer prefix. |
agent_busy | Wait for the current Cursor run to complete, then retry. |
| Request fails after 10 seconds | Check Cursor availability and network access from the backend. |