Skip to main content
9 – 17 UHR +49 8031 3508270 LUITPOLDSTR. 9, 83022 ROSENHEIM
DE / EN
Coding agent Anysphere (Cursor) United States Terminal, CI, SDK

Cursor Agent CLI

Cursor Agent CLI is Anysphere's terminal coding agent behind the Cursor editor. Models, permissions, MCP, checkpoints and enterprise use explained.

Licence Proprietary
First release August 2025 (Cursor CLI beta)
Interfaces Terminal (CLI), GitHub Actions/CI, SDK (TypeScript, Python)
Platforms macOS, Linux, Windows (PowerShell/WSL)
Instruction file AGENTS.md (also .cursor/rules)

The seven building blocks in Cursor Agent CLI

How Cursor Agent CLI implements the building blocks of an AI harness

  1. 1

    Agent loop

    The terminal agent calls the model, executes its tool calls, and works in three modes — Agent, Plan and Ask — switchable via slash command or the --mode flag.

  2. 2

    Tools and execution environment

    Per the documentation, Agent has tools for file operations, search, shell commands and web access; the Model Context Protocol (MCP) adds further tools via an mcp.json configuration.

  3. 3

    Context management

    Project rules live as .mdc files under .cursor/rules or as a simplified AGENTS.md; user rules apply globally, and per the documentation, team rules take precedence over project rules, which take precedence over user rules.

  4. 4

    State and memory

    agent ls lists previous sessions, and agent resume or --continue/--resume continues the latest or a specific conversation.

  5. 5

    Permissions

    Command execution can be controlled via /sandbox or --sandbox <mode> (enabled/disabled); per the documentation, sudo commands prompt for the password through a masked channel that keeps it from the model.

  6. 6

    Verification and feedback

    Checkpoints, per the documentation, are automatic snapshots of the files the agent changed, and the workspace can be restored to one; they explicitly do not replace version control such as Git.

  7. 7

    Orchestration

    Subagents are, per the documentation, scoped agent runs delegated from the main thread with their own rules, MCP servers and skills; background tasks can additionally be handed off to Cloud Agents.

Models and model access

Which models the harness uses and how they are obtained

Models and model access
Models model selection via --model or /model, including OpenAI GPT, Anthropic Claude and Google Gemini models as well as Cursor's own models
Access routes Cursor (hosted), own API key for OpenAI, Anthropic, Azure or AWS Bedrock
Free choice of model Yes
Custom endpoint / LLM gateway No
Per Cursor's documentation, you can add your own API keys for chat models 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. A concrete configuration path for a freely chosen endpoint URL is not documented in detail for the CLI.
Features
MCP servers Sub-agents Hooks Skills Plugins / extensions Sandbox Headless / CI SDK IDE integration Checkpoints Resume sessions
Running it with herdr
Supported by herdr Yes
State detection Screen manifest
Integration Session
herdr's agent overview lists Cursor Agent CLI as detected via a screen manifest, without using lifecycle hooks.
More about herdr →

Enterprise use

Data processing, controls and pricing model according to the vendor

Data processing and Privacy Mode

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.

Identity and SSO

Team and Enterprise plans offer, per the vendor, SAML/OIDC SSO; per the documentation, SCIM provisioning is reserved for Enterprise customers.

Admin policies

Per the documentation, team and enterprise admins can enforce Privacy Mode team-wide, restrict models by data-retention policy, and distribute MCP servers centrally through a team marketplace.

Cloud Agents and data storage

Per the documentation, Cloud Agents are the only feature that persistently stores code with Cursor, since they need repository access over time; local CLI sessions without Cloud Agents are not covered by this.

Pricing model

Cursor offers subscription plans with included usage plus usage-based billing at provider API rates for on-demand usage or a user's own key; see the vendor for current terms.

Strengths
  • One agent shared across IDE, CLI, CI/CD and SDK with consistent behaviour
  • Checkpoints allow quick reversal of agent-made file changes
  • MCP support including a team- or enterprise-wide marketplace
  • Subagents with their own rules, tools and MCP servers for scoped sub-tasks
  • Privacy Mode with documented zero-data-retention agreements for enterprise teams
Limitations
  • A concrete configuration path for a freely configurable custom API endpoint (base URL) is not documented in detail for the CLI; own keys for supported providers still route through Cursor's servers, per Cursor
  • Checkpoints only capture files the agent changed and do not replace version control

Use cases

Typical tasks for this harness

Agentic coding tasks in the terminal alongside work in the Cursor editor
Automated agent runs in GitHub Actions and other CI pipelines via print mode
Programmatic agents built on the TypeScript or Python SDK
Teams already using the Cursor editor that also need a terminal agent

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.

From developer harness to enterprise harness

Coding harnesses are tools for developers. Business users, cost control and governance need two more layers.

CompanyGPT – the harness for business users

CompanyGPT gives any language model tools via MCP servers, integrations and n8n, company knowledge via companyRAG, roles from Entra ID or Keycloak, and audit logs – operated in your Azure environment or sovereignly on STACKIT.

Discover CompanyGPT
AI Gateway – cost and governance for every agent

The AI Gateway bundles the model access of your tools and coding agents behind an OpenAI-compatible API: authentication via Entra ID, budgets and cost centres per team, user and agent, guardrails and complete logging.

View the AI Gateway

Frequently Asked Questions

What is Cursor Agent CLI?

Cursor Agent CLI is the terminal coding agent from Anysphere, the company behind the Cursor editor. It can be used interactively in the terminal, non-interactively via print mode in scripts and CI pipelines, and programmatically via an SDK, providing tools, context management and permissions around several underlying AI models.

Is Cursor Agent CLI open source?

No. Cursor Agent CLI is a proprietary Anysphere product without publicly available source code; it is installed via an install script or package manager rather than an open repository.

Which models does Cursor Agent CLI support?

Cursor Agent CLI lets you choose a model via --model or /model, including models from OpenAI, Anthropic and Google as well as Cursor's own models. For chat models you can also add your own API keys from those providers, though per the documentation requests are still routed through Cursor's servers.

Can Cursor Agent CLI be used in a GDPR-compliant way?

Cursor documents Privacy Mode with zero-data-retention agreements and enterprise features such as SSO and team-wide policies. Whether that is sufficient for a given use case depends on the chosen plan, the connected model providers, and your own record of processing activities.

Does Cursor Agent CLI work with herdr?

Yes. herdr lists Cursor Agent CLI among its supported agents and detects a running session via a screen manifest, without relying on the CLI's lifecycle hooks.

What is the difference between the Cursor editor and Cursor Agent CLI?

The Cursor editor is a standalone IDE with a built-in agent. Cursor Agent CLI is the same agent packaged as a terminal program that runs without an IDE and can additionally be used in CI pipelines and programmatically via an SDK.

Introduce coding agents safely in your company

We support selection, model access in the EU, permission design and cost control.