AI clients and agents

Argent for Cursor Agent CLI

cursor-agent shares Cursor's hooks, so Argent checks every prompt and tool action in the terminal too. Here is what Argent checks, how the hooks connect and what your team sets.

Anysphere logo
01 / AI CLIENTS AND AGENTS

What Argent does with Cursor Agent CLI

Argent governs Cursor Agent CLI where the agent acts. Cursor Agent CLI sends its model calls through Anysphere's own service, so Argent works through the tool's hooks: every prompt and every tool action is checked by Argent before it runs.

  • A named agent with a human owner. argent connect registers Cursor Agent CLI as an Argent agent under the signed-in person. Identity tethering
  • Prompts and actions checked first. Shell commands, file reads and writes, MCP calls, sub-agents and prompt submits go to the Argent decision and data-loss scan before they run. Agent permissions
  • Fails closed. If Argent cannot answer, the hook refuses the action, so an outage never turns into an open door.
  • A signed record of every decision. Allows and denies land in the signed audit ledger with the agent and owner named. One-click audit evidence
02 / AI CLIENTS AND AGENTS

How Cursor Agent CLI connects

Cursor Agent CLI reaches Argent in one way.

  • Tool hooks. Before Cursor Agent CLI runs a tool or submits a prompt, its hook asks Argent for a decision and a data-loss scan. If Argent cannot answer, the hook refuses.

One command does the setup. argent connect cursor registers a per-tool agent under the signed-in person, keeps its key only in the OS keychain, and writes the tool's own config with a backup. --revert puts the old config back. Keyless agents explains why keys stay out of config files.

Proven with the real tool. Argent's team has driven Cursor Agent CLI itself through a live Argent gateway and checked the signed records it produced.

The same steps are in the Argent console under Integrations > AI Clients, and each agent's Connect tab gives the copy-paste values for your tenant.

03 / AI CLIENTS AND AGENTS

What you configure

What your team sets in Cursor Agent CLI. These are the settings the Argent console shows for this tool. Values in angle brackets come from your tenant.

  1. Hooks. argent connect cursor (see Cursor IDE): ~/.cursor/hooks.json failClosed hooks.
  2. Config locations. ~/.cursor/cli-config.json (macOS/Linux), %USERPROFILE%\.cursor\cli-config.json (Windows); CURSOR_CONFIG_DIR overrides; project <project>/.cursor/cli.json holds permissions only.
04 / AI CLIENTS AND AGENTS

Roll it out to every machine

Make it the only way Cursor Agent CLI runs on company machines. These controls are documented by the platform each one belongs to (linked); pair them with the Argent settings above.

  • Enterprise hooks.json (shared with the IDE). Org hooks apply to the CLI too. Vendor docs
  • Managed permissions file. Distribute ~/.cursor/permissions.json (mcpAllowlist, auto-run permissions); a repo may add <workspace>/.cursor/permissions.json. Vendor docs

Argent ships the push kit. For managed fleets the console produces per-MDM scripts (Jamf, Kandji, Intune-style, shell and PowerShell) with your tenant certificate and proxy address built in, plus a fleet setup script and certificate bundle. Your company CA can sign the Argent certificate, so managed machines already trust it.

Want to see which AI tools people already run before you push anything? Start with Shadow AI discovery in watch mode. Watch before you enforce

05 / AI CLIENTS AND AGENTS

Check that it works

Send one request and look for the signed row. Ask Cursor Agent CLI to run a harmless shell command. The Argent console live stream shows a signed hook decision for the prompt and one for the command, under the agent's name.

argent doctor cursor checks the certificate pin, the keychain entry, the relay and the gateway's answer, without printing any secret.

Every hook decision also appears on the live stream with the agent's name and owner.