Home Page

Building Enterprise AI Agents on VMware vSphere Kubernetes Service Part 2: Declarative Orchestration with kagent

Author: Jessiely Consolacion

In Part 1 of this series, Running Agent Substrate on VMware vSphere Kubernetes Service, we demonstrated how to package and deploy Agent Substrate as a VMware vSphere Kubernetes Service (VKS) add-on. Agent Substrate solves the low-level runtime problem: it schedules sandboxed Actors onto warm worker pools, isolates untrusted execution with gVisor, and suspends idle workloads via sub-second state snapshots.

Once you have a hardened, high-density runtime running on your VKS clusters, platform teams still face the upper-stack challenge: how do you declaratively define what those agents do, connect them to enterprise tools, govern LLM credentials, and coordinate multi-agent workflows across teams?

Running an AI agent in isolation is relatively simple; managing fleets of agents consistently across enterprise teams is where platform architectures are tested. As organizations move beyond individual agent deployments, they need a standardized, Kubernetes-native way to define agent behavior, govern model access, enforce tool permissions, and coordinate multi-agent orchestration.

Enter kagent—an open-source CNCF project that brings declarative, Kubernetes-native management to AI agents. In the architecture explored in this series, kagent complements Agent Substrate by providing an orchestration layer for defining agent behavior, configuring model access, and managing interactions with enterprise tools, while Agent Substrate provides the underlying execution runtime.

As the second step in a broader series on enterprise agentic architectures on VKS, this post bridges runtime primitives and full end-to-end workflows (which we’ll explore further in Part 3 and beyond) across four areas:

  • Layering kagent onto Agent Substrate to turn sandboxes into governed agents
  • Packaging kagent as a composable VKS add-on that consumes your Agent Substrate runtime
  • Installing the kagent add-on on Substrate-enabled VKS workload clusters via the VCF Automation UI or declarative GitOps

From Low-Level Actors to Declarative Agents

In our Agent Substrate post, we worked directly with low-level runtime primitives—scheduling individual Actors onto worker pods and verifying gVisor isolation and cross-worker snapshot resumption. While essential for infrastructure engineering, application teams shouldn’t have to manage raw Actor lifecycles or manually wire up model endpoints and tool servers for every agent they build.

Figure 1: Declarative Agent Orchestration with kagent

kagent bridges this gap by introducing Kubernetes custom resources that compile down into workloads scheduled on your existing Agent Substrate worker pools:

  • Agent and AgentTemplate: Separate what an agent does (system prompts, skills, sub-agents, and tool allowlists) from its runtime configuration, letting teams reuse standardized agent behaviors across environments.
  • Harness: Connects an agent definition to the underlying Agent Substrate execution engine—binding kagent’s Go/Python ADK, Claude, Codex, or custom runtimes directly to the Substrate worker pools provisioned by your base add-on.
  • ModelConfig: Centralizes LLM provider configurations (Anthropic, OpenAI, Gemini, Bedrock, Ollama, or internal AI gateways) and injects credentials at egress so raw API keys never sit inside the agent sandbox.
  • RemoteMCPServer and MCPServer: Connects agents to external enterprise systems and built-in Kubernetes/infrastructure toolsets over the Model Context Protocol (MCP) with per-agent tool allowlists.

Together, kagent’s controller, web UI, PostgreSQL session store, and OpenTelemetry tracing wrap Agent Substrate’s Actor model in a complete, GitOps-friendly platform.

Orchestration Meets Execution: The Request Flow

When an alert or user request triggers concurrent work across several agents, kagent and Agent Substrate divide execution cleanly:

  1. On-Demand Session Dispatch: kagent coordinates task delegation over the Agent-to-Agent (A2A) protocol, routes tool calls over MCP, and requests sandboxed Actor instances on demand from your pre-warmed Agent Substrate worker pool. Each active session runs securely inside a gVisor sandbox.
  2. Turn Boundary: The Actor stops executing the moment it reaches a turn boundary and requires external input to proceed including an LLM response, a Human-in-the-Loop (HITL) approval click, or a new user prompt. 
  3. Suspension and Snapshot: The Actor is immediately suspended. Process memory is discarded, and its current state (including the filesystem and pending workflow state) is snapshotted to durable object storage rather than being kept “warm” in memory.
  4. Worker Release: Because the Actor is suspended to object storage, the compute Worker pod is immediately freed to handle other tasks. This reduces idle compute consumption, allowing available worker capacity to be reused for other agent workloads.
  5. Sub-Second Restoration: When the LLM responds, or when a human finally replies or clicks approve, kagent retrieves the snapshot. Agent Substrate boots a container on whichever warm Worker pod has capacity and restores the snapshot in milliseconds, resuming the Actor precisely where it left off to process the input.

Zero Application-Level Hooks Required: In the kagent implementation, suspension and resumption are automatic and managed by the underlying runtime infrastructure. You do not need to write explicit application-level hooks, state-saving logic, or “suspend” API calls into your agent’s code; the runtime triggers suspension at every turn boundary as soon as nothing in the session is actively running.

