The macOS agent captures LLM usage metadata using Apple’s Network Extension framework. It reads only SNI hostnames, byte counts, and request timing from TLS connections — it never decrypts traffic or inspects content.Documentation Index
Fetch the complete documentation index at: https://docs.toktra.dev/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
- macOS 13 Ventura or later
- Apple Developer Team ID (required for system extension signing and MDM deployment)
- MDM solution: Kandji or Jamf (recommended for fleet deployment)
How it works
The agent consists of two components:- ToktraAgent — The host application that runs in the system tray, manages device enrollment, and schedules telemetry flushes.
- ToktraExtension — An
NEFilterDataProviderNetwork Extension that observes outbound TLS connections. It extracts the SNI hostname from the TLS ClientHello to identify LLM provider traffic. It never decrypts the connection or reads request or response bodies.
The Network Extension operates at the TLS SNI level only. No prompt content, response text, or decrypted traffic ever leaves the device.
Installation
- MDM (recommended)
- Manual (.pkg)
Silent deployment via Kandji or Jamf is the recommended approach for fleet rollout. The MDM profile pre-approves the system extension so users see no security prompt.
Obtain the installer package
Download the notarized
.pkg installer from the Downloads section of your Toktra admin dashboard, or contact your account team. The package is pre-signed and notarized with Apple.Prepare the MDM profile
Open The profile pre-approves:
agent-macos/MDM/com.toktra.agent.mobileconfig and replace every instance of TOKTRA_TEAM_ID with your Apple Developer Team ID.- The kernel extension policy
- The system extension (
com.toktra.agent.extension) - The Network Extension content filter
Push the MDM profile
Upload
com.toktra.agent.mobileconfig to Kandji or Jamf and scope it to your target devices. Push the profile before deploying the package so the extension is pre-approved on first launch.Device enrollment
On first run, the agent automatically enrolls the device with the Toktra backend:- Generates an Ed25519 key pair on-device.
- Sends a Certificate Signing Request (CSR) to the Toktra backend’s PKI enrollment endpoint.
- Receives a signed X.509 device certificate from the Toktra Intermediate CA. The certificate is valid for 90 days and stored in the macOS Keychain.
- Uses the device certificate for mTLS authentication on every subsequent telemetry transmission.
Device certificates are stored in the system Keychain under the
com.toktra.agent service name. They are scoped to the device and cannot be used to authenticate as any user.Configuration
The agent reads its configuration from theToktraDomain key in UserDefaults. Set this key via an MDM profile (recommended) or manually with defaults write.
Via MDM profile
Add a managed preferences payload to your MDM profile targetingcom.toktra.agent:
Via defaults write
For testing or manual configuration, write theToktraDomain key directly:
Privacy hours
Privacy hours let you define a recurring schedule during which the agent pauses monitoring. This is intended for personal use time outside of work hours. Configure privacy hours from the system tray: click the Toktra icon → Privacy Hours → Configure Schedule. You can also configure them via MDM by addingPrivacyHoursStart and PrivacyHoursEnd keys (24-hour format) to the com.toktra.agent managed preferences:
Personal mode (Token Perks)
If your organization has Token Perks enabled, employees can toggle Personal Mode to track personal AI usage separately from corporate usage. Personal usage data is encrypted with a per-user key and never enters the corporate analytics pipeline. Toggle Personal Mode from the system tray: click the Toktra icon → Personal Mode. When Personal Mode is active, a distinct indicator appears in the menu bar icon.Budget enforcement
When department budget hard caps are configured, the agent enforces them with a budget status indicator in the menu bar.- The menu bar icon shows remaining budget status at a glance.
- When a user is over budget, the agent blocks over-budget requests.
- The status view displays the current period’s spend, remaining allocation, and limit type (soft cap warning vs. hard cap block).
Logs
The agent writes logs to/var/log/toktra/:
| File | Contents |
|---|---|
/var/log/toktra/agent.log | Standard output |
/var/log/toktra/agent-error.log | Standard error |