kagent: Building AI agents on Kubernetes

Learn how kagent uses YAML and Kubernetes custom resources to define agents, connect MCP tools, and configure sandboxing and tool approvals.

Player not loading? Watch on YouTube

Whitney Lee and kagent co-creator Lin Sun discuss an open source framework for building and running agents on Kubernetes. The conversation explains its declarative configuration and operational use cases rather than walking through installation commands.

An agent definition brings together instructions, a description, model configuration and access to MCP tools. The kagent controller turns relevant custom resources into Kubernetes pods and services; some resources only generate configuration. Sun says the framework assumes an existing Kubernetes cluster and can support both platform operations and company-specific business logic.

Istio is the main operational example, with an agent described as helping with installation, upgrades and troubleshooting through natural language. Sun also describes a Slack agent that connects ticket systems and chat history to summarize information and help investigate problems. She argues that Kubernetes makes an AI agent available to multiple users and supports workloads that stay running.

The security discussion covers optional Kubernetes Agent Sandbox configuration and human approval before certain tool calls. Sun also discusses cryptographic identity and policies controlling tool access, and mentions agentgateway as an optional way to configure access or guardrails.