Packaging kagent as a Composable VKS Add-on

Note: While VKS supports add-on extensibility, the specific add-on manifests and artifacts referenced in this post are intended solely for demonstration. These examples are not officially supported production configurations. Detailed packaging mechanics for VKS add-ons are still evolving and will be covered in a future post in this series. You can learn more about VKS add-ons in the Managing Add-ons in VKS Clusters documentation.

One of the biggest advantages of the VKS add-on framework is modularity. Instead of building a monolithic package that overwrites or duplicates the Agent Substrate add-on from our first post, we keep Agent Substrate and kagent as two distinct, composable VKS add-ons to ensure:

  • Independent Lifecycle and Ownership: Infrastructure teams can tune worker pool sizing, update gVisor, or upgrade the node-level atelet daemon via the agent-substrate add-on without disrupting the kagent control plane—and AI platform teams can roll out new kagent features independently.
  • Shared Runtime Density: A single Agent Substrate add-on deployment can serve as a shared, multi-tenant execution fabric for kagent (as well as any custom internal Actor workloads), maximizing worker pool utilization across the cluster.

When layered onto a Substrate-enabled VKS cluster, the kagent add-on integrates cleanly across four touchpoints:

  1. Control-Plane-Only Footprint: Rather than spinning up duplicate worker pods, the kagent add-on deploys strictly the orchestration layer—the kagent controller, web UI, and built-in MCP server—delegating all sandboxed execution to your existing Agent Substrate runtime.
  2. Direct Runtime Binding: Through AddonConfig, you point kagent to the local Agent Substrate control plane endpoint. Default Harness definitions then automatically target the warm, gVisor-isolated worker pools already managed by your base add-on.
  3. Fleet-Wide Guardrails out of the Box: Platform administrators can pre-populate cluster-wide defaults—including approved ModelConfig LLM gateways, OIDC authentication, private container registry mirrors, and egress network policies—so application teams inherit enterprise governance from day one.
  4. Coordinated CAPI Lifecycle Management: Because VKS tracks compatibility constraints and reconciles add-ons alongside Cluster API (CAPI), both the agent-substrate and kagent add-ons benefit from drift self-healing and validated, non-disruptive upgrades across your fleet.

Installing the kagent Add-on on VKS

Assuming your target VKS workload clusters already have the agent-substrate ClusterAddon deployed and reporting Ready (as covered in the previous post), layering on kagent follows the exact same VKS workflow:

  • Via the VCF Automation UI: Navigate to the VKS Cluster Management add-ons catalog in VMware Cloud Foundation Automation, select the kagent add-on, point it to the cluster’s existing Agent Substrate runtime and default LLM gateways, and deploy onto your target VKS clusters.
  • Via GitOps and kubectl: Declare an AddonInstall using label selectors or CEL constraints to target clusters already equipped with the Agent Substrate add-on, pair it with a per-cluster AddonConfig, and monitor rollout progress through the ClusterAddon status resource.

Once ClusterAddon transitions to Ready, the kagent control plane is online and ready to compile Agent definitions into ActorTemplates—spinning up sandboxed agent sessions on demand across your cluster’s pre-warmed Substrate worker pools whenever requests arrive. 

Advancing the Kubernetes-Native Agentic Stack on VKS

As enterprises move from AI agent experimentation toward broader adoption, platform teams need more than the ability to run individual agents. They need a consistent foundation that allows them to manage, govern, and evolve AI agent workloads without tightly coupling every layer of the architecture.

The modular approach explored throughout this series illustrates how VKS can provide that foundation:

  • VKS and the Add-on Framework provide consistent infrastructure provisioning and lifecycle management across Kubernetes environments on vSphere.
  • Agent Substrate provides a shared execution foundation designed for isolated, resource-efficient agent workloads.
  • kagent introduces declarative agent management and orchestration, bringing agent definitions, model access, and tool configuration into Kubernetes-native workflows.

By separating infrastructure, execution, and orchestration, enterprises can evolve these layers independently, establish clearer operational responsibilities, and incorporate emerging cloud-native AI capabilities as their requirements change.

This is where the extensibility of VKS becomes particularly valuable. Rather than prescribing a single, monolithic AI agent stack, VKS provides a foundation on which platform teams can compose architectures that reflect their organization’s evolving needs.

In Part 3, we’ll build on this architectural foundation with a practical reference pattern demonstrating how agent definitions, multi-agent orchestration, MCP governance, and end-to-end workflows come together.

Ready to dive deeper? Revisit Part 1, Running Agent Substrate on VMware vSphere Kubernetes Service, to learn how the underlying runtime add-on is constructed and configured. You can also watch Solo.io’s Introducing kagent: Managing AI Agents in Kubernetes to explore kagent’s declarative orchestration and observability capabilities in action.


Discover more from VMware Cloud Foundation (VCF) Blog

Subscribe to get the latest posts sent to your email.