Kagent on Kubernetes: What Does it Give Your AI Platform?
kagent is an open-source Kubernetes operator that treats AI agents as declarative CRDs, enabling GitOps-friendly agent deployment via ~30 lines of YAML It supports two agent types: Declarative (using Google's ADK framework with kagent-managed reasoning loops) and BYO (Bring Your Own container with custom loop logic like LangGraph) The operator owns the workload lifecycle, reasoning loop, tool registration via MCP servers, and session state, while leaving platform concerns (namespaces, network po
Analysis
TL;DR
- kagent is an open-source Kubernetes operator that treats AI agents as declarative CRDs, enabling GitOps-friendly agent deployment via ~30 lines of YAML
- It supports two agent types: Declarative (using Google's ADK framework with kagent-managed reasoning loops) and BYO (Bring Your Own container with custom loop logic like LangGraph)
- The operator owns the workload lifecycle, reasoning loop, tool registration via MCP servers, and session state, while leaving platform concerns (namespaces, network policy, secrets, RBAC) to the user
- kagent introduces 9 custom resources under kagent.dev API group, including Agent, ModelConfig, MCPServer, Memory, and ToolServer CRDs for modular agent composition
- Agent-to-agent communication follows the A2A protocol over pod-to-pod HTTP, with tool calls routed as network hops to separate MCP server workloads rather than in-process function calls
Why It Matters
kagent represents a significant step toward operationalizing AI agents at scale by applying Kubernetes-native declarative patterns to agent workloads, making them versionable, observable, and manageable through familiar platform engineering workflows. For AI practitioners, it bridges the gap between experimental agent prototypes and production-grade deployments by providing structured abstractions for model routing, tool discovery, and multi-agent orchestration without sacrificing the flexibility needed for custom reasoning loops.
Technical Details
- CRD Architecture: kagent defines 9 custom resources (Agent, AgentHarness, MCPServer, Memory, ModelConfig, ModelProviderConfig, RemoteMCPServer, SandboxAgent, ToolServer) under the kagent.dev API group, each mapping to distinct concerns previously embedded in agent applications
- Dual Agent Runtime: Declarative agents use kagent's built-in engine with Google's ADK framework, supporting Python and Go runtimes as HTTP services; BYO agents accept user-provided containers implementing the A2A protocol on port 8080, with full loop control via code (e.g., LangGraph StateGraph with explicit node transitions and conditional edges)
- Tool Integration via MCP: Tools are registered as MCP servers (local or remote), enabling network-isolated tool execution with separate credential boundaries; the
requireApprovalfield on tool references enables human-in-the-loop gating for sensitive operations - State and Configuration Management: ModelConfig and ModelProviderConfig CRDs decouple model selection and credential management from agent definitions, allowing runtime model swaps without agent redeployment; PostgreSQL backend stores session state and agent memory
- Request Flow Architecture: Agent calls follow a pod-to-pod HTTP pattern using A2A protocol, with the controller acting as an optional front door rather than a dataplane hop; sub-agents are declared as peer tools in the same tools array as MCP servers, enabling recursive multi-agent orchestration
Industry Insight
- The declarative vs BYO agent distinction reflects a broader industry tension between platform abstraction and developer control; organizations should adopt declarative agents for standard infrastructure operations (Kubernetes troubleshooting, cost monitoring, Helm management) while reserving BYO for complex, domain-specific reasoning patterns requiring testable loop logic
- kagent's separation of concerns—owning the agent runtime while leaving platform security, networking, and identity to existing Kubernetes mechanisms—demonstrates a sustainable pattern for AI platform engineering that avoids reinventing operational primitives already solved by the Kubernetes ecosystem
- The MCP-based tool registration model and A2A protocol for inter-agent communication signal convergence toward standardized agent interoperability; practitioners should evaluate these protocols when designing multi-agent systems to ensure future compatibility with emerging tooling and framework ecosystems
Disclaimer: The above content is generated by AI and is for reference only.