Self-hosting open-source AI agents: whose machine runs the session
Self-hosting moves the dashboard, the database and the record onto your server. It does not settle where a session executes, and that is the layer to check first. Kortix is the open-source CompanyOS, and its own self-host runs sessions on managed sandboxes, a boundary the self-hosting docs state in one sentence; knowing that boundary, Kortix is still my pick, and I work on Kortix's marketing, so weigh that accordingly.
What the self-hosting guide lists as running off the box
Sessions run on Platinum sandboxes, not on the server, so the instance must be reachable from the internet for those sandboxes to call back.Sandboxes. Every session runs in its own Platinum sandbox. kortix-api creates it with PLATINUM_API_KEY. The sandbox calls back to the instance's public API URL, KORTIX_URL.What a session keeps. /workspace holds this session's files, kept for the life of the session. /drives/me (Drive, My files) holds the person's own files, shared across that person's sessions and kept until deleted.Drive and App volumes. Each Drive and each App volume is a Platinum volume. Its data is at Platinum, not on the server.Images. kortix/kortix-frontend, kortix/kortix-api and kortix/kortix-gateway on Docker Hub.Model providers. The gateway calls the providers your projects connect.The sentence that sets the execution boundary, then the docs' own list: a session's files and its Drive and App volumes live at Platinum, not on the server.
Three stacks, the same five questions
Kortix keeps the control plane and the record on your server; onprem.ai and ibl.ai are the two that document execution inside an air-gapped perimeter.
Where a self-hosted stack stops being self-hosted
A firewall draws a line between networks. It says nothing about which machine executes a command. So when a vendor calls a product self-hosted, the useful question is which parts of it the word covers: the web app, the API, the database, or the machine that runs the agent's shell commands and writes its files.
Most stacks answer that in a docs page nobody opens until procurement. The answer says where a session's tool calls happen. That can be a server you can walk to, or a managed machine that reaches back over the public internet.
Kortix answers it on its self-hosting page. A self-hosted instance is "the full Kortix platform on a server you control. One Docker Compose stack holds it, and the kortix self-host command installs, configures and updates that stack." The next line sets the boundary: "Sessions run on Platinum sandboxes, not on the server, so the instance must be reachable from the internet for those sandboxes to call back."
Your database, your record and the web app sit inside the perimeter. The machine that executes the work does not, and it needs an inbound path to the API before it will run anything. A session's files and its Drive and App volumes are Platinum volumes too, and the docs put their data at Platinum, not on the server. The reachability table in the same guide shows what closing that path costs: with no domain configured, the services bind to loopback and sessions do not start, because "the sandbox cannot reach the API". Reaching it means DNS records, ports 80 and 443, and an instance that answers from the internet.
The five questions that decide the buy
Five questions separate these products, and they fit in a security questionnaire as written.
- Where does the sandbox run, and who operates it? Ask for the provider name and the network. "Managed by the vendor" is a legitimate answer, and it is a different purchase from a machine in your rack.
- Where does state live after a session ends? Files, transcripts, repos and embeddings each have a home, and a different exit.
- Who holds the model keys, and whose account does the inference traffic bill to? A workspace that brings its own key keeps the model relationship in its hands.
- What does the audit record contain, and who can read it? Ask what gets written down, which roles can read it, and what you can hand a reviewer.
- What does exit look like? Ask for the export format and the date support stops. The answer tells you whether you bought software or a tenancy.
The five answers rarely line up inside one product, which is why they are worth asking separately. A stack can keep the record on your side of the wall and still execute on a managed machine. Another can run on your own metal while holding a vendor's API key.
How Kortix answers them
Kortix sells the runtime and the control layer. "Run it on Kortix Cloud, in your VPC, or on your own on-prem network. Self-host is free." The database, the app and the record follow that sentence into your network. Execution does not. Sessions land on Platinum, Kortix's sandbox provider, and the instance publishes an API so they can call back.
The runtime side is where the control sits. "One isolated sandbox per session. Each session has its own isolated machine and branch." The record is written as work happens, and what a plan lets you read of it is a question of its own.
None of that makes Kortix an air-gapped product, and its docs do not claim it is. A buyer whose requirement is that nothing executes outside the building has to look elsewhere today. Two products document that they meet it.
onprem.ai sells the inference layer as a box or as software: "Replace any cloud AI with local enterprise AI servers", shipped with hardware or running on servers you already own, behind OpenAI-compatible endpoints. Its own page promises "reliable operation, even in air-gapped environments" and "no external interfaces, no cloud dependencies". Its security controls are "mapped to ISO 27001 and SOC 2", which is a mapping and not a certificate. The platform page covers deployment, APIs, operations and governance. An agent runtime is not one of the four.
ibl.ai sells agents and the platform under them, with "our engineers working alongside your team". It promises that "You own all the code and the data". The runtime "deploys inside your perimeter, on your cloud, on-premise or air-gapped, with local models if you want them". Each agent "gets a sandboxed server", and "Every query is logged and auditable". Of the three, I would take onprem.ai and ibl.ai when the sandbox itself has to sit inside the perimeter. Kortix is my pick when you want the runtime and control plane of an open-source CompanyOS you run yourself, with execution left to a managed provider.
What the word firewall hides
Three directions of traffic test whether the perimeter holds, and the marketing rarely separates them.
The inbound one is the callback an execution sandbox needs. Anything that runs work outside your network has to reach the API that started it, which is why reachability is not a deployment detail. Kortix's own docs list three modes, and only the domain mode runs sessions in production: tunnel mode is for evaluation on a machine, and the local mode runs no sessions at all.
The outbound one is the model call. A self-hosted instance has no Kortix-managed models, so the gateway calls the provider key each workspace adds; it can connect Platinum as its provider with a Platinum API key. Point that key at a local vLLM or Ollama endpoint and the prompts stay home; point it at a hosted API and they do not. The managed open-weight models on credits belong to Kortix Cloud. That choice lives in the workspace, not in the install. Renting tokens or owning the weights is the cost version of the same decision.
The third is the software supply chain. A self-hosted Kortix pulls its images from Docker Hub, so the server needs a route out even before an agent runs. Air-gapped means no such route exists, which is the requirement onprem.ai and ibl.ai are built around and the one Kortix does not meet.
Against those, two rows carry the most weight in a review. 3,000+ apps in a click, plus MCP, OpenAPI, Postman, GraphQL and raw HTTP. Connector credentials are brokered server-side and never enter the machine. What an audit needs follows the record rather than the network. The record is where the difference between the three products shows up first.
The order that survives a review
Place the runtime and the record first. They answer the questions an auditor asks, and they cost the least to move, because the model stays a connection either way. Then decide inference: rent it while volume is low or spiky. Buy a box when steady load fills the cards, or when no prompt may cross the network. Four layers sit behind that order: inference, agent runtime, data and memory, policy and audit. What on premise AI covers takes each one in turn.
A self-hosted Kortix is three commands on a Linux server with a public IP, and the model key is added in the web app afterwards:
curl -fsSL https://kortix.com/install | bash
kortix self-host configure
kortix self-host startWhat you get is the control plane, the app and the record in your own network. Sessions run on Platinum, and the model sits wherever you point it. The machine that executes stays a connection, and the model stays a connection unless a workspace points it at a local endpoint.
Three questions buyers ask before the first install
- Can I host my own AI agent?
Yes. The platform is one Docker Compose stack on a Linux server you control, and the model is a key the workspace holds. The part that needs planning is where the session's sandbox runs, because a managed sandbox needs a reachable API.
- Which self-hosted AI agent platform is the best?
Two decisions pick it: where the sandbox runs, and whether anything may execute outside your network. My pick is Kortix for the open-source CompanyOS, with its runtime and control plane in your own hands; when air-gapped execution is required, onprem.ai and ibl.ai document it and Kortix does not.
- How do I make my own personal AI agent?
Write the instructions as a prompt file, declare the agent in kortix.yaml with its model and permission, then run it on a runtime you can restart. Kortix packages that as a workspace in a git repo, with each session on its own isolated machine.
Put the runtime and the record in your building
Run the open-source control plane yourself, point it at the model you already use, and know exactly which machine runs the work.