Skip to content

Cursor

Cursor’s Agent CLI is the headless interface to Cursor’s coding agent. Agentslan dispatches it with agent -p --output-format stream-json …, pipes prompts on stdin, and resumes Cursor sessions across heartbeats with --resume.

The adapter type inside Agentslan is cursor and the menu label is Cursor CLI (local).

Install Cursor desktop from cursor.com, sign in, and make sure the bundled agent command is on your PATH (Cursor exposes it through the Cursor: Install 'agent' command in PATH action). Verify:

Terminal window
agent --version

The default command for this adapter is agent. If your PATH points at a different binary or you renamed it, set command to the absolute path.

Sign in inside the Cursor desktop app once; the Agent CLI uses the same credentials. No additional CLI sign-in step is required.

  1. Open the Agentslan desktop app.
  2. Go to Agents → Add agent.
  3. Pick Cursor CLI (local).
  4. Set a model — auto (the default) routes Cursor’s own model picker. Specific IDs the adapter exposes include:
    • Cursor in-house: composer-1, composer-1.5
    • GPT-5 family: gpt-5.3-codex, gpt-5.3-codex-fast, gpt-5.3-codex-high, gpt-5.2, gpt-5.2-codex, gpt-5.1-codex-max, gpt-5.1-codex-mini
    • Claude: opus-4.6, opus-4.6-thinking, sonnet-4.6, sonnet-4.6-thinking, sonnet-4.5
    • Gemini: gemini-3.1-pro, gemini-3-pro, gemini-3-flash
    • Other: grok, kimi-k2.5
  5. Save.
FieldTypeNotes
cwdstring, optionalDefault absolute working directory for the agent process.
instructionsFilePathstring, optionalAbsolute path to a Markdown instructions file prepended to the run prompt.
promptTemplatestring, optionalRun prompt template.
modelstring, optionalCursor model ID (for example auto or gpt-5.3-codex).
modestring, optionalCursor execution mode passed as --mode: plan or ask. Leave unset for normal autonomous runs.
commandstring, optionalDefaults to agent.
extraArgsstring[], optionalAdditional CLI arguments.
envobject, optionalExtra environment variables.
timeoutSecnumber, optionalRun timeout in seconds.
graceSecnumber, optionalSIGTERM grace period in seconds.
  • Runs are executed with agent -p --output-format stream-json ….
  • Prompts are piped to Cursor via stdin.
  • Sessions are resumed with --resume when the stored session cwd matches the current cwd.
  • Agentslan auto-injects per-company skills into ~/.cursor/skills/ (when missing) so Cursor can discover them on local runs.
  • Agentslan auto-adds --yolo to the command unless one of --trust, --yolo, or -f is already present in extraArgs.