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.
Installation
AgenShield ships as the signedAgenShield.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:
- 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.
- Resolves the latest version from the
agen-co/agenshieldGitHub Releases API (or honors--version), then downloads the signedAgenShield-<version>-arm64.pkgfrom that release. - Stages the enrollment token for the installer, so the package can enroll the Mac without anyone typing anything in.
- 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 withAGENSHIELD_INSTALL_HEADLESS=1set — skip the stepper and log to/var/log/agenshield/install.log.
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:- 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.
- 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.
- 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.
- Installs silently, which registers AgenShield as a Windows service (so it starts automatically at boot) and installs the tray app.
What a macOS install does
For either macOS entry point above (campaign or manual install), installation performs these steps:- Downloads the signed software. The app bundle and command-line tool, all code-signed and Apple-notarized.
- 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.
-
Installs the app and its extensions.
/Applications/AgenShield.appis installed; launching it activates the two system extensions. See What gets installed for what each is responsible for. - 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.
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:- Verifies the installer. Its checksum is checked against AgenShield’s release records before anything is installed.
- 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.
- 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.
%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
Uninstallation
The preferred path is the CLI’s ownuninstall command; a campaign-served
uninstall.sh and a manual fallback exist for when the binary is missing or
damaged.
CLI-driven teardown (preferred)
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: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 theagenshield 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.
Manual removal steps — advanced, run in order
Manual removal steps — advanced, run in order
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 Remove user state. When installed via Forget pkg receipts:
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:.pkg, the background service runs as root and
its files in ~/.agenshield/ are root-owned, so sudo is required:Verify a clean removal
[terminated waiting to uninstall on reboot].
Troubleshooting
Operation not permittedonlaunchctl bootout— run withsudo; if it still fails, the service was already unloaded, so proceed.- Extension still shows
[activated enabled]— the app bundle’s--uninstall-allfailed (the app may already be gone). Reinstall the app and re-run the CLI uninstall, or runsudo systemextensionsctl uninstall 3R2X6557U2 com.frontegg.AgenShield.es-extension(and.network-extension) with developer mode enabled. ~/.agenshieldkeeps being recreated — the background service LaunchDaemon is still bootstrapped; confirm thelaunchctl bootoutstep succeeded (nocom.frontegg.AgenShield.daemoninsudo launchctl list).
Related commands
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.