Skip to main content
Install and Uninstall cover — as cleanly removed as installed. How AgenShield is installed and enrolled on a Mac, what the install puts on disk, and how to remove it completely.
Setting up one Mac for the first time? Follow the Quickstart instead — it covers install, the macOS approvals, and confirming the Mac is healthy, in order. Deploying to a fleet? Use the MDM guide.
Installing does not enforce anything on its own. It enrolls the Mac and starts the service; enforcement begins once the macOS approvals are granted and your organization’s policy arrives. See How AgenShield works.

Installation

AgenShield ships as the signed AgenShield.app bundle plus the agenshield command-line tool, packaged as a signed, Apple-notarized macOS .pkg. See What gets installed for what each part is responsible for. The .pkg is published as a GitHub Release asset on agen-co/agenshield. The agenshield npm package is a thin wrapper that bootstraps the installer from that release — no large binaries ship through npm.

Campaign install (the normal path)

A security admin creates a deployment campaign in the Frontegg Portal, on the Devices page (https://portal.frontegg.com/<environment>/agen/shielded/devices). The campaign produces an install URL that carries an enrollment token. The endpoint user runs:
The campaign-served installer script does the following:
  1. Detects the platform and architecture. macOS builds are Apple silicon only — on an Intel Mac the script stops with a clear message rather than installing something that cannot run.
  2. Resolves the latest version from the agen-co/agenshield GitHub Releases API (or honors --version), then downloads the signed AgenShield-<version>-arm64.pkg from that release.
  3. Stages the enrollment token for the installer, so the package can enroll the Mac without anyone typing anything in.
  4. Runs sudo installer -pkg <pkg> -target /. In an interactive terminal the install then hands off to a guided stepper that walks the three System Settings approvals — security extension, Full Disk Access, and network filtering. Each step advances the moment the approval is detected (press Enter to re-check immediately), and it closes by confirming protection is active. Non-interactive runs — and runs with AGENSHIELD_INSTALL_HEADLESS=1 set — skip the stepper and log to /var/log/agenshield/install.log.
The campaign install does not require — or prompt for — a user login. The Mac is enrolled as a device and enforces the policy it receives without anyone being signed in, so an unattended or overnight rollout works. The person using the Mac signs in later from the AgenShield menubar, or with agenshield login, to attach their account — that is what enables rules scoped to their team, role, or group.

Manual install

npx agenshield install bootstraps a self-managed installation. On macOS it downloads the signed .pkg from the agen-co/agenshield GitHub Release and runs it. Given a backend URL and token, it enrolls the Mac exactly as the campaign install does.

Windows

A security admin creates a deployment campaign in the Frontegg Portal the same way as for macOS. The campaign produces an install link; on Windows, run it from a PowerShell window:
If the window is not already elevated, the install script requests administrator approval itself (a standard Windows permission prompt) before continuing — you do not need to right-click “Run as administrator” first. The script:
  1. Checks that the machine is 64-bit Windows — AgenShield for Windows does not yet support 32-bit or ARM devices, and the script stops with a clear message on those rather than installing something that cannot run.
  2. Resolves the latest version for your organization’s release channel (or a pinned version), downloads the installer package, and verifies it against AgenShield’s release records before installing anything.
  3. Stages your organization’s enrollment token so the installer can enroll the device without anyone typing anything in — including on a machine with no one signed in yet.
  4. Installs silently, which registers AgenShield as a Windows service (so it starts automatically at boot) and installs the tray app.
As with macOS, no user login is required for protection to start. The device is enrolled and begins enforcing your organization’s policy immediately; signing in later (from the tray app) only adds rules scoped to your user, team, or group. Windows may show a publisher warning the first time you run the installer, and an unattended install that passes the enrollment token directly on the install command can fail to enroll on some non-English Windows editions — see Windows install warnings if you hit either.

What a macOS install does

For either macOS entry point above (campaign or manual install), installation performs these steps:
  1. Downloads the signed software. The app bundle and command-line tool, all code-signed and Apple-notarized.
  2. Enrolls the Mac with your organization. The device generates its own cryptographic identity locally and registers against your organization’s AgenShield backend using the enrollment token from the install link. The private half of that identity never leaves the machine, and every later request is signed with it rather than with a shared secret or bearer token.
  3. Installs the app and its extensions. /Applications/AgenShield.app is installed; launching it activates the two system extensions. See What gets installed for what each is responsible for.
  4. Starts the background service. The service is registered to run at boot, and a per-user item starts the menubar app at login. The service begins syncing your organization’s policy immediately.
No user login is required for protection to start. The Mac is enrolled as a device and enforces the policy it receives; signing in later only adds rules scoped to your user, team, or group. Afterwards, agenshield status --install reports what is installed, which components are active, and whether the Mac is enrolled.

What a Windows install does

The Windows installer performs these steps, whether run from the install link or the installer package directly:
  1. Verifies the installer. Its checksum is checked against AgenShield’s release records before anything is installed.
  2. Enrolls the device with your organization — if enrollment data is available. A token can reach the installer three ways: the install script’s staged handoff (the normal path above), a Group Policy or Intune-managed push, or a token passed directly on the installer’s command line. Whichever supplies it, the device generates its own cryptographic identity locally and registers with that token — the same model as macOS, so no shared secret or bearer token is used for later requests. Running the installer package directly, with none of those three sources present, installs the software but leaves the device unenrolled: the background service runs, but no organization policy has been pulled and nothing is protected until enrollment completes — either by supplying a token afterward, or automatically once a managed policy push arrives. See Windows install warnings if an unattended install did not enroll.
  3. Installs the background service and the tray app. The service is registered to start automatically at boot. Once the device is enrolled, it syncs your organization’s policy and enforces your organization’s network policy; the tray app gives the signed-in user status and controls.
No user login is required for protection to start. Once enrolled, the device enforces the policy it receives immediately; signing in later (from the tray app) only adds rules scoped to your user, team, or group. Enrollment state and policy for a Windows install live under %ProgramData%\AgenShield\ — the Windows analog of /opt/agenshield/config/ on macOS. Both the installer and the background service harden this directory to administrators only, and the background service independently verifies that hardening at every startup; enrollment refuses to read the staged enrollment data here until that verification passes.

Key files and locations

~/.agenshield/ holds this device’s enrollment credentials. It is created with owner-only permissions — do not loosen them, copy it between machines, or check it into a repository.

Uninstallation

The preferred path is the CLI’s own uninstall command; a campaign-served uninstall.sh and a manual fallback exist for when the binary is missing or damaged.

CLI-driven teardown (preferred)

No sudo needed — the command asks for your administrator password itself. agenshield uninstall performs a complete, ordered rollback: it stops enforcement, removes the services and configuration AgenShield created, deactivates the system extensions, removes the AgenShield certificate from the system trust store, and forgets the installer receipts. To also purge stale extension versions that macOS has marked “waiting to uninstall on reboot”:

Campaign-served uninstall.sh

If AgenShield was installed from a campaign URL, it can be removed the same way:
This delegates to agenshield uninstall --force --non-interactive and then runs the manual cleanup below as a belt-and-suspenders step, so it still completes if the CLI has been partially torn down.

Manual fallback

A last resort, not a routine path — use it only when the agenshield binary is missing or broken. On macOS, npx agenshield uninstall performs these steps automatically when the binary is gone but files remain (it removes them directly instead of bootstrapping the installer). Open the steps below only if that also fails.
Stop running services:
Deactivate the system extensions (the signed app bundle is what deactivates the extensions it activated):
Remove the CA trust and the node-ca-trust env. A leftover AgenShield root in the System keychain is a security risk, and the stale NODE_EXTRA_CA_CERTS points at a CA file that is about to be deleted:
launchctl unsetenv only affects new launches — fully quit and reopen your terminal and GUI apps (Cursor, Claude Desktop, VS Code) so they drop the stale value, or unset NODE_EXTRA_CA_CERTS in any open shell.Remove plists and directories:
Remove user state. When installed via .pkg, the background service runs as root and its files in ~/.agenshield/ are root-owned, so sudo is required:
Forget pkg receipts:

Verify a clean removal

macOS finalizes the removal of system extensions on the next reboot — until then they may show [terminated waiting to uninstall on reboot].

Troubleshooting

  • Operation not permitted on launchctl bootout — run with sudo; if it still fails, the service was already unloaded, so proceed.
  • Extension still shows [activated enabled] — the app bundle’s --uninstall-all failed (the app may already be gone). Reinstall the app and re-run the CLI uninstall, or run sudo systemextensionsctl uninstall 3R2X6557U2 com.frontegg.AgenShield.es-extension (and .network-extension) with developer mode enabled.
  • ~/.agenshield keeps being recreated — the background service LaunchDaemon is still bootstrapped; confirm the launchctl bootout step succeeded (no com.frontegg.AgenShield.daemon in sudo launchctl list).
  • agenshield install — installs or repairs a self-managed installation.
  • agenshield activate — walks through the three macOS approvals.
  • agenshield status — confirms what is running after either operation.
  • agenshield doctor --cleanup-extensions — purges stale system extensions.
  • agenshield uninstall — the authoritative removal path.
Full list: CLI reference.

Next

After installing, grant the three macOS approvals and confirm the Mac is healthy — see the Quickstart. For a fleet, follow the rollout playbook.