Reference architecture · v0.10 · November 2026
Infrastructure as code with Turf™ on kagent 1.0. Ask in chat, approve the plan, and your cluster provisions it: cloud resources, clusters, anything with a Terraform® provider. The agent plans. A person approves. Only the engine touches the cloud.
How it fits together
kagent 1.0 runs an agent in your cluster. Turf, an infrastructure-as-code toolset built on OpenTofu®, gives that agent Terraform plan and apply as MCP tools. Ask in the kagent chat for cloud infrastructure, and it comes back as a plan for you to approve.
The cloud credentials stay with Turf’s engine. The agent’s sandbox holds none: it can propose a plan, which waits for a person, and afterwards fetch a public URL to check the result.
What runs where. A person asks and approves in the kagent UI. The agent plans through Turf’s MCP server. The engine applies, with the credentials, to what is outside the cluster, and the agent then fetches the public URLs of what it built.
Four of its pages, each the answer to one question. The quoted lines are from runs on 2026-11-16.
One management cluster makes a fleet of workload clusters and keeps watch over it. The layout is familiar from Cluster API; Turf builds it with Terraform modules and Terraform providers instead. Each cluster is a stack made from a Terraform module, and the module decides who manages what runs in it: Argo CD, syncing addons and workloads from Git; Turf, with both as Terraform resources; or a Turf of the cluster’s own. With drift detection on, Turf watches what it manages: when something drifts, a watching agent gets a notice and proposes a plan, approved like any other.
You approve that exact plan: the agent’s apply carries the plan’s digest, and
kagent asks because that tool is bound with requireApproval: true. A rejection
applies nothing, and the agent says so: You rejected the destroy, saying the team is still using the fleet,
so nothing was applied.
A turf action is a step of the apply that the agent carries out. This one asks it to
fetch each function’s URL and compare what it answers.
HTTP/1.1 200 OK · {"message":"Hello from the cluster.","function":"turf-kagent-demo-1"}
Turf’s engine runs as a Knative service. Pods start when a plan or an apply needs them, and go when it is done. Three sessions asked for a fleet each, a minute apart: a second pod joined while the work overlapped, and about a minute after the last run ended, none were left.
The idea, a run with its screenshots and transcript, the engine under three sessions, and the example to run.
The example in the paper is public, at github.com/turfbuild/turf-kagent. You need a kind cluster with Kubernetes 1.37, an AWS account, an Anthropic API key, Turf, and the kagent CLI (1.0.0).
$ git clone https://github.com/turfbuild/turf-kagent && cd turf-kagent $ turf -C setup/aws up # once: the engine’s AWS key $ export ANTHROPIC_API_KEY=... $ ./setup/up.sh # kagent, Turf and the agent
Then open the kagent UI, pick the agent turf, and ask it for a fleet as a stack
called demo. Approve the plan, and the request that follows the agent’s check. Destroy the
stacks before you delete the cluster: the functions are outside it.
The walkthrough in the docs has each step.
Turf is available now, as a download. No form, no login. Free for individuals, education and small businesses within the Community limits. Government and larger organizations need a commercial license, and any organization can evaluate Turf in non-production for 30 days.
Read the PDF Get started Licensing
Also from Turf: Metal to Tokens, a reference architecture for managed GPU cloud infrastructure, for neocloud providers; and Pull Request to Production, a reference architecture for Terraform delivery on GitHub Agentic Workflows. All papers →
Kubernetes® and Helm® are registered trademarks, and Knative and Argo trademarks, of the Linux Foundation. OpenTofu® is a registered trademark of LF Projects, LLC. Amazon Web Services, AWS, AWS Lambda and Amazon EKS are trademarks of Amazon.com, Inc. or its affiliates. GKE is a trademark of Google LLC, and Azure, as in Azure Kubernetes Service (AKS), of the Microsoft group of companies. kagent is a Cloud Native Computing Foundation project. Turf is not affiliated with, endorsed by, or sponsored by HashiCorp, IBM, the Linux Foundation, the OpenTofu project, Amazon, Google, Microsoft, Solo.io or Restate; every mark is used only to describe interoperability. All other marks belong to their owners.