| title | Kubernetes-Native AI Agent Workflows with AgentFlow |
|---|---|
| date | 2026-06-27 |
| description | Blog post generated by AgentFlow from https://www.youtube.com/watch?v=dQw4w9WgXcQ |
AI agents are moving from demos into production internal tooling — and platform teams are inheriting the operational debt. Orchestration logic scattered across notebooks, application code, and one-off scripts is not a sustainable foundation. If your team manages infrastructure with GitOps and kubectl, your AI workflows should be no different. This post walks through AgentFlow, a Kubernetes controller that brings AI agent pipelines into the same operational model you already use for everything else.
Most AI agent workflows exist outside any standard platform primitive. A LangGraph script runs in a notebook. An OpenAI SDK chain lives inside application code. A multi-step pipeline fires on a cron job and logs to nowhere in particular. When something breaks, there's no kubectl describe to run, no events to inspect, no Git history to trace back to a bad change.
Platform teams end up with a two-tier system: everything else is managed as code with proper observability, and AI workflows are a black box. AgentFlow closes that gap.
AgentFlow introduces a clear separation of concerns:
- Developers build individual agents using whatever framework they prefer — LangGraph, the OpenAI SDK, custom HTTP services — anything that exposes an endpoint.
- Platform teams define how those agents connect into workflows using Kubernetes Custom Resource Definitions (CRDs).
- Git is the source of truth. Kubernetes is the control plane.
This mirrors how platform teams already manage applications, infrastructure, and policy. You're not adopting a new paradigm — you're extending an existing one to cover AI workloads.
An AgentWorkflow resource describes the pipeline: which agent endpoints to call, in what order, and how to pass outputs between steps. A run is triggered with a standard kubectl apply.
apiVersion: agentflow.io/v1alpha1
kind: AgentWorkflow
metadata:
name: summarize-and-route
spec:
steps:
- name: summarize
endpoint: http://summarizer-svc.agents.svc.cluster.local/run
- name: classify
endpoint: http://classifier-svc.agents.svc.cluster.local/run
- name: route
endpoint: http://router-svc.agents.svc.cluster.local/runapiVersion: agentflow.io/v1alpha1
kind: AgentWorkflowRun
metadata:
name: summarize-and-route-run-001
spec:
workflowRef: summarize-and-route
input:
text: "Quarterly earnings report content goes here..."Applying the AgentWorkflowRun triggers the controller to create a runner Job. That Job calls each agent endpoint in sequence, passing the output of each step as the input to the next. No custom orchestration code required.
Every AgentWorkflowRun exposes its state through standard Kubernetes status fields and events. No custom dashboard or additional observability platform required.
kubectl describe agentworkflowrun summarize-and-route-run-001A successful run surfaces the final output directly in the resource status:
Status:
Phase: Succeeded
Steps:
- Name: summarize
Status: Completed
- Name: classify
Status: Completed
- Name: route
Status: Completed
Output:
destination: "finance-team-slack-channel"
A failed step surfaces a clear error message in the same place:
Status:
Phase: Failed
Steps:
- Name: summarize
Status: Completed
- Name: classify
Status: Failed
Message: "HTTP 503 from classifier-svc: model backend unavailable"
On-call engineers who have never touched an AI system can triage a failed run the same way they triage any other failing workload. No context-switching, no log spelunking across three different tools.
The operational benefits compound as you add more workflows:
- GitOps compatibility out of the box. Every workflow definition lives in a Git repository and can be reviewed, versioned, and rolled back like any other manifest.
- No proprietary lock-in. AgentFlow is indifferent to the framework running inside each agent. Any service that exposes an HTTP endpoint works.
- Consistent tooling across roles. SREs, platform engineers, and developers interact with the same
kubectl-based interface they use for everything else. - Separation of concerns at the right layer. Agent logic stays with developers. Workflow orchestration and day-two operations stay with the platform team.
If you want to apply this model to your own AI workloads, the operational path is straightforward:
- Package each agent as a Kubernetes Service behind an HTTP endpoint. The internal implementation — LangGraph, raw OpenAI SDK calls, a custom model server — is irrelevant to AgentFlow.
- Define your
AgentWorkflowmanifest in your existing GitOps repository alongside your other platform resources. Apply the same review and approval process you use for any infrastructure change. - Trigger runs with
AgentWorkflowRunfrom CI pipelines, event-driven triggers, or manually withkubectl apply. Treat workflow runs as first-class Kubernetes objects from day one. - Wire existing alerting to workflow run status. Because
AgentWorkflowRunexposes phase and step status as standard fields, Prometheus rules and alert routing work without modification.
AI workflows don't need to be a special case in your platform. Define them as resources, manage them with Git, observe them with kubectl. The same boring, reliable operations model you already trust — applied to one more category of workload.