Why the agent needs macOS
A model's API can run anywhere, but the tools an agent operates may not. Xcode and the iOS Simulator, Safari, Shortcuts, AppleScript and the Accessibility interfaces that let a program read and click another app's windows exist only on macOS. An agent that builds iOS apps, tests in Safari or works in Mac apps has to run on a Mac.
A rented machine also keeps the agent away from your own computer. It works in a fresh virtual machine with an administrator account, renter, and nothing of yours on it except what you copy there.
A day to try it, 30 days to keep it running
Start with a day lease to check that your agent and its tools work on the machine. For an agent that should run around the clock, a month is the cheapest rate for the time. On an M4 with 12 GB of memory for the renter, Standard tier, a day costs $3.12 and 30 days cost $52 at current list prices.
Auto-renewal is on by default and renews 10 minutes before the period ends. A renewal keeps the same machine without restarting it, so a running agent carries on into the next period. A different lease always gets a fresh machine. See Billing and renewal for when a renewal does not go through, and the lease term guide to compare terms.
Connect, and grant permissions in the desktop
Open the lease with NVTO Connect: the app for Mac, or nvto-connect open <lease-id> on macOS, Windows or Linux. Use SSH to copy the agent's files and install its runtime. Use the remote desktop for anything macOS asks you to approve on screen.
Agents that read the screen or control other apps need Accessibility and often Screen Recording, granted in System Settings under Privacy & Security. macOS asks for this approval in the desktop. Permissions belong to the app that runs the agent, such as Terminal or your agent's own app, so start the agent from that app, or approve the program the launch agent runs. Open the remote desktop, start the agent once and approve each prompt. Connecting covers viewers for Windows and Linux and the remote desktops for slow lines.
Keep the agent running when you disconnect
Disconnecting NVTO Connect closes your SSH and remote desktop sessions, but the machine keeps running. A program started in a plain SSH session usually stops when that session closes. Use one of these instead.
tmux, for an agent you watch now and then
tmux keeps a terminal session on the Mac after SSH disconnects. It is not part of macOS: the tmux.sh recipe in Set up your machine installs it. It does not survive a restart of the machine.
# once: install tmux (Homebrew), then start a named session
$ brew install tmux
$ tmux new -s agent
# start the agent inside it, detach with Ctrl-b d; later, from a new SSH session
$ tmux attach -t agentA launch agent, for an agent that should restart itself
A launch agent in ~/Library/LaunchAgents runs in the renter login session, starts when that user logs in and, with KeepAlive, is started again if it exits. Because it runs in the login session, it can work with the desktop and the permissions granted there.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>com.example.agent</string>
<key>ProgramArguments</key>
<array><string>/Users/renter/agent/run.sh</string></array>
<key>WorkingDirectory</key><string>/Users/renter/agent</string>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
<key>StandardOutPath</key><string>/Users/renter/agent/agent.log</string>
<key>StandardErrorPath</key><string>/Users/renter/agent/agent.log</string>
</dict>
</plist># load the agent into the renter's login session and check it
$ launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.example.agent.plist
$ launchctl print gui/$(id -u)/com.example.agent
# stop it and unload it
$ launchctl bootout gui/$(id -u)/com.example.agentThe virtual machine can restart, for example if the owner's Mac restarts after a power cut or an update. A launch agent starts again once renter has logged in, which the machine does by itself at startup; after a restart, check it with launchctl print. ~/Private stays locked after a restart until NVTO Connect connects again, so keep files the agent needs at startup outside it, or connect to unlock it. See what happens when a rented Mac goes offline.
Give the agent credentials you can afford to lose
The Mac's owner can reach the running virtual machine. NVTO Node holds a key to a hidden administrator account inside it, and the owner controls the host. The acceptable use policy forbids owners to look, but that is a rule, not a technical barrier. Assume that any API key, token, cookie or password the agent uses on the machine can be read, including files in ~/Private while the machine runs. The security model states this in full.
- Use dedicated keys. Create API keys for this machine only, never your personal key or one shared with other systems.
- Scope them. Give each key only the permissions and projects the agent needs. Use a separate account with test data where the service allows it.
- Cap spending. Set a usage or spend limit on model and cloud API keys so a leaked key cannot run up a large bill.
- Keep them revocable. Prefer short-lived tokens. Note where each key is used so you can revoke it quickly.
- Revoke at the end. When the lease ends, or if you suspect misuse, revoke every key the agent used and sign out of every account it logged in to.
Plan for the end of the lease and follow the rules
When the lease ends, the machine stops being reachable within seconds and its disk is deleted from the owner's Mac. NVTO does not back up rented machines. Keep the agent's code, setup script, launch agent file and the state it needs in a repository or storage you control, so you can rebuild it on a new lease. Copy off logs and output you want to keep before the end.
A rented Mac is a work machine, not a network exit. Under the acceptable use policy, an agent must not use it as a proxy, VPN or residential IP, to appear to be somewhere else to get round a service's regional restrictions, to run many accounts where one is allowed, or to scrape in breach of a site's terms. Scanning, spam and floods are also forbidden. NVTO Node cuts off a machine it sees scanning or flooding, the lease ends without a refund and the account is frozen.