Kagent is a Kubernetes-native framework for managing AI agents using declarative configuration and GitOps workflows. Instead of writing imperative code, you define agents with a system prompt and list of tools as custom resources, enabling seamless integration of AI agents into existing Kubernetes infrastructure patterns.
Christian Posta explains the core components of AI agents. The system prompt is a text-based natural language explanation of what the agent should do. For a Kubernetes agent, this would describe its understanding of Kubernetes, debugging capabilities, and available tools. Tools allow the agent to take action, such as calling the Kubernetes API to get pod logs or events. Optional memory/RAG components give agents access to previously answered questions, stored scenarios, or documentation.
The key insight is that since agents are essentially a text prompt plus a list of tools, they don't necessarily need to be written in an imperative programming language. Organizations deploying platforms on Kubernetes prefer GitOps-based workflows built around declarative configuration - a statement of intent that controllers then reconcile to achieve the desired state.
Kagent provides a Custom Resource Definition (CRD) called Agent where you specify the system prompt and list of tools. It includes built-in tools for Kubernetes API, Argo CD, Argo Rollouts, Istio, Prometheus, and more. Through MCP integration, you can connect to any MCP server for additional tool capabilities.
Best practice is to keep system prompts focused and limit tools to around 20-25 per agent. This leads to building specialized agents in two tiers:
When agents need to communicate, MCP protocol handles tool communication with external services, while A2A (Agent-to-Agent) protocol handles inter-agent communication. A2A is an RPC-style protocol over HTTP announced by Google. Since agents communicate over HTTP, questions around security, observability, and governance become important - Solo.io has built an open-source Agent Gateway to address these concerns.
"If you're going to build AI agents and really what you need is a text prompt and a list of tools, does that really need to be written in some imperative programming language? Probably not."
"The folks that we work with that deploy their platforms on Kubernetes, they prefer a GitOps-based workflow built around declarative configuration."
"When you're building agents, you want to keep the system prompt very focused, very tight, and you want to give it access to maybe 20-25 tools."