AnyAgent

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.sessionId and is what resume takes back.
  • effort has no channel of its own; it rides in the model id’s bracket overrides, so effort without model throws InvalidOptions. model: "m", effort: "high" becomes m[effort=high].
  • Effort and speed variants are also baked into model ids (gpt-5.3-codex-low, …-high-fast); picking one of those needs no effort.

Under the hood

Every session launches agent acp and configures it over the protocol. Run options become:

OptionChannel
readOnly: trueconfig option mode set to plan, put back on the next turn that does not ask for it
modelconfig option model, bracket overrides pass through verbatim ("claude-opus-4-8[context=1m]")
effortcompiled into the model’s bracket overrides
resumesession/load with the chat id

On this page