3 min read AI-generated

ant apply: Anthropic Brings Infrastructure-as-Code to Claude Agents

Copy article as Markdown

With version 1.30.0 of the ant CLI, agents, skills, environments, memory stores, and deployments can be described as files in your repo and synced with the API in one command. A lockfile remembers what already exists. If you know Terraform, you'll feel right at home.

Featured image for "ant apply: Anthropic Brings Infrastructure-as-Code to Claude Agents"

Until now, you created agents on the Claude Platform through API calls or the Console. The result lived somewhere in Anthropic’s backend, with an ID you had to remember and a state nobody could trace in git. ant apply, shipped on September 3 in version 1.30.0 of the ant CLI, changes that. Agents become files in your repo.

How it works

You write a Markdown file under agents/. The frontmatter holds the configuration: name, model, tools, skills. The body is the system prompt. Then you run ant apply agents/summarizer.md. The CLI prints a plan of what it would create or change, waits for a yes, and writes a claude-lock.json. That lockfile records the ID of every resource it created plus two hashes: what was last sent and what the API returned. On the next run, that’s how the CLI notices whether a file was edited or whether someone changed the resource outside the files.

The lockfile belongs in git. That’s the whole point: the next run, on your machine or in CI, updates the same resources instead of creating new ones. --dry-run shows the detailed plan without touching anything.

Beyond agents, it handles environments (YAML), memory stores (YAML), deployments (Markdown, where the body becomes the first message of each session), and skills (a directory with a SKILL.md, uploaded as one bundle). ant apply . processes the whole directory at once.

The real trick: relative paths instead of IDs

Resources point at each other by file path. Wherever the API expects an ID, you write ../skills/pr-summary or ./reviewer.md. The CLI creates everything in dependency order and fills in the real IDs. Anthropic’s example is a reviewer agent with a PR-summary skill, a lead agent that coordinates the reviewer via its roster, a cloud environment, a memory store for recurring review notes, and a nightly cron deployment that works through open pull requests. All of it: six small files.

Agent and skill references get pinned to the version just applied. Edit reviewer.md and everything that points at it updates in the same run. Skills can also be referenced straight from GitHub, say a directory from Anthropic’s skills repo, pinned to the resolved commit until you run with --upgrade.

Why this makes me happy

Over the past months I’ve watched more than once how quickly agent setups turn into sprawl. Three versions of an agent in the Console, nobody remembers which one is live, the system prompt sits in a Slack thread. This is exactly the problem Terraform solved for servers years ago: config in the repo, plan before apply, a state file as the source of truth.

Anthropic adopting that pattern one to one, lockfile and dry-run included, is the right call. Agents now go through the same code review as everything else. If you’re already working with the Managed Agents API, spend the weekend pouring your agents into files. You won’t want to go back.

Sources: Claude Platform Release Notes (September 3, 2026), Docs: Manage resources as code with ant apply