Skip to main content
Connect your AI

The endpoint agent on a Mac

The endpoint agent also runs on Macs with macOS 15 or newer, on Apple silicon and on Intel. This page says how to install it on a Mac and what is different from Windows. What the agent does is in The…

Written By Christopher Scaminaci

Last updated About 15 hours ago

The endpoint agent also runs on Macs with macOS 15 or newer, on Apple silicon and on Intel. This page says how to install it on a Mac and what is different from Windows. What the agent does is in The StackJack endpoint agent, and the choices you make are in Endpoint agent policy.

At a glance

  • What it does: the same work as on Windows: it finds AI apps and tools, keeps your managed AI settings in place and, on Pro and higher, controls them.
  • Plan: every plan finds AI. Control needs the Pro plan or higher.
  • Who: an Administrator.
  • Where: AI Governance → Coverage → Install, on the Endpoint agent card, which shows a macOS item once StackJack has published the Mac package of your release. While an enrollment key is shown on the Install tab of the Endpoint agent page, the same item there also offers the two files that hold the key.

Before you start

  • Each Mac needs macOS 15 or newer. One package serves Apple silicon and Intel Macs.
  • The Endpoint agent card of the Deploy to staff computers page shows the item macOS: one package for Apple silicon and Intel Macs only when the agent's released version has a Mac package. It shows the package, the script and the profiles of the organization the card shows, the one you picked included. If you do not see it, your release has no Mac package yet, and there is nothing to install on a Mac. Your Windows package is not affected.
  • Every Mac package is signed with StackJack's Apple Developer ID (MSP Automator Labs LLC) and notarized by Apple, also for your own brand. Your brand's name, icon and menu bar image are inside the app. Set the two Mac images on the Branding tab; without them the app uses the largest image of your Windows icon, and the menu bar shows a neutral shield.

Install it

The macOS item gives three ways. Pick the one that fits how you manage the Mac.

  1. The package. For an MDM or an RMM that deploys packages. Check the SHA-256 the page shows before you upload it. The package installs the app as /Applications/<your product name>.app. Give the enrollment key with the enrollment profile (way 3), or in a file named enrollment.key beside the package. The page also shows the command for one Mac: sudo installer -pkg "<package file>" -target /.
  2. The script. For an RMM that runs shell scripts. The script downloads the package, checks its SHA-256, its Apple signature and Team ID, and Gatekeeper, and only then installs it. It reads the key on standard input, never as an argument: sudo sh ./install-stackjack-agent.sh < enrollment-key.txt. While a key is shown on the Install tab of the Endpoint agent page, you can also download the script with your key inside there, for an RMM that cannot pass standard input. The script ends with one of these codes: 0 installed, 30 the download failed, 31 the SHA-256 did not match, 32 the signature, the Team ID or Gatekeeper did not pass, 33 the installer failed, 64 no enrollment key.
  3. The profiles, for an MDM. The permissions profile lets the agent run its login items and show notices with no prompt, and turns on the paste check's permissions except Input Monitoring (see below). It is the same for every organization and needs user-approved MDM. StackJack's Intune and Jamf Pro delivery sends it with your managed settings; in Addigy, upload it once as a custom profile and assign it to your policies. The enrollment profile gives the agent your key; it holds the key, so you download it on the Install tab of the Endpoint agent page while a key is shown there. On macOS 27 and newer, a supervised Mac takes the privacy declaration in place of the profile's Accessibility grant.

An RMM can also give the key to an agent that is already installed, on standard input: sudo stackjack-agent set-enrollment-key < enrollment-key.txt. A Mac that enrolled shows on the Devices tab with its platform, like a Windows computer.

The permissions a Mac asks for

The paste check needs three permissions: Accessibility and Input Monitoring, so the agent sees a paste, and the permission to send keystrokes, so it can let a checked paste through. Notices need the notification permission. The permissions profile turns on Accessibility, sending keystrokes and notices with no prompt. No profile can turn on Input Monitoring: the permissions profile lets the person at the Mac turn it on in System Settings → Privacy and Security → Input Monitoring, also without administrator rights. Without the profile, a person with administrator rights allows the others in System Settings → Privacy and Security too. Until they are allowed, the Devices tab says what is off on that Mac, for example "Paste check off: the Accessibility or the Input Monitoring permission is missing". The agent still finds AI and keeps your settings without them.

Where each list is in System Settings depends on the macOS version. On macOS 27, the Privacy and Security page has no entry named Accessibility. The permission that macOS 15 and macOS 26 call Accessibility is in the entry Device control and data access. The app is listed directly in that entry. Input Monitoring is a separate entry on the same page.

PermissionmacOS 15 and macOS 26macOS 27
AccessibilityPrivacy and Security → Accessibility. You may need to scroll down.Privacy and Security, then Device control and data access (macOS 27 has no entry named Accessibility).
Input MonitoringPrivacy and Security → Input Monitoring. You may need to scroll down.Privacy and Security, then Input Monitoring.
NotificationsNotifications, in the sidebar of System Settings.Notifications, in the sidebar of System Settings.

