// AI NATIVE STACK

AI Native › AI Agent › Agent Framework › Kagent

CRASH COURSE · AI-NATIVE · intermediate · 11 min read · v0.1

Kagent — Kubernetes-native AI agents as CRDs.

agent-framework ai-native kagent kubernetes agents

TL;DR — Kagent makes AI agents Kubernetes-native. You define agents, tools, and model connections as Custom Resources (CRDs) — kubectl apply an agent, and the controller deploys it as a pod with the right model, tools, and system prompt. Built on AutoGen under the hood. The vision: manage agents the same way you manage any other K8s workload — declaratively, with GitOps, RBAC, and the full cloud-native toolchain.

What it is

Kagent is an open-source Kubernetes operator that runs AI agents as first-class K8s resources. You create YAML manifests for:

  • Agent — system prompt, model reference, tool references
  • ModelConfig — provider, model name, API key secret reference
  • Tool — tool definitions with schemas, or references to built-in toolkits (K8s, Prometheus, Helm, etc.)

The Kagent controller reconciles these resources, spins up agent pods, and exposes them via a web UI or API.

Agent CR YAML manifest Kagent Controller reconciles CRDs manages pods Agent Pod AutoGen runtime LLM Provider Bedrock / OpenAI

Fig 1 — Agent CRDs → controller → agent pods backed by LLM providers.

Why it exists

As organizations deploy more agents, they need the same operational patterns they use for everything else: GitOps, RBAC, resource limits, health checks, rolling updates. Kagent brings agents into the K8s ecosystem so platform teams can manage them with familiar tools instead of one-off scripts.

Install

helm repo add kagent https://kagent-dev.github.io/kagent
helm install kagent kagent/kagent -n kagent-system --create-namespace

Define an agent

apiVersion: kagent.dev/v1alpha1
kind: ModelConfig
metadata:
  name: gpt4o
spec:
  provider: openai
  model: gpt-4o
  apiKeySecretRef:
    name: openai-key
    key: api-key
---
apiVersion: kagent.dev/v1alpha1
kind: Agent
metadata:
  name: k8s-helper
spec:
  description: "Helps with Kubernetes operations"
  systemPrompt: "You are a Kubernetes expert. Help users debug and manage clusters."
  modelConfigRef:
    name: gpt4o
  toolRefs:
    - name: kubectl-tool
    - name: helm-tool
kubectl apply -f agent.yaml

Built-in toolkits

Kagent ships with pre-built toolkits for K8s operations: kubectl, Helm, Prometheus queries, Istio config, ArgoCD, and more. These are exposed as Tool CRDs that agents can reference.

When to use, when to skip

Use it when you want to deploy and manage agents as Kubernetes workloads with GitOps, RBAC, and platform-team workflows. Great for K8s-ops agents (cluster helpers, incident responders).

Skip it if you don't run Kubernetes, or if your agents are embedded in application code (use LangChain/Pydantic AI). Early-stage project — expect API changes.

vs the alternatives

ToolBest forTrade-off
KagentK8s-native agent managementK8s-only, early stage
LangGraph PlatformManaged agent deploymentVendor-hosted
AutoGenMulti-agent conversations (used under Kagent)Not K8s-native
Flyte / TemporalDurable workflow orchestrationNot agent-specific

Verified against Kagent docs (kagent.dev), May 2026.

← AI Native Stack
© cvam — written in plaintext, served warm