Pinter
ENID
Integrations
View as Markdown

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

  1. Open integrations

    In Pinter, go to Integrations at /integrations and create an integration.

  2. Select the HTTP channel

    Set the channel type to http and select the Pinter agent that will use the integration.

  3. 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_key instead of cursor_api_key. Pinter also accepts the credential from headers.Authorization, headers.api_key, or headers.cursor_api_key.

  4. 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:

  1. Extracts the Cursor agent ID from the endpoint path.
  2. Sends the request to https://api.cursor.com/v1/agents/{agent_id}/runs.
  3. Adds the API key as a bearer token.
  4. 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

SymptomCheck
Missing endpoint errorAdd endpoint to the connection configuration.
Agent ID cannot be extractedUse a Cursor URL whose path contains the agent ID.
Cursor rejects authenticationCheck the API key and remove a duplicated Bearer prefix.
agent_busyWait for the current Cursor run to complete, then retry.
Request fails after 10 secondsCheck Cursor availability and network access from the backend.