---
description: kagent is a CNCF Sandbox project that runs AI agents on Kubernetes as custom resources. See its 1.0 architecture, MCP and A2A support, and where a gateway fits.
title: What Is kagent? Kubernetes-Native AI Agents Explained
image: https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w1200/2026/11/what-is-kagent-kubernetes-native-ai-agents-explained-bifrost-1920x1080@2x.png
---

Try Bifrost Enterprise free for 14 days. [Request access](https://www.getmaxim.ai/#enterprise-trial)

**TL;DR**

- kagent is an Apache 2.0 platform for running AI agents on Kubernetes as custom resources. Solo.io created it in 2025, and it is a CNCF Sandbox project.
- kagent 1.0 (November 9, 2026) splits an agent into a Harness (how it may run) and an AgentTemplate (what it does), paired by an Agent, and runs each conversation as a sandboxed Actor.
- kagent agents reach models through ModelConfig resources, tools through RemoteMCPServer resources, and callers over A2A, and every outbound call passes a default-deny egress gateway.
- kagent 1.0 documents no spend budgets, rate limits, or cross-provider failover, and its open-source build authorizes every authenticated caller.
- An OpenAI-compatible AI gateway such as Bifrost can sit on kagent's model, MCP, and A2A paths; the sketch here is untested.

kagent is an open-source, Kubernetes-native platform that defines AI agents as custom resources and runs them inside a cluster, so platform teams manage agents with the same kubectl, GitOps, and RBAC workflows they use for other workloads. Most published descriptions cover the 0.x line, and kagent 1.0 changed the resource model, runtime, and API group. This explainer covers kagent 1.0's architecture, deployment, and limits, then shows where [Bifrost](https://www.getmaxim.ai), the [open-source AI gateway built by Maxim AI](https://github.com/maximhq/bifrost), fits on the model, MCP, and agent traffic that kagent agents produce.

## What Is kagent?

kagent is an open-source platform for running AI agents on Kubernetes. It describes each agent's behavior and runtime as Kubernetes custom resources, a controller reconciles them, and every conversation runs in its own sandbox. kagent agents call models from the major LLM providers, use tools over the Model Context Protocol (MCP), and talk to callers over the Agent2Agent (A2A) protocol.

kagent targets cloud-native operations: diagnosing connectivity across service hops, troubleshooting performance regressions, generating alerts from Prometheus metrics, debugging Gateway API configuration, and managing Argo Rollouts. Its bundled `kagent-tool-server` serves MCP tools for Kubernetes, Helm, Istio, Cilium, Argo Rollouts, Prometheus, and Kubescape.

Because teams author resources and the controller acts on them, kagent sits on the orchestration side of the [split between agent orchestration and an agent gateway](https://www.getmaxim.ai/articles/ai-agent-orchestration-vs-agent-gateway/). Agents run on kagent's engines (built on Google's Agent Development Kit), on Codex or Claude, or on your own image. See [how the Model Context Protocol works](https://www.getmaxim.ai/articles/what-is-model-context-protocol-mcp-a-2026-guide/).

### Who maintains kagent

kagent was created at Solo.io in 2025. The Cloud Native Computing Foundation [accepted kagent on May 22, 2025, at the Sandbox maturity level](https://www.cncf.io/projects/kagent/), CNCF's entry tier for experimental projects, and it is still there. The [kagent-dev/kagent repository](https://github.com/kagent-dev/kagent) is Apache 2.0, written mainly in Go, and had about 4,500 GitHub stars on November 26, 2026.

kagent 1.0.0 shipped on November 9, 2026. There is no in-place upgrade from 0.10.x: moving to 1.0 means a new installation and database, without conversation history. Thoughtworks [moved kagent to Trial on its November 2026 Technology Radar](https://www.thoughtworks.com/radar/languages-and-frameworks/kagent) after production use.

## kagent 1.0 Architecture: Harness, AgentTemplate, Agent, Session, and Actor

kagent 1.0 separates what an agent does from how it is allowed to run. A Harness sets the runtime and infrastructure policy, an AgentTemplate sets the model, prompt, and tools, and an Agent pairs one of each. The controller compiles that pairing into an immutable revision, and each conversation, called a Session, runs on its own sandboxed Actor.

![Harness and AgentTemplate custom resources feed an Agent, which the kagent controller compiles into an immutable ActorTemplate that each new Session runs as a sandboxed Actor](https://articles-images-cdn.t3.tigrisfiles.io/diagrams/kagent/kagent-resource-model.png)

*Figure 1: Platform teams own the Harness, application teams own the AgentTemplate, and only the Agent connects them.*

- **Harness:** one runtime ( `kagent`, `codex`, `claude`, or `byo`), the workload image, the WorkerPool, and snapshot storage.
- **AgentTemplate:** the model (through a ModelConfig), system prompt, tool bindings, skills, and plugins.
- **Agent:** one AgentTemplate plus one Harness, with `Compatible` and `Ready` status conditions.
- **Session:** one conversation, created through kagent's gRPC API and stored in PostgreSQL rather than as a custom resource.
- **Actor:** the Agent Substrate process that runs a Session, in a gVisor sandbox by default or a `microvm` class for a hypervisor boundary.

Agents no longer run as long-lived Deployments: after each turn, Agent Substrate snapshots the Actor and frees its Worker slot until the next message. Kubernetes RBAC governs who applies the resources, while kagent's gRPC authentication governs who can talk to a Session. Each Actor carries a certificate-based identity, which helps downstream services tell [one agent's non-human identity](https://www.getmaxim.ai/articles/non-human-identity-for-ai-agents/) from another's.

## The kagent Custom Resources at a Glance

kagent 1.0 serves eight custom resource kinds in the `api.kagent.dev/v1alpha3` API group. Three describe agents, two connect them to models, one connects them to MCP tools, one grants network destinations, and one defines standalone sandboxes. Sessions live in kagent's database, not in etcd.

| Resource | What it defines | Notes |
| --- | --- | --- |
| `Harness` | How an agent may run | Unrelated to the 0.x `AgentHarness` |
| `AgentTemplate` | Model, prompt, tools, skills, plugins | Tools are `mcp` or `subAgent` bindings |
| `Agent` | One AgentTemplate paired with one Harness | Callers address the Agent |
| `ModelConfig` | One model at one provider, plus its credential | Secret, `tokenPassthrough`, or `actorJwt` |
| `ModelProviderConfig` | Model discovery for a provider | `OpenAI` type only in 1.0 |
| `RemoteMCPServer` | An MCP server's URL, protocol, and headers | Replaces the 0.x `ToolServer` |
| `EgressPolicy` | Extra destinations an Agent may reach | Can inject a credential |
| `SandboxTemplate` | Standalone sandboxes for commands and files | Independent of any Session |

kagent rejects Vertex AI and SAP AI Core ModelConfigs on every runtime, because their credentials cannot be injected as a static header. Setting `provider: OpenAI` with a custom `openAI.baseUrl` points an agent at any OpenAI-compatible API, and a RemoteMCPServer can point at an [MCP gateway that aggregates many tool servers](https://www.getmaxim.ai/resources/mcp-gateway).

## How kagent Agents Use MCP Tools and the A2A Protocol

kagent uses MCP for tools and A2A for conversations. An AgentTemplate binds tools from RemoteMCPServer resources or from other AgentTemplates, and every Agent is reachable over A2A through the kagent controller on port 8083. All outbound calls from an agent pass Agent Substrate's egress gateway, which denies any host the agent was not compiled to need.

![A caller sends an A2A request through the kagent controller to a sandboxed Actor, whose outbound calls pass a default-deny egress gateway to allowed model and MCP hosts](https://articles-images-cdn.t3.tigrisfiles.io/diagrams/kagent/kagent-agent-turn.png)

*Figure 2: An agent reaches only the hosts its AgentTemplate names, and its API keys never enter the sandbox.*

An `mcp` binding can narrow a server to at most 50 named tools or require a person's approval before each call, though the `claude` runtime ignores the tool list. A `subAgent` binding nests another AgentTemplate inside the parent's Actor, one level deep.

Over A2A, a caller posts JSON-RPC to `/agents/{namespace}/{name}`, reads the agent card at `/agents/{namespace}/{name}/.well-known/agent-card.json`, and sends `A2A-Version: 1.0`; the Session ID is the A2A `contextId`. The [A2A protocol guide](https://www.getmaxim.ai/articles/what-is-the-a2a-protocol-how-agent-to-agent-communication-works/) covers messages and tasks, and [how A2A and MCP divide the work](https://www.getmaxim.ai/articles/a2a-vs-mcp/) explains why kagent uses both.

As Figure 2 shows, the egress allowlist comes from the AgentTemplate: the model endpoint, bound MCP servers, skill sources, and the OpenTelemetry collector. The gateway injects credentials, so the agent holds only a placeholder key.

## How to Deploy kagent on Kubernetes

kagent 1.0 installs as two systems in one cluster: Agent Substrate for sandboxed compute and kagent for the agent API. It needs Kubernetes 1.37 or later, because Substrate depends on the PodCertificateRequest and ClusterTrustBundle APIs. The CLI suits evaluation; the Helm charts, backed by your own PostgreSQL, suit production.

- **CLI install:** installs the CRDs, Agent Substrate (into `ate-system`), a development PostgreSQL database, and kagent.
- **Helm install:** separate CRD releases, CA and JWT pools from the `kubectl-ate` plugin, PostgreSQL 15 or later, then both charts.

```bash
kind create cluster --name kagent --image kindest/node:v1.37.0
curl https://raw.githubusercontent.com/kagent-dev/kagent/refs/heads/main/scripts/get-kagent | bash -s -- --version v1.0.0
export OPENAI_API_KEY="your-api-key-here"
kagent install --namespace kagent
```

The controller's default `insecure` mode admits every request and takes the caller's identity from an unverified `X-User-Id` header, so the docs warn against exposing port 8083 outside the cluster. For the gateway side, see [deploying Bifrost on Kubernetes with Helm](https://www.getmaxim.ai/articles/deploying-bifrost-on-kubernetes-with-helm-best-practices-and-common-pitfalls/).

## What kagent Leaves to Other Layers

kagent governs how agents are defined, isolated, and allowed to reach the network. Its 1.0 docs describe no spend budgets, rate limits, or failover across model providers, and its open-source build authorizes every authenticated caller. Caller access control, cost governance, model resilience, and content guardrails are left to other layers.

| Concern | What kagent 1.0 provides | What another layer supplies |
| --- | --- | --- |
| Caller authentication | `insecure` (default), `trusted-proxy`, ServiceAccount tokens | Verifying user tokens before port 8083 |
| Caller authorization | An authorizer that permits every user check | Which callers may invoke which agents |
| Model spend | Per-task token usage | Budgets and rate limits per team or agent |
| Provider resilience | One model at one provider per ModelConfig | Retries and fallbacks across providers |
| Content safety | Tool approval gates, prompt capture in traces | PII and prompt-injection guardrails |
| Network egress | Default-deny allowlist, credential injection | Already handled in the cluster |

kagent's docs point the same way: their example for blocking personal data in model requests puts the prompt guard in a gateway, and `trusted-proxy` mode decodes bearer tokens without verifying them. That gap is the job of an [agent gateway](https://www.getmaxim.ai/articles/best-agent-gateways/), and it mirrors the [identity-based AI governance](https://www.getmaxim.ai/ai-governance) teams apply to model traffic.

## Where an AI Gateway Fits for kagent Traffic

An AI gateway fits on three kagent paths: in front of the A2A endpoint, between agents and model providers, and between agents and MCP servers. kagent's egress gateway decides which hosts an agent may reach; an AI gateway decides what each call may do there, who pays for it, and where it is recorded.

![Callers reach kagent agents through Bifrost over A2A, and kagent Actors send model and MCP tool calls back through Bifrost to providers and MCP servers](https://articles-images-cdn.t3.tigrisfiles.io/diagrams/kagent/kagent-gateway-paths.png)

*Figure 3: One Bifrost deployment can govern who calls a kagent agent and what that agent spends on models and tools.*

[The Bifrost AI gateway](https://www.getmaxim.ai) governs all three paths, as Figure 3 shows:

- **Model traffic:** Bifrost exposes [one OpenAI-compatible API to 10,000+ models across 25+ providers](https://www.getmaxim.ai/llm-gateway). [Budgets and rate limits](https://docs.getbifrost.ai/features/governance/budget-and-limits) attach to virtual keys, and [retries and fallbacks](https://docs.getbifrost.ai/features/retries-and-fallbacks) move a request to another provider when the primary fails.
- **Tool traffic:** as an [MCP gateway](https://www.getmaxim.ai/mcp-gateway), Bifrost filters tools per virtual key and serves curated bundles as [Virtual MCPs](https://docs.getbifrost.ai/mcp/virtual-mcps) at `/mcp/<slug>` over streamable HTTP. Code Mode [cut a 508-tool run from $377 to $29 in token cost](https://www.getmaxim.ai/bifrost/blog/bifrost-mcp-gateway-access-control-cost-governance-and-92-lower-token-costs-at-scale).
- **Agent traffic:** the [Agent Gateway in Bifrost](https://docs.getbifrost.ai/features/agent-gateway/overview) registers an A2A v1 agent by its card URL, grants access per virtual key, and records operations in Agent Logs. Permission to call an agent is separate from permission to use models and tools.

kagent's [guide to OpenAI-compatible endpoints](https://kagent.dev/docs/kagent/latest/setup/model-providers/byo-openai/) already names Bifrost as a gateway option, with default port 8080. Overhead is about 11 microseconds per request at 5,000 RPS in [published benchmarks](https://www.getmaxim.ai/resources/benchmarks).

See the [Agent Gateway launch post](https://www.getmaxim.ai/bifrost/blog/introducing-agent-gateway-in-bifrost-one-gateway-for-models-tools-and-agents) and [how an A2A gateway governs agent-to-agent calls](https://www.getmaxim.ai/articles/a2a-protocol-gateway/).

## Pointing kagent at Bifrost: An Untested Configuration Sketch

We have not run kagent 1.0 against the [Bifrost gateway](https://www.getmaxim.ai) end to end. The sketch below uses only fields both projects document: a ModelConfig and a RemoteMCPServer that target an in-cluster Bifrost service, plus a Bifrost A2A registration for a kagent Agent's card. Validate each piece in a test cluster.

```yaml
apiVersion: api.kagent.dev/v1alpha3
kind: ModelConfig
metadata:
  name: bifrost-gpt
  namespace: kagent
spec:
  provider: OpenAI
  model: openai/gpt-4o-mini        # Bifrost provider/model naming
  apiKeySecret: bifrost-vk         # holds a Bifrost virtual key
  apiKeySecretKey: VIRTUAL_KEY
  openAI:
    baseUrl: http://bifrost.bifrost.svc.cluster.local:8080/v1
---
apiVersion: api.kagent.dev/v1alpha3
kind: RemoteMCPServer
metadata:
  name: bifrost-platform-tools
  namespace: kagent
spec:
  description: Tools from a Bifrost Virtual MCP
  url: http://bifrost.bifrost.svc.cluster.local:8080/mcp/platform-tools
  protocol: STREAMABLE_HTTP
  headersFrom:
    - name: x-bf-vk
      valueFrom: {type: Secret, name: bifrost-vk, key: VIRTUAL_KEY}
```

- **Credentials:** kagent injects an OpenAI-provider key as `authorization: Bearer`, which [Bifrost accepts for virtual keys](https://docs.getbifrost.ai/features/governance/virtual-keys). The MCP server uses `x-bf-vk`, because kagent rejects two credentials for the same host and header.
- **A2A:** [register the Agent in Bifrost by its card URL](https://docs.getbifrost.ai/features/agent-gateway/registration), add the kagent controller to the private network allowlist, and restrict port 8083 with a NetworkPolicy so callers cannot bypass Bifrost. In `insecure` mode, Session ownership reflects whatever `X-User-Id` reaches kagent.
- **Log correlation:** linking Agent Logs to model and tool logs needs [per-task correlation headers](https://docs.getbifrost.ai/features/agent-gateway/integrating-your-agent). A ModelConfig sets only static `defaultHeaders`, and kagent documents no per-task header option for its own runtime; a `byo` image can send them.

For in-VPC or air-gapped clusters, [Bifrost Enterprise](https://www.getmaxim.ai/enterprise) adds clustering, guardrails, and audit logs; the [MCP gateway resource guide](https://www.getmaxim.ai/resources/mcp-gateway) covers tool governance.

## Frequently Asked Questions

### What is kagent used for?

kagent runs AI agents inside Kubernetes clusters, mostly for operations work: diagnosing connectivity and performance problems, generating Prometheus alerts, debugging Gateway API configuration, and managing Argo Rollouts. Teams define agents as custom resources, give them MCP tools such as the bundled Kubernetes and Helm server, and call them over A2A.

### Is kagent a CNCF project?

Yes. The Cloud Native Computing Foundation accepted kagent on May 22, 2025, at the Sandbox maturity level, and it remains a Sandbox project as of November 2026. Solo.io created kagent, which is developed in the open under the kagent-dev GitHub organization with an Apache 2.0 license.

### What changed in kagent 1.0?

kagent 1.0 replaced the 0.x Deployment-based Agent with a Harness, an AgentTemplate, and a new Agent that pairs them, and runs every conversation on a sandboxed Actor that suspends between turns. The API group moved from `kagent.dev/v1alpha2` to `api.kagent.dev/v1alpha3`, ToolServer became RemoteMCPServer, and 0.10.x has no in-place upgrade path.

### Does kagent need an AI gateway?

kagent runs without one, and its egress gateway already restricts which hosts each agent can reach. A gateway becomes necessary when many agents share providers and tools, because per-team budgets, provider failover, and per-caller authorization are not part of kagent 1.0. The [difference between an agent gateway and an LLM gateway](https://www.getmaxim.ai/articles/agent-gateway-vs-llm-gateway/) explains which layer handles what.

### Can kagent use Bifrost as its model endpoint?

kagent's documentation names Bifrost as an OpenAI-compatible gateway option, and a ModelConfig with `provider: OpenAI` and a Bifrost base URL follows the documented pattern. Bifrost accepts a virtual key in the `Authorization: Bearer` header that kagent injects. We have not tested the pairing end to end, so validate it in a test cluster first.

## Getting Started with Bifrost

kagent gives Kubernetes teams a declarative, sandboxed way to run AI agents; an AI gateway adds the controls kagent leaves out: caller access, budgets, failover, and tool governance. The [open-source Bifrost gateway](https://www.getmaxim.ai) runs in the same cluster through its [Helm chart](https://docs.getbifrost.ai/deployment-guides/helm). To see how Bifrost can govern model, MCP, and agent traffic from kagent agents, [book a demo](https://www.getmaxim.ai/book-a-demo) with the Bifrost team.

## More in the blog

[![What Is an LLM Proxy? How It Works and Where It Stops](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/11/what-is-an-llm-proxy-how-it-works-and-where-it-stops-bifrost-1920x1080.png) An LLM proxy is a server between applications and model providers that forwards requests through one endpoint, holding provider keys and translating formats. This guide explains how an LLM proxy works, what it is used for, where it stops, and what an AI gateway adds.](https://www.getmaxim.ai/articles/what-is-an-llm-proxy/)

[![OpenCode Zen vs OpenCode Go: Which One Fits Your Team](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/11/opencode-zen-vs-opencode-go-which-one-fits-your-team-bifrost-1920x1080@2x.png) OpenCode Go is a flat monthly subscription to mostly open-weight coding models, while OpenCode Zen, now called OpenCode Models, bills every request per token from credits. This guide compares price, limits, models, and team controls, and shows when a self-hosted gateway fits better.](https://www.getmaxim.ai/articles/opencode-zen-vs-opencode-go/)

```json
{
    "@context": "https://schema.org",
    "@type": "Article",
    "publisher": {
        "@type": "Organization",
        "name": "Maxim Articles",
        "url": "https://www.getmaxim.ai/articles/",
        "logo": {
            "@type": "ImageObject",
            "url": "https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w256h256/2025/08/thumbnail.png",
            "width": 60,
            "height": 60
        }
    },
    "author": {
        "@type": "Person",
        "name": "Swapnoneel Saha",
        "image": {
            "@type": "ImageObject",
            "url": "https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/2026/10/pfp.jpg",
            "width": 400,
            "height": 400
        },
        "url": "https://www.getmaxim.ai/articles/author/swapnoneel/",
        "sameAs": []
    },
    "headline": "What Is kagent? Kubernetes-Native AI Agents Explained",
    "url": "https://www.getmaxim.ai/articles/kagent/",
    "datePublished": "2026-11-26T10:44:20.000Z",
    "dateModified": "2026-11-26T10:44:20.000Z",
    "image": {
        "@type": "ImageObject",
        "url": "https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w1200/2026/11/what-is-kagent-kubernetes-native-ai-agents-explained-bifrost-1920x1080@2x.png",
        "width": 1200,
        "height": 675
    },
    "description": "kagent is an open-source, Kubernetes-native platform that defines AI agents as custom resources and runs each conversation in its own sandbox. This explainer covers the kagent 1.0 resource model, deployment, MCP and A2A support, and the traffic controls it leaves to a gateway.",
    "mainEntityOfPage": "https://www.getmaxim.ai/articles/kagent/"
}
```
