Skip to content
Open Source AI Agent Platform

Self host an open source AI agent platform to keep the record

Self-hosting earns its night of work when the thing you want to hold is the record: who has access, what ran, what it changed. Kortix, the open-source CompanyOS, is my pick to run that layer on your own box while the agents' machines stay rented, and I work on Kortix's marketing, so weigh that accordingly.

Where the line between the two halves sits

kortix.com/self-hosted
Source:https://kortix.com/self-hosted
The kortix CLI installs the web app, the API, the LLM gateway and the database on your server as one Docker Compose stack.Then it keeps the stack up to date.Every service in it runs on your server.Sessions and Drive run on Platinum sandboxes.They call back to your instance.supabase-* Postgres, auth and file storage

What the install puts on your server and what runs on Platinum instead, in the self-hosted page's own words.

The record is the part you cannot rent back

Every agent session leaves two kinds of residue behind. One is a machine with half-finished work on it, which was built to be discarded. The other is the trace: what the agent was asked, which files it touched, which change request came out of it, and who approved the merge.

The trace is the part a company cannot reconstruct six months later, and it lives in the control plane. Self-hosting an open source AI agent platform puts that control plane inside your own network. Accounts, workspaces, repos, policies, secrets and connectors sit on disk you control, and the audit record sits with them. A self-hosted install carries the whole product: the same images the managed cloud runs, on the same release train.

What actually sits on the box

The install is smaller than the vocabulary around it suggests. What you back up is the instance directory plus its four Docker volumes: db-config, kortix-capture-data, kortix-caddy-data and kortix-updater-state. The instance directory holds the Postgres data directory with workspaces, session history, policies and the audit record, the storage directory beside it with the files agents keep, and one .env with every password, signing key and token the CLI generated.

The keys in that .env are yours to change. kortix self-host env rotate <KEY> regenerates one generated secret and --all-generated regenerates all of them, while kortix self-host env ls shows the values masked. Rotate with care: a new API_KEY_SECRET makes every stored credential undecryptable, so env set asks for confirmation, and env rotate refuses that key along with POSTGRES_PASSWORD and SAML_PRIVATE_KEY, because a new value breaks stored data or connections. Patches arrive the same way the first install did: the updater checks once a day at a time you set, runs the migration, then starts the new services before it stops the old ones. kortix self-host status tells you how the last run went.

The rest of the stack is ordinary web software: a web application, an API that relays model calls to a gateway service of its own, the auth and storage services, and Caddy or cloudflared at the edge. No GPU, no model weights, and no separate queue worker to size. The same install runs on a laptop, a small server or a large one, and a domain is one line of configuration.

That shape settles the hardware question, which the requirements page works through: the machine you price is sized by data, not by concurrency.

The agent computers are rented, and that is the safer half

Agent work does not execute on your server. Sandbox compute runs on Platinum, with a key you supply, and the machine carrying a session exists only for that session. Platinum is the reference provider. A legacy fallback still serves older sessions and its removal is scheduled, so new work all lands in the same place.

Isolation gives the design its point. One isolated sandbox per session. Each session has its own isolated machine and branch, so nothing a session breaks is visible to the next one and nothing it downloads survives the session. The box in your rack stays the same size whether two agents run or two thousand.

Reachability follows from that split rather than from the stack. A sandbox has to call back into the instance, so the installer's first question is how the instance is reachable: either DNS you own or a tunnel you are only using to test. The setup walkthrough covers the six questions, including the one most teams get wrong.

What stays under your control after work ships

Governance is the half of self-hosting that is easiest to overlook, because it arrives inside the stack you just installed and nobody demonstrates it on day one. Session work reaches main through a change request. Merge is default-deny for agents. A person approves the change request, or an admin grants the merge capability to an agent that should have it.

Approval gates you set. Off until you set them, which is worth knowing before the first session rather than after it. Roles, groups and the audit record all live in the same database you back up, so a residency or audit question gets answered with a directory listing instead of a support thread.

When self-hosting is the wrong answer

Three situations argue for renting all of it. If nobody on the team wants to own a server, a patch window and a backup rotation, the managed cloud is cheaper once you price the attention. If the instance cannot hold a stable URL, sessions will not find their way home. And if the work depends on a managed model lineup, a self-hosted instance has none by design, so model access comes from your own provider keys or the ChatGPT subscription you already hold.

None of those is permanent. Teams often start on the cloud to measure real agent hours, then move the control plane in when a requirement shows up. The self-hosted vs managed page prices both halves of the decision. The short version: agent computers bill by the hour either way, and a stopped computer draws no compute charge (Kortix pricing).

Moving in, and moving back out

A host is one API endpoint with its own token, so the switch stays small. kortix hosts use selfhost points the CLI at your instance and kortix hosts use cloud points it back at the managed one. The repos, the kortix.yaml and the change requests are the same on either side, because the release train is the same.

Run it on Kortix Cloud, in your VPC, or on your own on-prem network. Self-host is free. What the install buys is the option to keep the record at home, and the option can be taken up later or handed back without a migration project.

Questions people ask before deciding

Should I self host my AI agents?

Yes, when the record matters more than the server does. A self-hosted Kortix keeps workspaces, policies and the audit record on your disk while the agent computers stay rented, so the upkeep is one Compose stack rather than a datacenter.

What does self-hosting an AI platform involve?

One machine with Docker on it, a stable URL, a Platinum key and a single command. kortix self-host start asks six questions and writes every port, password and signing key itself. Backup is the instance directory plus its four Docker volumes: db-config, kortix-capture-data, kortix-caddy-data and kortix-updater-state.

Is self-hosting an AI agent cheaper?

Usually, though the saving lands somewhere other than the compute line. The control plane costs nothing to run yourself, so the software side of the bill goes away. Agent hours still bill by the hour, from a provider you hold the key for.

Who owns the data in a self-hosted AI agent platform?

You do. The database, the stored files and the .env holding every key sit in one directory on your machine, with nothing to export from a vendor account. Model calls route through the gateway inside your own stack.

Read the walkthrough before you commit