agentlab runs the Giant Swarm agent
platform —
muster as the MCP gateway, the
Kubernetes MCP server, the kagent
agents runtime and Giant Swarm's
Backstage portal — on a
kind cluster on your machine, so the whole
platform can be tested and demoed without a management cluster.
Two kinds of client meet at one gateway. MCP clients such as Claude Code talk
to muster directly; people use Backstage, the human frontend to the whole
platform — servers, workflows, tools, agents, models — with their own token.
The agents Backstage creates run on kagent and are MCP clients of muster too,
calling tools as the person who invoked them.
The platform needs an identity provider, so the lab bundles its own
Dex: users that exist nowhere but this cluster, RBAC
driven by the groups claim, and the apiserver, muster and Backstage all
trusting the same issuer.
What's in the box
- One Go binary.
agentlab configure asks every option through an
interactive form and writes agentlab.yaml; every manifest renders from
embedded templates. No YAML to hand-edit, no scripts to source.
- The agent platform. The agent-platform chart every Giant Swarm
management cluster runs, installed in its lab shape: muster behind an
agentgateway TLS edge, the single OAuth enforcement point in front of an
unauthenticated in-cluster
mcp-kubernetes. Per-server sign-in, declared
toolsets and a fake multi-cluster fleet are all exercised.
- Backstage, the human frontend. Giant Swarm's Backstage is how a person
works the whole platform: browse and sign in to MCP servers, run workflows,
explore tools, create agents and chat with them, manage models. Every call
carries the signed-in user's own token, so the portal shows exactly what
the platform grants that person.
- Agents. kagent runs the agents Backstage or agent-manager creates. They
are MCP clients of muster like Claude Code is, forwarding the caller's token
and bounded further by declared toolsets, so they see the same catalogue
under the same rules.
- Models. An Anthropic default; extra model configs for OpenAI-compatible,
Gemini and Ollama endpoints; managed models through model-manager fronting
the model servers on the host — an Ollama, a Lemonade Server, an LM Studio;
and, with
platform.serving, the platform's own serving on llm-d — the
KServe llmisvc controller, the well-known runtime configs, the models
Gateway with its JWT policy, one CPU preset served on the node.
- Workspaces. With
platform.workspaces, the read-write-many storage a
workspace's volume is claimed from: an in-cluster NFS server and the NFS
CSI driver, its controller behind an mTLS proxy only Agent Substrate's API
server may reach, and the StorageClass agentlab-workspaces;
agentlab workspaces-test proves sub-path mounts per Session, read-only
mirrors and git on the volume, and a claude Session admitted on it with a
workspace grant the workspace-manager's key set verifies. With
platform.workspaces.csiCompanion the connectivity chart's CSI companion
mounts the volumes for Substrate instead, the lab's path for proving a
companion change. agentlab github-fake --workspaces serves the lab's own
GitHub for the workspace proofs.
- Platform manager. With
platform.platformManager (off by default), a
fixture for giantswarm-platform-manager: an invented installation with the
agent platform and workspaces on, in a registry the lab serves; agentlab pm-test installs the released manager against it and proves its dry run
registers the workspace-manager's Dex /signin redirect URI and keeps the
workspace-manager values (see Platform manager).
- VMs. vm-manager, the platform's VM provisioner, as a pod of the KVM
node (the chart's
components.vm-manager) registered with muster as
x_vm-manager_*: VMs with an instance metadata service, a vTPM and
attestation, created by the person or an agent who asked.
- Swarmgeist. klaus-gateway, the fleet's Slack bridge, on the host
against the lab's public gRPC edge and — with
platform.klausGateway —
as the meta chart's in-cluster component with its OBO link store in a
Secret, proven across a pod loss. No Slack workspace, so no real
sign-in: the store is proven through the gateway's own package.
- Observability. A minimal Prometheus plus mcp-prometheus, so PromQL
questions about the lab go through MCP too.
- Identity you can reason about. Three throwaway users, a fixed group
vocabulary, one issuer URL valid from the host, the node and every
hostNetwork pod, and a lab CA you trust explicitly.
- The fleet's admission. Kyverno with the
flux-multi-tenancy policy
every Giant Swarm management cluster enforces, verbatim and in Enforce, and
an org namespace with the fleet's tenant ServiceAccount — a release that an
installation would refuse is refused here, with the same message.
- Proofs, not hope. Headless
*-test commands drive every chain — Dex
login, muster, MCP tools, agents, toolsets, models, RBAC, Backstage — and
fail loudly.
Getting started
Requirements: docker (or Podman >= 4's docker-compatible CLI) — nothing
else; go >= 1.26 only to build from source. kind, Helm and the Kubernetes
client are built into the binary: the cluster runs the Kubernetes of the
embedded kind release's default node image, the platform installs through
Helm 4's SDK, and every call to the apiserver goes through client-go. Give
docker at least 4 CPUs and 6 GiB for the full lab; agentlab up checks before
it touches anything (see Docker resources).
go install github.com/giantswarm/agentlab@latest # or a release binary, or `go build -o agentlab .`
export ANTHROPIC_API_KEY=sk-ant-... # optional: powers the agents and Backstage's AI chat
agentlab up # one question (the detected defaults, or customize), then certs, kind cluster, Dex, RBAC, the platform — verified
agentlab open portal # the portal in your browser (the URL is printed too)
agentlab platform-test # headless proof: Dex -> muster -> mcp-kubernetes -> apiserver
Headless (CI, a coding agent), write the lab first with agentlab configure --defaults: nothing asks without a terminal. A new lab is named agentlab,
or agentlab-<n> when another lab on this machine holds that name;
--cluster-name <name> names it. On a terminal, up ends by asking whether to trust the lab CA (one sudo
prompt, so browsers get a green lock) and whether to open the portal — open portal is the command for later, open agents opens the kagent UI and open prometheus the lab Prometheus.
agentlab list shows the labs on this machine, agentlab status the chart a
lab runs (a dev chart named as such) against the one agentlab.yaml installs,
with the drift when they differ, its platform releases and whether
Backstage's app-config drifted from the render, and
agentlab pods a lab's pods, from any directory (--lab <name> picks one
of several).
Then point Claude Code at the platform:
agentlab trust # if you said no above: one sudo prompt, `agentlab untrust` reverts it
export NODE_USE_SYSTEM_CA=1 # Node >= 22.15; older Node: NODE_EXTRA_CA_CERTS=$PWD/certs/ca.crt
claude mcp add --transport http muster https://muster.127.0.0.1.nip.io/mcp
# in Claude Code: /mcp -> authenticate -> Dex login page -> done
The portal (https://backstage.127.0.0.1.nip.io) signs in the default users
admin@lab.local, dev@lab.local and viewer@lab.local, password
password. agentlab down deletes the cluster.
The full walkthrough, including what configure discovers about your
machine, is in Getting started.
Verify a downloaded release
Every release asset agentlab-<os>-<arch> (.exe on Windows) ships next to its
Sigstore bundle agentlab-<os>-<arch>.bundle. No checksums file is published: a
checksum adds no trust beyond GitHub's own asset digest, while the bundle ties the
binary to a CircleCI build of this repository, the same check agentlab self-update runs before it installs anything. Release candidates are signed by
the same identity, so the steps below verify them too.
Download the binary and its bundle into one empty directory, then run
cosign (v2 or
newer) from outside it. Never run the binary before it verified:
mkdir dl && gh release download v0.96.0 --repo giantswarm/agentlab \
-D dl -p 'agentlab-linux-amd64' -p 'agentlab-linux-amd64.bundle'
cosign verify-blob \
--bundle dl/agentlab-linux-amd64.bundle \
--certificate-oidc-issuer https://oidc.circleci.com \
--certificate-identity-regexp '^https://circleci\.com/api/v2/projects/[a-f0-9-]+/pipeline-definitions/[a-f0-9-]+$' \
dl/agentlab-linux-amd64
A verified binary prints:
Verified OK
The builds are signed by CircleCI, not by a GitHub workflow: the certificate's
identity is a CircleCI pipeline definition and its issuer is
https://oidc.circleci.com. Its GitHub workflow repository extension is empty, so
--certificate-github-workflow-repository fails on these builds, and no cosign
flag pins the source repository. Check it from the bundle: the certificate's
source repository URI extension (OID 1.3.6.1.4.1.57264.1.12) must be
github.com/giantswarm/agentlab.
jq -r .verificationMaterial.certificate.rawBytes dl/agentlab-linux-amd64.bundle \
| base64 -d | openssl x509 -inform der -noout -text \
| grep -A1 '1.3.6.1.4.1.57264.1.12'
1.3.6.1.4.1.57264.1.12:
..github.com/giantswarm/agentlab
A verification that fails exits non-zero and prints Error: with the reason; the
binary is not to be used. Pinning another identity (here a GitHub one) fails like
this, and the message names the identity the bundle carries:
Error: failed to verify certificate identity: no matching CertificateIdentity found, last error: expected SAN value to match regex "^https://github\.com/giantswarm/", got "https://circleci.com/api/v2/projects/7bdef2bf-7d98-4aca-bf0c-5d3b72cc306b/pipeline-definitions/48087dfd-3bbc-5498-9a9a-f7f1bb77c43d"
A binary that does not match its bundle, or a bundle of another repository's
build, fails the same way, either at the identity or with a signature error; a
bundle whose source repository is not github.com/giantswarm/agentlab fails the
check above.
Documentation
| Page |
What it covers |
| Getting started |
Requirements, docker CPU and memory, install, what configure discovers, the first up, connecting Claude Code |
| Command reference |
Every agentlab command and flag, the environment variables, keeping the binary current |
| TLS |
The lab CA, trust and untrust, Node and browsers, bringing your own certificate |
| The agent platform |
muster + mcp-kubernetes: the request path, per-server sign-in, the infrastructure families, toolsets, deviations from a real management cluster, the dev channel (a branch's dev builds), Agent Substrate and the platform Postgres from the chart, Substrate worker nodes (substrateNodes) for node-loss proofs |
| Agents |
The kagent runtime, the default ModelConfig and the API key Secret |
| The migration rehearsal |
A 3.x lab with the four fleet shapes upgraded in place to the 4.x line: the command sequence, the timings, what the migrate Job rewrote, refused and deleted, what an installation's cut-over does differently |
| Models |
Extra model configs, model servers on the host, managed models through model-manager, model serving on llm-d in the lab |
| vm-manager |
The platform's VM provisioner as a pod of the node: the KVM devices, the image directory, the dev image, the golden PCR recipe, the proof |
| klaus-gateway |
Swarmgeist as the meta chart's component: the values, the two lab Secrets, the OBO link store in a Secret across a pod loss, the dev image, what a lab without a Slack workspace cannot prove |
| Observability |
Prometheus + mcp-prometheus, and Backstage's metrics views |
| Backstage |
The human frontend: the muster plugin, agents and models in the portal, the agent create flow |
| Identity |
Users and groups, the shared issuer, the Dex version, wiring another app, trustedPeers |
| Workspaces |
The workspace storage switch (the NFS server, the NFS CSI driver behind its mTLS proxy, the read-write-many class, the proof) and the lab's GitHub for the workspace proofs: the fixture's App, repositories and users, OAuth with PKCE and rotating refresh tokens, git over smart HTTP, gh pr create, the request log |
| GitHub sign-in |
GitHub as a second way into the lab: the App and its callback, the client secret placed as a Secret, what a GitHub user is in the lab |
| Troubleshooting |
The gotchas that cost time |
| Usage data |
The anonymous usage signals — one per command, one per platform install naming the chart line — and how to opt out |
| Development |
Repository layout, building and testing, the hack journal |
Development
make build # CGO_ENABLED=0 go build -o agentlab .: static, as the lab's containers need it
make test # go test ./...
make lint # golangci-lint as CI's pre-commit runs it: its pinned version, linters and config
The lab's end-to-end checks are its own *-test subcommands, not go test.
Every hack and workaround, with its status, is recorded in
HACKS.md; CLAUDE.md briefs coding agents on the
repository. The layout is in Development.
License
Apache 2.0.