Cursor icon

Cursor

Interact with the Cursor REST API to spawn and manage AI coding agents

Actions13

Agent → Prompt

AI-generated

Summary

Send a one-shot prompt message to a newly created AI agent tied to a GitHub repository and receive its processed response after completion.

Inputs

  • Message (required) — The prompt message to send to the agent.
  • Model — Model ID to use for the agent (default is 'composer-2').
  • Repository URL (required) — GitHub repository URL associated with the cloud agent.
  • Auto-Create PR — Whether to automatically create a pull request based on the agent's response.

Output shape

a single item containing the agent's run status and result

Operation creates a new agent with the given parameters and sends the prompt. It polls the agent's run status until a terminal state is reached (or times out after 10 minutes). The output includes 'status', 'result', 'runId', and 'agentId'. If no run ID is returned from the agent creation, the full agent data is returned instead.

Links

Discussion