What Turf is
Turf™ runs infrastructure as code from inside your AI agent. You describe what you want, the agent writes or picks a configuration of ordinary Terraform® files, and Turf plans it. Nothing is applied until you have seen the plan and said yes.
init→okopen→defaultup→awaiting_planplan→awaiting_approval
Plan: 3 to add, 0 to change, 0 to destroy. A kind cluster, a CustomResourceDefinition and one custom resource of that kind.
Ready to apply these changes?
apply→awaiting_planplan→awaiting_approvalapply→converged
The cluster came up first, then the CRD and the custom resource on it. Apply complete: 3
added. The run is in the console:
http://127.0.0.1:8873/w/default/runs/…
illustrative · the shape of a session, not a transcript
Three pieces
Section titled “Three pieces”The MCP server is what your agent talks to. turf-mcp-server speaks the Model Context Protocol®
over stdio or HTTP, so it plugs into Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI, VS Code,
an agent running in a cluster, or your own. It exposes the Terraform commands as tools, four prompts
that show up as slash commands, and the skills that teach an agent how to use them.
The engine is where plans are made and applied. It is a separate process, which the server starts on your machine when a tool first needs it, or which runs as workloads in a cluster. It holds the state lock, runs the OpenTofu® providers, and carries every run durably: a rollout survives a server restart, a dropped client and the end of the conversation. The engine is built on Restate for that durability.
The Turf CLI is a convenience: Turf’s own agent, which drives the same server and engine with a
model you bring. turf up and turf destroy run a configuration from a terminal. It is not required,
and it comes with the Homebrew install or the script.
The loop
Section titled “The loop”A run of up is a convergence: plan, approve, apply, until the configuration is fully applied.
- The agent calls
up. The run stops at its plan gate with nothing planned yet. - The agent calls
plan. The plan is made and the run stops at its approval point, with the plan and a digest of it. - Someone approves:
applywith that digest is the approval, of that plan and no other. A low-risk plan (creates and in-place updates) the agent may approve itself; anything else, and always a destroy, it brings to you. - The engine applies the plan. Anything that could only be planned once an earlier change existed (a resource inside a cluster the plan just created) is planned next, and the loop goes back to step 2. Each pass is a round; most runs take one.
- When nothing is left, the run ends
converged.
During an apply the configuration can ask the agent to do a step itself: a backup, a check, a question for you, a message to the team. That is a turf action. The apply pauses for it and continues when the agent reports back.
Between runs, the engine can keep watching. When something it manages changes outside Turf, your agent gets a drift notice and decides what to do, with a plan as always.
The whole vocabulary, with a diagram, is in Overview.
Agent in the loop, not in charge
Section titled “Agent in the loop, not in charge”Turf produces the plan; the agent does not. The agent reads it, explains it, checks it against your policies if you have them, and asks. The server hands every agent a short set of safety rules: never approve a plan the user would not, destroy only on the user’s explicit words, never answer a turf action’s question for the user. The console, a read-only web view beside the engine, shows every run, round and approval so you can see what happened without asking the agent.
Terraform and OpenTofu
Section titled “Terraform and OpenTofu”Turf speaks the Terraform language and uses the module registry and the OpenTofu providers unchanged.
It is an independent product built on the OpenTofu framework: the plan is the OpenTofu json-format plan,
so policy engines and scanners read it directly. A few constructs are refused by name and there is no
-target; the list is in Differences from Terraform and
the matrix at turf.build/compatibility.
- Install locally: two npx commands, Homebrew or one script.
- Connect your agent: one command.
- Your first run: a kind cluster, a CRD and a custom resource in one run.
Turf™ is a trademark of Turf LLC. Terraform® is a trademark of HashiCorp. Ansible® is a trademark of Red Hat, LLC, registered in the United States and other countries. Helm®, Kubernetes®, Prometheus® and OpenTelemetry® are registered trademarks, and Jaeger™ is a trademark, of the Linux Foundation. OpenTofu® and Model Context Protocol® are registered trademarks of LF Projects, LLC. All other trademarks are the property of their respective owners. Turf is not affiliated with, endorsed by, or sponsored by HashiCorp, IBM, Red Hat, the Linux Foundation, LF Projects or the OpenTofu project.
© 2026 Turf LLC. Free for individuals, education and small businesses within the Community limits, under the Turf Community Edition License 1.0. Government and larger organizations need a commerciallicense.turf.build · Discord ·GitHub