The Agent Runtime Operator is a Kubernetes operator that provides a unified, framework-agnostic way to deploy and manage agentic workloads on Kubernetes. It uses Custom Resource Definitions (CRDs) to abstract away framework-specific configurations, simplifying the management of components like wiring of agents with a observability stack or model routers.
The operator is built with the Operator SDK framework. Make sure to be familiar with the Operator SDK concepts when working with this project.
Get started with the Agent Runtime Operator by following our comprehensive guides:
- Install the Agent Runtime Operator - Set up the operator on your Kubernetes cluster
- Create your first Agent - Deploy template-based and custom agents
Before contributing to this project, ensure you have the following tools installed:
- Go: version 1.24.0 or higher
- Docker: version 20.10+ (or a compatible alternative like Podman)
- kubectl: The Kubernetes command-line tool
- kind: For running Kubernetes locally in Docker
- make: The build automation tool
- Git: For version control
Set up your local Kubernetes environment. You can use any Kubernetes cluster. Kind is used for E2E tests and is used exemplarily here for local development.
# Create a local Kubernetes cluster (or use an existing one)
kind create clusterInstall cert-manager in the cluster, as it is required for webhook certificate management:
# Install cert-manager
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.1/cert-manager.yaml
# Wait for cert-manager to be ready
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=cert-manager -n cert-manager --timeout=60sBuild and deploy the operator locally:
# Install CRDs into the cluster
make install
# Build docker image
make docker-build
# Load image into kind cluster (not needed if using local registry)
make kind-load
# Deploy the operator to the cluster
make deployRun unit tests, code formatting checks, and static analysis whenever you make changes:
# Run unit tests, code formatter and static analysis
make testSeveral linters are configured via golangci-lint. Run the linter to ensure code quality:
# Run golangci-lint
make lintYou can also auto-fix some issues:
# Auto-fix linting issues
make lint-fixThe E2E tests automatically create an isolated Kind cluster, deploy the operator and run e2e tests. Test cluster is kept after execution for faster reruns, so you may need to clean it up manually.
# Run complete E2E test suite
make test-e2e# Clean up test cluster
make cleanup-test-e2eE2E Test Features:
- Operator deployment verification
- CRD installation testing
- Webhook functionality testing
- Metrics endpoint validation
- Certificate management verification
The operator-sdk CLI can be used to create or update APIs and webhooks. This is the preferred way to add new APIs and webhooks to the operator. If the operator-sdk CLI is updated, you may need to re-run these commands to update the generated code.
# Create API for Agent CRD
operator-sdk create api --group runtime --version v1alpha1 --kind Agent
# Create webhook for Agent CRD
operator-sdk create webhook --group runtime --version v1alpha1 --kind Agent --defaulting --programmatic-validationSee Contribution Guide for details on contribution, and the process for submitting pull requests.