AI machines
An AI machine is a computer that runs models with Ollama, such as a Mac mini, and serves them to your applications. It never runs applications and is never reachable from the internet: the machine dials out to Orbit, and only applications inside the cluster can call it.
What you need
- A Mac with Apple silicon, with Ollama installed and open, and at least one model pulled, for example
ollama pull qwen3:8b. - The Mac reaches your console's address over HTTPS. Nothing is opened on the Mac or on your router.
- An administrator of the installation adds the machine.
Add a machine
- Open AI machines → Add machine, give it a name and choose Make the command.
- In the Mac's Terminal, run the command the console shows. It works once, within an hour, and needs no
sudo. It:- downloads the agent from your Orbit and checks its SHA-256 before running it;
- trades the one-time token for the machine's own key, kept in
~/Library/Application Support/Orbit/ai-machine.json; - installs the agent in
~/.orbit-ai/binas a launchd agent (~/Library/LaunchAgents/com.getcortexlabs.orbit-ai.plist), so it starts at login and restarts if it stops. Its log is~/.orbit-ai/logs/orbit-ai.log.
- The machine shows Online with its models, their size, quantization and what they can do (text, tools, vision, thinking, embeddings).
Use it from an application
- On the machine's page, under Projects with access, check the projects whose applications may use it and choose Save projects.
- In the application, open Variables. Under AI machines for this project, pick the machine, keep the name
OLLAMA_HOSTor change it, and choose Use the machine. AddOLLAMA_MODELas a plain variable if the application reads it. - Apply the change and deploy.
At deploy time the reference becomes this project's own address, http://orbit-ai.orbit-system.svc/ai/<machine>.<project>.<secret>. It is never stored in the application's variables, and it only answers that project's applications:
- Another project calling it, even with a copy, gets
403. - Taking a project off the list stops its address at once with
403; the other projects keep working. A deploy of its applications then fails until the project is back on the list or the reference is removed. - The machine's page lists the applications that refer to it, under Applications using it.
Orbit tells the projects apart by the address a call comes from, which is the calling pod. A project's address therefore answers calls from that project's applications on the cluster, not from a process on a server's own network.
Most clients take it as their base URL:
import os
from ollama import Client
client = Client(host=os.environ["OLLAMA_HOST"])
reply = client.chat(model=os.environ["OLLAMA_MODEL"], messages=[{"role": "user", "content": "Hello"}])- LangChain:
ChatOllama(base_url=os.environ["OLLAMA_HOST"], model=...). - OpenAI compatible clients: use
OLLAMA_HOSTfollowed by/v1as the base URL, with any API key.
What an application can do:
- Allowed: generate, chat and embed (
/api/generate,/api/chat,/api/embed,/api/embeddings), read models (/api/tags,/api/show,/api/ps,/api/version), and the OpenAI compatible/v1/chat/completions,/v1/completions,/v1/embeddings,/v1/modelsand/v1/responses. - Refused with 403: pulling, pushing, creating, copying and deleting models. Manage models on the Mac.
- Streaming: answers arrive as Ollama writes them. A request can carry up to 64 MiB, enough for images sent to vision models.
- When the Mac is off or asleep: the call answers
503saying the machine is not connected. It works again as soon as the Mac is back, with nothing to change. - Only from inside the cluster: the same path on the console's public address is refused.
The shared address
Machines also have one address for the whole machine, from before projects had their own. Any application in the cluster that has it can use the machine, so prefer references. Show address gives it as ready variables, and Turn off stops it once Applications using it shows nobody calling it recently. Applications that still use it get 403 from then on, and Turn it back on restores the same address.
Replace addresses gives the machine a new shared address and every project a new one. The previous ones stop at once; applications with a reference pick up their new address on their next deployment.
Keep it available
Start at login or at boot
The add dialog offers two ways to start:
- At login, the default: the agent starts when you sign in to the Mac, with no
sudo. After a restart, nothing comes back until someone signs in, unless automatic login is on. - At boot: the command ends with
--at-bootand asks for the Mac's password once.- It installs the agent as a launchd daemon (
/Library/LaunchDaemons/com.getcortexlabs.orbit-ai.plist) andollama serveas another (com.getcortexlabs.orbit-ai.ollama.plist). Both run as your user, before any login. - Quit the Ollama app and remove it from System Settings → General → Login Items, so a second copy does not start when you sign in.
- It installs the agent as a launchd daemon (
To change how a connected Mac starts, choose New connection command and run it with the other option.
What the page shows
Availability on the machine's page says how it comes back after a restart, as the Mac reports it:
- whether it starts at login or at boot;
- automatic login;
- whether it starts up after a power failure;
- system sleep;
- FileVault.
It warns about each one that would leave the machine offline:
- Starts at login without automatic login: nothing returns after a restart until someone signs in.
- Sleep: a Mac that sleeps stops answering. On a Mac mini, turn on Prevent automatic sleeping when the display is off in System Settings → Energy.
- Power failure: turn on Start up automatically after a power failure in the same place. Only desktops have it.
- FileVault: with it on, an unplanned restart waits for the disk password at the Mac, and nothing starts before that, not even at boot.
Keep the model in memory
Ollama unloads a model five minutes after its last call, and the next call waits for it to load again, many seconds for a large model. Keep the model in memory on the machine's page changes that to an hour or to always.
Orbit adds it as keep_alive to generate, chat and embed calls that do not set their own. A call that sets keep_alive keeps it. The OpenAI compatible /v1 paths keep Ollama's default.
Status
- Online: while the agent keeps asking Orbit for calls.
- Offline: after 75 seconds without hearing from it.
- Waiting to connect: until the first connection.
- When Ollama does not answer, the page says so while the agent stays connected.
Agent updates
The agent on the Mac follows the Orbit it is connected to. After Orbit updates, the agent learns the new version from its next report, within 30 seconds, and updates itself:
- It downloads the new agent from Orbit while it keeps serving calls, and checks it against the SHA-256 Orbit announces.
- It stops taking new calls and lets the calls in flight finish, for up to two minutes. It never updates in the middle of a call it can wait for.
- It replaces its own binary and exits, and launchd starts the new version a few seconds later. Applications that call in that gap get
503and can retry.
The machine's page shows the agent's version, with updating to and the new version while the update runs. When the download does not match its checksum or the binary cannot be replaced, the current version keeps running, the page says why and the agent tries again within an hour. An agent too old to talk to this Orbit is refused, and the page asks you to run the connection command again from Connection.
Agents installed before Orbit 0.2.46 do not update themselves. The page says a new agent is available; run the connection command from Connection once, and the agent follows Orbit from then on.
Try a model
Administrators can test a machine from its page, without writing an application. Try a model lists the models that generate text: pick one, type a prompt and send it with Send or Ctrl or ⌘ + Enter. The answer streams in as the model writes it. For a model that sees images, you can attach one image of up to 10 MB.
The prompt takes the same path as an application's call: Orbit, the agent on the Mac, Ollama and the model. An answer proves the whole path works. Under it the page shows:
- First token: the time from sending to the first words, as the browser measured it.
- Tokens per second: how fast the model wrote, from Ollama's own count.
- Answered by: the machine.
- Model: how long Ollama took to load it, or that it was already in memory.
Nothing is stored: the prompt and the answer stay in your browser and are gone when you close the page. When the machine is offline the panel says so and does not send. When it drops after the page loaded, the panel says the Mac is not connected after about ten seconds. When the Mac takes the prompt but does not answer within a minute, for example while a large model loads, the panel says so and you can send again.
Warnings
Orbit warns about AI machines like it does about servers. The warnings show on the machine's card and go to the channels that follow them:
- Offline: the machine has not reached Orbit for 10 minutes. The message gives the likeliest reason it knows.
- Ollama not answering: the agent is connected, but Ollama has not answered for 2 minutes.
- Model missing: for 5 minutes, a model that applications asked the machine for in the last day is not in its list, for example after
ollama rmor a typo in the application. Orbit remembers the models asked for, per machine, from the calls themselves.
Move or remove a machine
New connection command makes a new one-time command, to reinstall the agent or move to another Mac. The current Mac keeps working until the new one connects.
Remove machine stops its key and its address at once. To uninstall the agent from the Mac:
shlaunchctl bootout "gui/$(id -u)/com.getcortexlabs.orbit-ai" sudo launchctl bootout system/com.getcortexlabs.orbit-ai sudo launchctl bootout system/com.getcortexlabs.orbit-ai.ollama sudo rm -f /Library/LaunchDaemons/com.getcortexlabs.orbit-ai.plist /Library/LaunchDaemons/com.getcortexlabs.orbit-ai.ollama.plist rm -rf ~/.orbit-ai ~/Library/LaunchAgents/com.getcortexlabs.orbit-ai.plist "$HOME/Library/Application Support/Orbit/ai-machine.json"The
sudolines are only needed after an install at boot; the ones that find nothing say so and change nothing.
Coming from an SSH tunnel
If you reached Ollama with ssh -R to a server, add the machine here, wait for Online, point the application at the new address, and then stop the tunnel. The agent needs no SSH key on the server.
How it works
The agent never listens on the network. It asks Orbit for calls over the console's HTTPS address, runs each one against Ollama on 127.0.0.1:11434, and sends the answer back in short uploads every 100 milliseconds or so. That keeps long generations alive behind the proxy's timeouts. Inside the cluster, the orbit-ai service in orbit-system points at the active Orbit, which hands each call to the machine. With more than one server, both follow the active Orbit.