Skip to content

Hosted agents, where the host is your own Kubernetes cluster

What it takes to host coding agents on a Kubernetes cluster you bring: what a pod must replace from a laptop, what you supply, the sizing, and who runs what.

5 min read

“Hosted” hides three questions#

A hosted agent is a coding agent that runs somewhere other than your laptop. That is as far as the phrase goes. It does not say:

  1. Where does the agent process run?
  2. Where does its state live — the workspace, the logins, the history?
  3. Who operates the machinery?

Most hosted agents answer all three with “the vendor”. Nested answers the first two with “a Kubernetes cluster you bring”, and the third with “your platform team, with an installer”.

On your laptopHosted by a vendorHosted on your cluster
Keeps working when you close the lidNoYesYes
Code, prompts, and history are storedOn your diskOn the vendor’s cloudIn your cluster
Can reach private servicesWhatever the laptop reachesWhat you expose to the vendorWhat your network policy allows the pod
Operated byYou, informallyThe vendorYour platform team
Coding agentAny you installThe vendor’sCursor, Claude Code, Kimi CLI, or another from the ACP registry

There is no shared Nested backend in the third column. One install is one cluster, with its own control plane and its own Postgres.

What a laptop quietly provides#

An agent works on a laptop because a laptop is a generous host. It has a disk that remembers, accounts that are already signed in, a Docker daemon, a browser, and a person who notices when something hangs. Hosting an agent means rebuilding each of those on purpose.

The laptop gave youThe agent pod replaces it with
A disk that remembersTwo persistent volumes: one for data and git workspaces, one for Docker’s image store. Both survive an undeploy
Signed-in accountsA headless vendor sign-in: the app shows a URL or device code and you approve it. One agent holds up to 10 vendor accounts
API keys in a dotfileSecrets you bind to the agent, delivered to the pod as Kubernetes Secrets
DockerThe Sysbox runtime, so the pod runs its own Docker daemon without being privileged. Or a Kata microVM, if you choose Isolated VM
A browser and a screenAn image with an Ubuntu desktop and Chrome, which you open from the app as Desktop, next to Terminal
You, noticing a crashOn boot, the agent finds the tasks it was working on and continues them, up to three times per task per hour
The power buttonAn agent with no work for 10 minutes scales to zero, and the next task starts it again

The list is the real cost of “hosted”. Each row is something that fails in a boring way when it is missing: a login that expires at night, a workspace that is gone after a restart, a build that needs Docker and cannot have it.

What you bring#

The installer needs four things:

  • A Kubernetes cluster, and a kubeconfig with admin rights to it.
  • A default StorageClass, or one you name in the setup file.
  • A DNS zone. Public hosts are derived from it.
  • Optionally, nodes for Sysbox or Kata Containers. The installer can install either. Kata needs KVM on each node that runs it.

Into that cluster, nested-install puts Postgres, a Redis-protocol cache, Temporal, NATS, and an S3-compatible object store, then the control plane and the web apps. Agents come later, one pod each, created by the control plane when someone deploys an agent from the app. The full procedure is in Install Nested.

Sizing, with arithmetic#

An agent pod requests 250m CPU and 3 GiB of memory by default, with limits of 4 CPUs and 6 GiB. The gap between request and limit is deliberate: an agent is idle while it waits for a model and busy while it builds and tests.

For ten agents:

StateCPUMemory
All stopped for idleness00, with the volumes kept
All running, scheduled by requests2.5 CPUs30 GiB
All busy at their limits40 CPUs60 GiB

Memory, not CPU, decides how many agents fit on a node. Plan for requests, and watch what the busy ones actually use. The idle stop is what keeps the first row common: an agent that nobody has used since lunch is not holding 3 GiB.

You can keep agents away from the platform services with node labels: nested.io/agents=true for agent nodes and nested.io/platform=true for the rest. Add a taint with the same key to dedicate a node.

Who runs what#

LayerOwner
The cluster, its nodes, backups, and upgradesYou
Platform services and the appsThe installer, through Helm, optionally handed to Argo CD
Agent podsThe control plane, at runtime
The coding agent’s modelThe provider you signed the agent in to

The last row is the honest limit of hosting agents yourself. The pod is yours, and so are the workspace and the history. The model call still goes to the provider of the coding agent you picked, unless you pick one you can run privately. The full map of what stays and what leaves is in Why Nested runs inside your Kubernetes cluster.

When your own cluster is the wrong host#

  • Nobody on the team runs Kubernetes. The installer makes an install repeatable. It does not make the cluster somebody else’s job.
  • One developer, one repository. A laptop is a fine host for that. The reasons to move are parallel work, work that starts from events, and a team that shares agents.
  • You need an answer in two seconds from a cold start. An agent that was stopped for idleness has to start its pod before the first task runs. We chose low idle cost over instant answers.

If none of those describes you, the trade is a good one: you take on operating a platform, and in return the agents sit next to your services, under your network policy, with your credentials, and nothing about your code waits on a vendor’s cloud.

Questions

What is a hosted agent?
A coding agent that runs on a server instead of your laptop, so it keeps working when you are away. The phrase does not say who owns the server. With Nested, the host is a Kubernetes cluster you bring.
Can I bring my own Kubernetes cluster to Nested?
Yes. That is the only way Nested runs. You need a cluster with an admin kubeconfig, a default StorageClass, and a DNS zone. The installer adds the platform services, the control plane, and the apps.
How much CPU and memory does a hosted agent need?
By default each agent pod requests 250m CPU and 3 GiB of memory, with limits of 4 CPUs and 6 GiB. An agent with no work for about 10 minutes scales to zero and keeps its volumes.
Does Nested run agents on its own cloud?
No. There is no shared Nested backend. The control plane, the datastores, and every agent pod run in your cluster. Model calls go to the provider of the coding agent you chose.

5 min read

Agentic development is a queueing problem

Agentic development means handing whole tasks to coding agents. Once they work unattended, the hard parts are queues, review, and recovery, not prompts.