Cursor: run agent
cursor_run_agentExecute a coding agent in a working directory to read, edit, write files and run shell commands, returning an agent ID for follow-up conversations.
Instructions
Run a Cursor Agent (local runtime) against a working directory and return the final result. The agent can read, edit, and write files and run shell commands in cwd. Returns an agentId you can pass to cursor_follow_up to continue the same conversation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Instruction for the Cursor Agent. | |
| cwd | Yes | Absolute path to the working directory the agent operates in. | |
| model | No | Model id (e.g. "composer-2.5"). Defaults to the server default ("auto"). | |
| mode | No | "agent" implements changes directly; "plan" explores and plans first. |