If the app is not in one of these two lists, add it by hand:

  • Accessibility on macOS 15 and macOS 26, or Device control and data access on macOS 27.
  • Input Monitoring.

To add the app, click + below the list. Then select /Applications/<your product name>.app. On macOS 27 this can be necessary for Input Monitoring.

What is different on a Mac

  • The paste check watches Command+V only, and only while an AI app is the window in front. It finds the V key by its place on the keyboard, so on a layout that moves V to another key, such as Dvorak, the paste is not checked.
  • Firefox settings. When your managed settings include the Firefox extension, the agent writes the StackJack entries into Firefox's policy on the Mac and keeps every entry you set there yourself. When the Mac moves to another organization, the agent removes the entries it wrote for the old organization before the new organization's settings apply. Chrome and Edge get the extension from your MDM or your own tools: see The browser extension on a Mac.
  • AI site control uses the Mac's hosts file, as on Windows.
  • The menu bar item shows the agent's state. Select the first line to see what it means and how to fix a problem. The menu also explains what the agent watches.
  • The agent's files. The app is in /Applications. Its data is under /Library/Application Support/StackJack/EndpointAgentData, and stackjack-agent status works from any terminal.

What does not run on a Mac in this release

  • The network filter and the checks of files that AI apps open. Both need macOS system extensions. They are switched off for every organization until StackJack has checked them on real Macs, so the Mac package does not hold them and the policy page shows no switch for them. A Mac checks a file that a person uploads to an AI site in a browser with the extension, like a Windows computer.
  • A driver or a kernel extension. The agent uses none, on a Mac or on Windows.

Updates

Each agent updates itself, as on Windows, and checks the Apple signature and the Team ID of each new version before it runs it. Your version hold and the RMM-only choice on the policy page work the same way. To move a Mac yourself, install the newer package over the old one; that is an upgrade and needs no uninstall code.

Signed Mac update checklist

Use a test Mac and a test organization before rolling an update out. Record both build versions and the result of each check. Hold the rollout if a check fails or has no result.

  • Start with signed build A on an enrolled Mac. Record its device ID and the checksum of its wrapped credential file. Confirm a current check-in and working Accessibility and Input Monitoring grants. Keep the person signed in.
  • Upgrade in place to signed build B through the update path you plan to roll out. Leave every enrollment key out of the update and the Mac's managed settings. The device must check in on the same device ID without enrolling again. Confirm the wrapped credential file has the same checksum and the agent can still use it.
  • Repeat the bundle update with two desktop sessions signed in. Prevent the helper from loading in one session. Confirm the new service stays healthy and completes its next update check. Allow the helper to load again. Confirm its menu returns and the other user's helper keeps running.
  • On a separate run, keep one helper unavailable and stop the new service before it becomes healthy on its first two starts. On the third start, confirm the Mac can roll back to signed build A. Check that the restored service starts and checks for updates.
  • Publish a change to the test policy after the upgrade. Confirm this Mac fetches and applies the new policy revision. Open a supported AI app. Check that the agent can check pastes with the existing grants, without asking for them again.
  • Send kill -KILL <helper-pid> to the test user's session helper while they are signed in. Confirm the menu returns and paste checks resume without a manual restart. Test Quit & Reopen when macOS offers it. Opening the app should show its status with just one service and one helper running.
  • Set the test organization's payment card rule to Live and Block for the endpoint agent. Enable paste checks and allow scanning. Once the Mac has applied this policy, use Command+V in the supported app to paste the test card number 4111 1111 1111 1111. A block notice must appear and the number must stay out of the input box.
  • Paste clean text into the same input box with Command+V. Confirm it appears once and is unchanged. With the supported app in front, run stackjack-agent status and confirm the exit code is zero.
  • Use a separate test Mac or snapshot for a second enrollment. Start with the agent signed out and leave the existing wrap key in the System keychain. Supply a fresh enrollment key and confirm the Mac checks in. When the wrap key is readable, confirm the new sign-in is wrapped. Repeat with an inaccessible wrap key. Confirm the Mac still checks in and its status says the sign-in is stored without keychain protection.

Removing the agent

The package installs an uninstaller. Run it as root with the uninstall code on standard input, never on the command line:

sudo "/Library/Application Support/StackJack/EndpointAgent/uninstall.sh" < code.txt
  • With a wrong or missing code, when your organization set one, it ends with code 77 and removes nothing.
  • It takes the agent's section out of the hosts file, removes the app, the launch items, the native messaging files and the Firefox entries the agent wrote, deletes the credential, and forgets the package. A Mac you install again must enroll again.
  • If the agent cannot remove the Firefox entries, the uninstall still finishes, and its last line ends with Firefox entries: left. Those entries stay, and so does the agent's record of which entries it wrote, so installing the agent again, or a later uninstall, can still remove them.
  • The agent's log and cached policy stay. If the agent cannot clear the hosts file, a small cleanup task stays and finishes the job, then removes itself.

Where to go next