Benchmark scripts comparing the Go and Python agent runtimes in kagent.
Measures three key metrics:
- Container image size — pulled from the Kind node's image store
- Pod startup time — time from
kubectl applyto pod Ready condition (averaged over N runs) - Runtime memory — working set bytes at idle (via metrics-server or cgroup fallback)
- Kind cluster with kagent deployed
- Go and Python agent images available in the cluster
kubectl,docker,python3on your PATH- (Optional) metrics-server for memory measurement
# Install kagent (v0.8.0-beta5+)
helm install kagent-crds oci://ghcr.io/kagent-dev/kagent/helm/kagent-crds --version 0.8.0-beta5 --namespace kagent --create-namespace
helm install kagent oci://ghcr.io/kagent-dev/kagent/helm/kagent --version 0.8.0-beta5 --namespace kagent
# Run the benchmark (default: 3 runs)
./bench.sh
# More runs for better averages
./bench.sh --runs 5The script creates minimal declarative agents — one with runtime: go, one with runtime: python — using a dummy ModelConfig. No real LLM calls are made; the agents just need to start up and pass their readiness probe (/.well-known/agent-card.json).
See manifests.yaml for the Kubernetes resources used.
===========================================
Go vs Python Runtime Summary
===========================================
Metric Go Python
--------------------------------------------------
Image Size 29.7MB 335.4MB
Startup Time 2707ms 18194ms
Memory (idle) 7Mi 253Mi
===========================================