Cursor Agent CLI is the terminal coding agent from Anysphere, the company behind the Cursor editor. As an AI harness, it provides tools, context management, permissions and checkpoints around several underlying AI models, running interactively in the terminal, non-interactively in CI pipelines, and programmatically via an SDK. As of 20 September 2026.
What is Cursor Agent CLI?
Cursor Agent CLI is built by Anysphere and is proprietary. The CLI’s beta launched in August 2025. On Unix-based systems it is installed via curl https://cursor.com/install -fsS | bash, and on Windows via irm 'https://cursor.com/install?win32=true' | iex; supported platforms are macOS, Linux, WSL and Windows PowerShell. After installation, agent --version verifies the install, and a session starts with the agent command. Cursor Agent CLI is the same agent that runs inside the Cursor editor and on the web — packaged here as a standalone terminal program.
Cursor Agent CLI as an AI harness
The agent works in three modes: Agent (full tool access for complex tasks), Plan (asks clarifying questions before making changes), and Ask (read-only). Modes are switched via slash command or the --mode flag. Per the documentation, tools include file operations, search, shell commands and web access. Project rules live as .mdc files under .cursor/rules, or as a simplified AGENTS.md; tool integrations rely on MCP via an mcp.json configuration at project or user level. Subagents are, per the documentation, scoped agent runs delegated from the main thread with their own rules, MCP servers and skills. Checkpoints are automatic snapshots of files the agent changed, and the workspace can be restored to one with a click — explicitly not a replacement for Git, per the documentation. Command execution is controlled via /sandbox or --sandbox <mode>; for scripts and CI pipelines, the agent runs non-interactively via print mode (-p/--print) with a selectable output format (--output-format json or text).
Models and model access
The model is selected via --model or /model; per the documentation, Cursor connects models from OpenAI, Anthropic and Google, including families such as OpenAI GPT, Anthropic Claude and Google Gemini, alongside Cursor’s own models. For chat models, account settings let you add your own API keys with OpenAI, Anthropic, Azure or AWS Bedrock; per Cursor’s own privacy page, requests are still routed through Cursor’s backend for final prompt building, and the key itself is not stored persistently. A concrete configuration path for a freely chosen custom endpoint URL for a central, OpenAI-compatible proxy is not documented in detail for Cursor Agent CLI — so whether model access can be routed through the AI Gateway, for example, cannot currently be established.
Enterprise use: data protection and governance
Per Cursor’s documentation, Privacy Mode is on by default for Enterprise teams; Cursor states it maintains zero-data-retention agreements with connected model providers, so code is not used for training. One exception, per the documentation, is Cloud Agents, the only feature that persistently stores code with Cursor because they need repository access over time. Team and Enterprise plans offer, per the vendor, SAML/OIDC SSO and team-wide enforceable privacy policies; per the documentation, SCIM is reserved for Enterprise customers. Team admins can distribute MCP servers centrally through a marketplace. Regardless of the model configured, source code and prompts go to the configured model provider or to Cursor’s own infrastructure, which should be reflected in your own record of processing activities beforehand.
Orchestrating Cursor Agent CLI with herdr
Per herdr’s agent overview, Cursor Agent CLI is listed there with the same integration level as many other terminal agents without installable lifecycle hooks: herdr detects a running session via a screen manifest and attaches to it. Teams running Cursor Agent CLI alongside other coding agents in terminal sessions can orchestrate them together this way.
Where it fits: developer harness and enterprise harness
Cursor Agent CLI is a harness for developers working in the terminal, in CI pipelines, and via an SDK. For business users outside development, who work with company knowledge rather than code repositories, CompanyGPT is the matching harness — with tools via MCP servers and integrations, context via companyRAG, and roles from your existing directory service. The AI Gateway provides the shared cost and governance layer for central budgets, providers and logging across different harnesses. An overview of further AI harnesses is available at /en/ai-harness/. We help organisations embed coding agents such as Cursor Agent CLI into existing AI governance.
