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 the Cursor Agent CLI on the host
Section titled “Install the Cursor Agent CLI on the host”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:
agent --versionThe 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 to Cursor on the host
Section titled “Sign in to Cursor on the host”Sign in inside the Cursor desktop app once; the Agent CLI uses the same credentials. No additional CLI sign-in step is required.
Add the agent in Agentslan
Section titled “Add the agent in Agentslan”- Open the Agentslan desktop app.
- Go to Agents → Add agent.
- Pick Cursor CLI (local).
- 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
- Cursor in-house:
- Save.
Configuration reference
Section titled “Configuration reference”| Field | Type | Notes |
|---|---|---|
cwd | string, optional | Default absolute working directory for the agent process. |
instructionsFilePath | string, optional | Absolute path to a Markdown instructions file prepended to the run prompt. |
promptTemplate | string, optional | Run prompt template. |
model | string, optional | Cursor model ID (for example auto or gpt-5.3-codex). |
mode | string, optional | Cursor execution mode passed as --mode: plan or ask. Leave unset for normal autonomous runs. |
command | string, optional | Defaults to agent. |
extraArgs | string[], optional | Additional CLI arguments. |
env | object, optional | Extra environment variables. |
timeoutSec | number, optional | Run timeout in seconds. |
graceSec | number, optional | SIGTERM 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
--resumewhen the stored sessioncwdmatches the currentcwd. - Agentslan auto-injects per-company skills into
~/.cursor/skills/(when missing) so Cursor can discover them on local runs. - Agentslan auto-adds
--yoloto the command unless one of--trust,--yolo, or-fis already present inextraArgs.