Skip to content
Open Source AI Employee

Self-host an open-source AI employee you keep in your repo

Self-hosting an AI employee moves where the platform and its database run; the job, tool grants and approval rules stay as files your team keeps in git. My pick is Kortix, the open-source CompanyOS, which reads the role from your repository, and I work on Kortix's marketing, so weigh that accordingly. The employee is the file your team writes, and the platform carries it on your network or Kortix Cloud.

The grant rule in the starter manifest

kortix.yaml
# v2 is deny-by-default: an omitted connectors/secrets/kortix_permissions/# skills grant resolves to "none", so a scoped specialist starts locked down.agents:  kortix:    connectors: all
Source: https://github.com/kortix-ai/CompanyOS/blob/e8cabd4b7c74335c28b7a1a4b9cadcbea993a080/packages/starter/templates/base/kortix.yaml

The comment is the rule; the starter's own kortix agent is granted all so a new project is capable before you narrow it.

What self-hosting moves, and what it leaves in the repo

Self-hosting puts the platform on hardware the company controls, and the part that makes the role yours is the repository that holds it. Run it on Kortix Cloud, in your VPC, or on your own on-prem network. Self-host is free. A machine you own runs one Docker Compose stack. It holds the web front end, the REST API, the model gateway, Postgres and Caddy, and an updater pulls images once a day. That is a genuine gain in operational control, because every service in the stack has a name a reviewer can point at.

The employee is another matter, and it does not follow the server. A role that runs on your network but lives in a vendor dashboard is rented with extra steps. A role whose files sit in a repository the company controls stays yours whether the platform runs on your metal or on Kortix Cloud. Ownership rests on three parts: the role file, the model credentials, and the permission boundary. The role file and the gates are files in the repository, and the credentials are the company's own keys. None of that changes with the host, so a move onto a company network is a deployment decision, not a different product.

The role is a file the manifest points at

In a Kortix project the manifest names a markdown file for each agent, and that file holds the behavior: the prompt, the mode, and the model the role prefers. The agents: map in the manifest holds the governance: which connectors the role may reach, which secret names it may receive, and which permissions it holds. A reviewer reads the job and its reach in a diff, and a bad instruction is a revert.

The manifest decides how a specialist starts. Kortix's starter manifest spells the rule out: v2 is deny-by-default, so a grant the file omits resolves to none and a scoped specialist starts locked down. A support triage role that names one connector cannot reach the rest of the catalog, and a reviewer sees that restriction before the first session runs.

Model credentials are yours to place

A self-hosted install does not arrive with a model key, and it has no managed models to fall back on. Any model provider with your own keys. Or the ChatGPT plan you already pay for. Or sign in with your OpenCode Console account for OpenCode Zen and Go. The credential belongs to the company, the provider bills the company, and the data terms are the ones the company accepted.

A switch of vendors stays cheap in that arrangement. A new key is a configuration change; at most the model line in the role's frontmatter changes with it. A role that has been running for a year keeps its instructions, its tools and its approval rules when the model underneath it changes.

The permission boundary carries the role's reach

A job description without a limit on its tools is a blank check, so the third part to check is the policy block. Approval gates you set. Off until you set them. The manifest reference gives the shape: policy.default_mode falls back to allow_all, so a connector call that no rule matches runs, while default_mode: risk lets a read through and sends a write or a destructive call to a person. Conditions narrow a rule to the arguments of the call.

yaml
policy:  default_mode: riskpolicies:  - match: gmail.send_email    action: require_approval    conditions:      - arg: to        match: "*@example.com"  - match: gmail.send_email    action: block

The rule set is ordinary YAML in the repository, reviewed with the role it governs. kortix validate does not check policy or policies; when connectors sync, Kortix skips a malformed rule and reports it as a sync error. Check the rules in the connector settings after a merge. Secrets sit behind the same boundary. Secrets are encrypted at rest with a key per workspace.

What running it yourself costs

The install is free and the work around it is not. Sessions run on Platinum sandboxes rather than on the server you install, so Kortix still runs the sandbox layer while the company runs the platform. The instance has to be reachable from the public internet so the sandboxes can call home. Point A and AAAA records at the server, allow HTTPS on the standard web ports, and add a wildcard for previews. Keep a Platinum API key ready for kortix self-host configure.

Check the sign-up path on the first day. The self-hosting guide warns that until you set EMAIL_URL or DISABLE_SIGNUP, anyone who reaches the instance can create a confirmed account, the admin address included. Set one of them before the DNS record resolves, then run kortix self-host doctor and fix what it reports.

Three bills remain: the server, the model calls and the sandbox compute. All three scale with how much work the role does. A self-hosted platform also means the database, the backups and the daily image updates are yours to operate. That trade is worth making when the role touches customer records or when a regulator asks where the data sits.

The deletion test settles the question. If the company stopped paying Kortix tomorrow, the role file, its connector scope and its gates would still be in the repository, ready for another harness or for a person to read. Self-hosting is how a company keeps that option open.

What the decision turns on

Two questions that decide whether self-hosting is the right shape for a role.

Yes. Kortix self-hosts for free, and the install puts the platform and its database on a server you control. Sessions run on Platinum sandboxes, and the model credentials are yours.

Yes. The employee is a markdown role file the manifest points at, with its connectors and approval rules in the same repo. The role starts from code your team can read and fork.

Read the manifest before you rent a role

The repo is the review: the role, its reach and its keys are declared before the first session.

Open source · Self-host is free · 3,000+ apps in a click