
Argent for Cursor
Argent hooks check every Cursor prompt, shell command, file read and MCP call before it runs. Here is what Argent checks, how the hooks connect and what your team sets.
What Argent does with Cursor
Argent governs Cursor where the agent acts. Cursor 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 connectregisters Cursor 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
How Cursor connects
Cursor reaches Argent in one way.
- Tool hooks. Before Cursor 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 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.
What you configure
What your team sets in Cursor. These are the settings the Argent console shows for this tool. Values in angle brackets come from your tenant.
- Hooks (content control).
argent login && argent connect cursorwrites ~/.cursor/hooks.json (version 1) with failClosed hooks: beforeShellExecution, beforeMCPExecution, beforeReadFile, preToolUse, beforeSubmitPrompt, subagentStart ->argent hook cursor --scope user.
Roll it out to every machine
Make it the only way Cursor 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 (MDM-deployed, highest priority) (macOS). Org-wide Argent hooks that run before every shell/MCP/file action and prompt submit; priority is enterprise > team > project > user; failClosed:true blocks when the hook cannot answer. Vendor docs
- Enterprise hooks.json (Linux). Same. Vendor docs
- Team hooks (dashboard). Cloud-synced team hooks for Enterprise teams. Vendor docs
- Cursor managed policy (Group Policy ADMX) (Windows). Lock editor policies: AllowedExtensions, AllowedTeamId (only your team may sign in, blocks personal accounts), ExtensionGalleryServiceUrl, NetworkDisableHttp2, UpdateMode, WorkspaceTrustEnabled. Vendor docs
- Cursor configuration profile (Jamf / Intune) (macOS). Same six policy keys; AllowedTeamId stops sign-in to a personal team. 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
Check that it works
Send one request and look for the signed row. Ask Cursor 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.
Where to go next
Keep going. Pages that cover the same ground from another angle.
- Use case: Securing AI coding agents
- Goals: See all AI in your company, Data loss prevention, Model control and routing, Agent identity and ownership
- Capabilities: Keyless agents, Prompt injection defense, Response screening, One-click audit evidence
- Related integrations: GitHub Copilot in VS Code, GitHub Copilot in JetBrains, GitHub Copilot in Visual Studio, Kiro IDE
- All integrations: Browse every AI client, provider, vault and identity source
Want this running on your own use cases?
Book a demo