By Sebastian Maniak
Getting kagent running on your laptop takes three things: a local Kubernetes cluster, a model API key and one command. This post walks through all three, start to finish, in about five minutes.
Here’s the whole thing, if you just want to copy and paste:
kind create cluster --name kagent --image kindest/node:v1.37.0
export OPENAI_API_KEY="your-api-key-here"
curl -sL https://kagent.dev/install | bash && kagent install
kagent dashboard
The rest of this post explains each line.
Installing kagent on a local kind cluster with the CLI, sped up.
What you need
| Tool | Why |
|---|---|
| Docker, or another container runtime that kind supports | kind runs your cluster as containers |
kind v0.32.0 or later | To create the local cluster |
kubectl | To talk to the cluster |
helm 3 | The kagent CLI runs helm to install each chart |
| A model API key | OpenAI, Anthropic, Gemini or Ollama |
Step 1: Create a local cluster
kagent needs Kubernetes 1.37 or later, so name the node image when you create the cluster:
kind create cluster --name kagent --image kindest/node:v1.37.0
The version matters. kagent 1.0 runs every agent on Agent Substrate, and Substrate uses two certificate APIs that became generally available in 1.37. On an older cluster the install won’t work.
To check that your cluster is new enough, run:
kubectl api-resources --api-group=certificates.k8s.io
You should see clustertrustbundles and podcertificaterequests in the list, both at certificates.k8s.io/v1.
Step 2: Set your model API key
kagent needs a model to think with. Pick your provider and export its key:
| Provider | Command |
|---|---|
| OpenAI | export OPENAI_API_KEY="your-api-key-here" |
| Anthropic | export ANTHROPIC_API_KEY="your-api-key-here" |
| Gemini | export GOOGLE_API_KEY="your-api-key-here" |
| Ollama (Ollama Cloud) | export OLLAMA_API_KEY="your-api-key-here" |
Set it in the same terminal that you’ll run the install from. The installer reads it from the environment.
Step 3: Install kagent
Now the one command. It does two things: it downloads the kagent CLI, and then it installs kagent into your cluster.
If you use OpenAI, that’s the default:
curl -sL https://kagent.dev/install | bash && kagent install
For any other provider, add the --provider flag:
# Anthropic
curl -sL https://kagent.dev/install | bash && kagent install --provider Anthropic
# Gemini
curl -sL https://kagent.dev/install | bash && kagent install --provider Gemini
# Ollama
curl -sL https://kagent.dev/install | bash && kagent install --provider Ollama
It takes a few minutes. While you wait, here’s what kagent install is putting in your cluster, in this order:
- The CRDs, the resource types such as
AgentandHarness. - Agent Substrate, the runtime that every kagent agent runs on. It sandboxes each agent and suspends it when it’s idle.
- A development PostgreSQL database, where kagent keeps conversations and schedules.
- kagent itself: the controller, the UI and the built-in tools.
You don’t install any of those separately. The CLI does it all.
Two things that might trip you up
It asked for my password. The install script puts the CLI in
/usr/local/bin, and it needs your password to write there. To install into$HOME/binwithoutsudo, run:curl -sL https://kagent.dev/install | bash -s -- --no-sudoI already had an older kagent installed. Your shell might keep running the old one, and
kagent installwould then install the older release. Runkagent versionand check thatkagent_versionmatches the release the script just downloaded.
Step 4: Check that it worked
Check that the pods are running:
kubectl get pods -n kagent
Every pod should say Running. Example output:
NAME READY STATUS RESTARTS AGE
kagent-controller-56c67b6cd7-hqj5z 1/1 Running 3 2m
kagent-default-774d4496bd-sfx4b 1/1 Running 0 2m
kagent-postgresql-856b475f59-n258n 2/2 Running 0 2m
kagent-tools-54959b659c-lfkrz 1/1 Running 0 2m
kagent-ui-5fdb6fd85c-vzb2z 1/1 Running 0 2m
Then check that the worker pool is ready. This is the pool of sandboxed Workers that your agents run on:
kubectl get workerpools -n kagent
Example output:
NAME DESIRED REPLICAS READY SANDBOXCONFIG RESOLVED AGE
kagent-default 1 1 1 gvisor-default True 2m
If READY shows 1, you’re good.
Step 5: Open the dashboard
kagent dashboard
This forwards the UI to http://localhost:8082. On macOS it also opens it in your browser. On Linux or Windows, port-forward the UI service yourself and open that address:
kubectl port-forward -n kagent svc/kagent-ui 8082:8080
Leave the command running while you use the UI. The dashboard lists your agents, models, MCP servers and the tools that kagent discovered.
The dashboard after a fresh installation: no agents yet, one model configuration and two MCP servers.
That’s it. kagent is installed.
Good to know
Want a specific release? The script installs the newest one by default. To pin a version, pass
--version:curl -sL https://kagent.dev/install | bash -s -- --version v1.0.1 kagent version --clientWhich platforms does the script support? macOS and Linux on
amd64andarm64, and Windows onamd64from Git Bash or MSYS.Is this production-ready? No. The CLI install is built for trying kagent out, because it deploys a development PostgreSQL database. For production, install with Helm against your own database. I cover what else to change in Install kagent and manage Agent Substrate the right way.
Coming from kagent 0.x? kagent 1.0 installs fresh. There’s no in-place upgrade from the 0.10.x line, so use a new cluster for this.
Remove it when you’re done
If you used the kind cluster from step 1, one command removes everything:
kind delete cluster --name kagent
To keep the cluster and remove only kagent, use the CLI:
kagent uninstall
That deletes every kagent resource, the development database and all conversation state, and you can’t get it back. Check that kubectl config current-context points at the right cluster before you run it.
What to build next
You have a running kagent. Now give it something to do:
- Build a Kubernetes SRE agent that asks before it changes anything: an agent that investigates on its own and waits for your approval before it scales or restarts anything.
- Build a scheduled agent with kagent and Agent Substrate: a cluster health report every day, without being asked.
- Build a CVE agent with kagent and Agent Substrate in a secure sandbox: an agent that reads the internet safely, with default-deny egress.
- Install kagent and manage Agent Substrate the right way: what the install created, how to check it and how to size it.

