Cursor
Use the Cursor CLI through AnyAgent: what you can ask for, how it behaves, and the endpoint underneath.
The cursor adapter drives the Cursor CLI over ACP (agent acp), detected as the agent binary on PATH (the legacy cursor-agent name also resolves); import cursor from anyagent-js/cursor.
What you can ask for
readOnly, model, effort, and resume work on the endpoint’s own channels; systemPrompt and schema are provided by AnyAgent. mcp is undeclared: reach Cursor’s own agent mcp configuration via extraArgs. readOnly runs plan mode, which the CLI enforces read-only. authStatus() asks agent status --format json and models() parses agent --list-models, every listed id valid verbatim as model. The full grid is on the support matrix.
Good to know
- Every turn runs on a live connection, so sessions steer and surface permission requests; the session id lands on
result.sessionIdand is whatresumetakes back. efforthas no channel of its own; it rides in the model id’s bracket overrides, soeffortwithoutmodelthrowsInvalidOptions.model: "m", effort: "high"becomesm[effort=high].- Effort and speed variants are also baked into model ids (
gpt-5.3-codex-low,…-high-fast); picking one of those needs noeffort.
Under the hood
Every session launches agent acp and configures it over the protocol. Run options become:
| Option | Channel |
|---|---|
readOnly: true | config option mode set to plan, put back on the next turn that does not ask for it |
model | config option model, bracket overrides pass through verbatim ("claude-opus-4-8[context=1m]") |
effort | compiled into the model’s bracket overrides |
resume | session/load with the chat id |