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
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.
Running it unattended
A fleet deployment runs the same installer through the install script in your campaign’s MDM guide in the Frontegg Portal. The script downloads the whole installer before running it, so a failed download fails the MDM job instead of reporting success. If you are rolling out to managed Macs, start at MDM enrollment — it covers the profile you push alongside it. What follows is the mechanism. MDM script runners execute it directly — JumpCloud Commands, Kandji custom scripts, Mosyle custom commands, Jamf policy scripts, Intune shell scripts. Run it asroot,
which is what those runners do by default. It detects that no terminal is
attached, works out which signed-in user the Mac belongs to, installs for that
user, and hands the files back to them. No wrapper is required, and it exits
non-zero if the device does not finish enrolling, so your MDM’s result view is
trustworthy.
These variables tune that. All are optional; a normal rollout sets none.
Set them at the top of the install script from your campaign’s MDM guide:
On
AGENSHIELD_INSTALL_NO_START. It stops the installer from starting the
service itself. It does not hold the service back until you say so: the
background service is registered to start at boot, so on the next restart it
comes up regardless. And when the installer used the signed package — which it
does on any Mac that can reach the download — the service is already running by
the time the script would have checked the setting, so it changes nothing at
all. Use it when you do not want a service starting mid-provisioning; do not
rely on it to keep a Mac unprotected until a later step.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 campaign install 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
What you see during an update (macOS)
An update replaces the network extension and restarts the background service, so connections that are open at that moment can drop briefly. AgenShield tells the signed-in user with one notification that updates itself instead of stacking a new one for each step:
An update that someone starts on the Mac — from the menu bar, the dashboard, or
by running the installer — skips the one-minute warning. When nobody is signed
in, the update runs at once and the result is shown at the next sign-in within a
day. The
notifications follow the user’s Focus and notification settings for
AgenShield.
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.
Apps that were already open during uninstall (terminals, IDEs) still point at
~/.agenshield/ca-bundle.pem until you restart them. So that they keep working
over HTTPS, uninstall leaves that one file in place with the AgenShield
certificate removed; the other trusted roots it held, including any your
organization deploys, stay. Apps opened afterwards do not use it. Delete it once
you have restarted those apps.
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 command and then the manual cleanup below as a
belt-and-suspenders step, so it still completes if the command line tool has
been partially removed.
Unattended, through your MDM
Your MDM runs the uninstall script from the Uninstall section of your campaign’s MDM guide in the Frontegg Portal, as a script that runs as root:
A failed download exits with curl’s own code. Curl only rarely uses
1 or 2 (an unsupported protocol, or a
failure to start), so if your MDM reports one of them and its log shows no AgenShield output, the script never ran.
Then remove the AgenShield configuration profile from those Macs in your MDM.
Uninstalling never removes a profile your MDM installed, and the root
certificate that profile delivers stays trusted until the profile is removed.
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 CA environment variables. A leftover AgenShield root in
the System keychain is a security risk, and the CA variables AgenShield set point at
files that are about to be deleted. Left behind, they break HTTPS for curl, git,
Python and Node in every app you open afterwards:Remove user state. When installed via If you cannot restart your open apps right away, give them a CA bundle that
holds only the macOS public roots, so they keep working over HTTPS:Forget pkg receipts:
launchctl unsetenv only affects new launches — fully quit and reopen your
terminal and GUI apps (Cursor, VS Code, JetBrains IDEs, Claude Desktop) so they drop
the stale values, or run
unset NODE_EXTRA_CA_CERTS SSL_CERT_FILE REQUESTS_CA_BUNDLE CARGO_HTTP_CAINFO GIT_SSL_CAINFO
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).
Windows uninstall
Earlier Windows releases, up to and including the current beta, stop
agenshield uninstall at once with a sudo error and remove nothing. Use the
campaign’s uninstall command or Apps & features on those versions. The full
Windows removal described here is in the release after 2026.11.0.agenshield uninstall (preferred)
Open PowerShell or Terminal with Run as administrator, then run:
- Signs the device out of your organization.
- Removes protection from your agents and restores your agent CLIs.
-
Uninstalls the AgenShield package — the same removal Apps & features runs —
which stops the background service, removes the security driver, and then
removes what AgenShield added to every user profile on the device, signed in
or not: the
%LOCALAPPDATA%\AgenShieldand%APPDATA%\AgenShieldfolders, and the certificate settings AgenShield wrote into theenvblock of Claude Code’s~/.claude/settings.json. A setting is removed only when it holds the value AgenShield wrote:NODE_EXTRA_CA_CERTSwhen it points at AgenShield’s certificate copy in that profile,%LOCALAPPDATA%\AgenShield\certs\mitm-ca.pem;CLAUDE_CODE_CERT_STOREwhen it isbundled,system;CLAUDE_CODE_CLIENT_CERT,CLAUDE_CODE_CLIENT_KEYandCLAUDE_CODE_CLIENT_KEY_PASSPHRASEwhen they equal the device-wide (system) environment variables of the same name, which AgenShield passed through. A variable set only in a user’s own environment does not count.
AppDataorLocalAppDatafolder, the folder is cleaned where it actually is, and at its default location too: on another local drive only when that user owns it, never solely because the Administrators group owns it. Windows and machine-program folders and other users’ profiles are never deleted through a redirected user setting. A folder left on a network share, or owned by another account, is named so you can delete it by hand if it is AgenShield’s. For signed-out users, or when the folder’s real location cannot be determined, only the defaultAppDatalocations are checked. The command says so once: whereAppDatais redirected, delete those users’ redirectedAgenShieldfolders by hand, or have them run the uninstall command themselves. -
Removes the leftover folders (
C:\Program Files\AgenShield,C:\ProgramData\AgenShield, and AgenShield’s system-account state) and the local accounts AgenShield created. - Lists each user profile it cleaned, or left and why. Run as yourself, it then checks your own profile once more.
- Lists anything it could not remove under Still present:.
PATH too, signed in or not. Releases up to
and including 2026.11.2-beta.16153937 could not do this for a signed-out user
with a routed agent: the removal then failed and Windows Installer put
AgenShield back.
Steps 3 and 4 run as a one-time Windows scheduled task, so the terminal window
may close while the package is removed: removal continues and writes its
outcome to a result file under
C:\Windows\System32\config\systemprofile\AppData\Local\AgenShieldUninstall\,
readable only by administrators. The command prints that file’s path before
the package is removed. Removal needs the AgenShield installation’s own files:
if they are missing or damaged, or removal does not start within two minutes,
nothing is removed. The command then prints the package’s msiexec /x command
as a suggestion; on a damaged installation use Apps & features (below) or
contact support.
If it reports restart Windows to finish (Windows Installer exit code
3010), restart to complete the removal.
If it reports that the AgenShield certificate is still trusted, run the
campaign’s Windows uninstall command (below) to remove it.
The campaign’s Windows uninstall command
The campaign detail view in the Frontegg Portal also offers a Windows Uninstall command. Paste it into a new PowerShell window of its own: the command ends by closing the window it runs in, with the command’s exit code. It asks for administrator approval itself if the window is not already elevated. See Install Campaigns for what it reports.Apps & features or msiexec /x
Removing AgenShield from Settings → Apps → Installed apps, or with
msiexec /x, also works, but:
- it does not sign the device out of your organization — revoke the device in the Frontegg Portal afterwards (see Enrolled devices);
- it can leave
C:\ProgramData\AgenShieldand the local accounts AgenShield created behind. Runagenshield uninstallfirst when you can. It does remove the certificate settings and AgenShield folders from user profiles, as above; what it leaves is recorded only in the Windows Installer log.
3010.
After removal
- Cloud sign-out failed, or the device still appears in the Frontegg Portal — revoke it there.
- Policy delivered by MDM or Group Policy is kept. Uninstall does not touch it; remove the assignment from your management tool.
Verify a clean removal (Windows)
In PowerShell: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.