CLI and controller settings use the protobuf schemas in
proto/kagent/config/v1/config.proto and Protovalidate. ADK runtime settings use
proto/kagent/config/v1/adk.proto; other harnesses use their native config structs.
See process configuration
for file locations, precedence, and examples.
Standard OTEL_* settings override the receiving process's telemetry defaults.
Provider credentials, SDK trust, KUBECONFIG, UI settings, and test inputs remain
environment interfaces. Register supported public variables in go/core/pkg/env.
To understand how to develop for kagent, it's important to understand the architecture of the project. Please refer to the README.md file for an overview of the project.
When making changes to kagent, the most important thing is to figure out which piece of the project is affected by the change, and then make the change in the appropriate folder. Each piece of the project has its own README with more information about how to setup the development environment and run that piece of the project.
- python: Contains the code for the ADK engine.
- go: Contains the code for the kubernetes controller, and the CLI.
- ui: Contains the code for the web UI.
Run the Release workflow
manually, selecting the branch to build and entering the new release tag
(for example, v0.1.0 or v0.1.0-rc.1). The v prefix is required.
gh workflow run tag.yaml --ref main -f version=v0.1.0The workflow builds the selected branch's commit and publishes images, Helm charts,
Python packages, and release artifacts using that version. After those jobs succeed,
it creates the v<version> tag at the same commit and publishes the GitHub release
with generated notes and artifacts. Existing tags are rejected before publishing;
pushing a tag no longer starts a release.
The Nightly Release workflow runs at 02:00 UTC on the default branch, skipping builds when its commit matches the previous successful nightly. Maintainers can also run it manually on the default branch to force a rebuild.
Use Run workflow on that page, or run
gh workflow run nightly.yaml --ref main. Both nightly and manual releases use
the shared publish-image, publish-helm, and build-release-artifacts composite
actions in .github/actions.
Each build publishes all six component images and the kagent and kagent-crds
Helm charts as 0.0.0-alpha.g<12-character-commit>. These are development builds;
nightly runs do not publish Python packages to PyPI or create GitHub releases.
To install a nightly, use the version from its workflow summary for both charts with your usual installation values. Replace the example version below:
NIGHTLY_VERSION=0.0.0-alpha.g0123456789ab
helm upgrade --install kagent-crds oci://ghcr.io/kagent-dev/kagent/helm/kagent-crds \
--version "$NIGHTLY_VERSION" --namespace kagent --create-namespace
helm upgrade --install kagent oci://ghcr.io/kagent-dev/kagent/helm/kagent \
--version "$NIGHTLY_VERSION" --namespace kagent -f your-values.yamlEach workflow run includes a changelog in its summary and an artifact containing CLI binaries, checksums, and commit-specific chart archives.
- Docker with Docker Buildx (v0.23.0+)
- Git
- Go (v1.27.3+)
- Helm
- Kind (v0.33.0+)
- kubectl (v1.36.0+)
- Make
- Node.js (v24.13.0+) with Corepack/Yarn
- uv (v0.10.4+)
- Create a Kind cluster:
make create-kind-cluster- Set your model provider:
export MODEL_PROVIDER=openAI
#or
export MODEL_PROVIDER=anthropic- Set the provider's API key:
export OPENAI_API_KEY=your-openai-api-key
#or
export ANTHROPIC_API_KEY=your-anthropic-api-keyAlternatively, create a .env file at the repo root (gitignored). This file
is loaded by the Makefile (via -include .env) to inject environment
variables when you run make targets:
# Set your provider (supported: openAI, anthropic, azureOpenAI, gemini, ollama)
MODEL_PROVIDER=openAI
# Set the corresponding API key for your provider
OPENAI_API_KEY=your-openai-api-key
# ANTHROPIC_API_KEY=your-anthropic-api-key
# GOOGLE_API_KEY=your-google-api-key- Build and push the local Kagent images to the Kind registry:
make build- Install the local Kagent chart and its development dependencies:
make kagent-cli-installkagent-cli-install builds the local CLI, packages the local Kagent charts, and
runs kagent install. The Make target selects the Kind context, and the CLI then:
- Installs the Kagent and Substrate CRDs.
- Creates the certificate-authority material and development object-store credentials required by Substrate.
- Installs the Substrate PodCertificate controller.
- Creates a development PostgreSQL deployment and initializes the Kagent and Substrate schemas and roles.
- Installs
substrate-ateletand waits for its DaemonSet to become ready. - Installs Substrate with
atelet.enabled=false, then Kagent, with certificate-authenticated connections to that PostgreSQL deployment.
The command opens the Kagent dashboard after the installation completes.
To apply personal Helm overrides without committing them, set
HELM_ARGS in your .env file. The variable accepts one or more
Helm --set overrides:
# .env
HELM_ARGS=--set ui.replicas=0 --set config.logging.level=debugThe Substrate chart version defaults to the github.com/kagent-dev/substrate
version in go/go.mod. The following Make variables select other chart sources
for local or prerelease testing:
make kagent-cli-install \
SUBSTRATE_REPO=oci://example.com/substrate/helm \
SUBSTRATE_VERSION=1.1.0-alpha1The Atelet and PodCertificate charts inherit those values. Override the PodCertificate chart independently when it is published at another location or version:
make kagent-cli-install \
SUBSTRATE_PODCERT_REPO=oci://example.com/podcert/helm \
SUBSTRATE_PODCERT_VERSION=0.5.1For direct CLI use, configure install.substrate, install.atelet, and
install.podCertificate in the CLI config file.
Existing install.substrate values are inherited by Atelet, including
atelet.extraArgs and atelet.resources. Use install.atelet.valuesFiles for
node-specific overrides; these take precedence over the shared values. The Make
target supplies the Kind registry override there. Configure custom object
storage for both releases as described in the
Helm guide.
To access the UI, port-forward to the UI port on the kagent-ui service:
kubectl port-forward svc/kagent-ui 8001:8080Then open your browser and go to http://localhost:8001.
Optional addons are available to enhance your development environment with observability and infrastructure components.
Prerequisites: Complete the cluster, provider, and installation steps above.
To install all addons:
make kagent-addon-installThis installs the following components into your cluster:
| Addon | Description | Namespace |
|---|---|---|
| Istio | Service mesh (demo profile) | istio-system |
| Grafana | Dashboards and visualization | kagent |
| Prometheus | Metrics collection | kagent |
| Metrics Server | Kubernetes resource metrics | kube-system |
make kagent-cli-install deploys PostgreSQL as development infrastructure before
installing Kagent and Substrate. PostgreSQL is not part of the Kagent Helm chart.
A direct Helm installation requires a prepared database (see
Preparing your own database), the
kagent-postgres-owner and kagent-postgres-readwrite connection Secrets in the
Kagent namespace, and a separately installed Substrate.
The optional addons above provide observability components.
pgvector: The PostgreSQL image
kagent installdeploys does not include the pgvector extension. Vector features require a PostgreSQL deployment with pgvector andconfig.database.vectorEnabled=true.
Verify the database connection by checking the controller logs:
kubectl logs -n kagent deployment/kagent-controller | grep -i postgresThe make build command might time out with an error similar to the following:
ERROR: failed to solve: DeadlineExceeded: failed to push localhost:5001/kagent-dev/kagent/controller
As part of the build process, the buildx container tries to build and push the kagent images to the local Docker registry. The buildx command requires access to your host machine's Docker daemon.
Recreate the buildx builder with host networking, such as with the following example commands. Update the version and platform accordingly.
docker buildx rm kagent-builder-v0.23.0
docker buildx create --name kagent-builder-v0.23.0 --platform linux/amd64,linux/arm64 --driver docker-container --use --driver-opt network=hostThen run make build and make kagent-cli-install again.
Create a Kind cluster and install the development stack. After the dashboard opens, stop its port-forward with Ctrl-C and scale Kagent to zero replicas so it can be run locally.
make create-kind-cluster
make build
make kagent-cli-install
kubectl scale -n kagent deployment kagent-controller --replicas 0For a standalone agent, mount a root runtime document at /config/config.json:
{"runtime":{"control_plane_url":"http://localhost:8083","gateway_url":"http://localhost:8083","name":"kebab-agent","namespace":"kagent"}}docker run --rm --net=host -v "$PWD/config.json:/config/config.json:ro" localhost:5001/kebab:latestThe control plane must be reachable from the agent process. Managed agents receive these process settings from their Harness compiler.
The telemetry contract is a Weaver registry in telemetry/registry. The Go
constants in go/pkg/telemetry/conv, the Python constants in
kagent.core.telemetry.conv, and docs/architecture/telemetry-contract.md are
generated from it. Never edit them by hand. After a registry change, run:
make semconv-generate # regenerate everything from the registry
make semconv-verify # what CI runs: check, policy tests, generate, drift checkThese targets need either Docker or a local weaver of exactly the version in
telemetry/versions.env. A different local version is refused, so a green run
on a laptop means the same as in CI. See
docs/architecture/telemetry.md for the contract.
telemetry/live-check.sh start and stop run Weaver live-check around an e2e
run; see the Conformance section of that document.
To look at traces locally, make otel-local starts Jaeger with an OTLP receiver
on ports 4317 and 4318 and its UI on http://localhost:16686. Point an install
at it with --set config.runtimeDefaults.telemetry.traces.endpoint=http://<host>:4317.
make otel-collector-kind installs the reference collector from
examples/observability into the kind cluster and prints what it receives.