Tools

Anthropic Introduces 'ant apply' for Declarative AI Resource Management

Anthropic has released ant apply in the ant CLI, enabling developers to manage Claude agents, environments, and skills declaratively via code repositories.

A
AIDeveloper44 Team
September 4, 2026·4 min read
Anthropic Introduces 'ant apply' for Declarative AI Resource Management

Anthropic's new ant apply command brings declarative infrastructure-as-code workflows to Claude Managed Agents.

TL;DR
  • Anthropic added the ant apply command to the ant CLI tool to support resource management as code.
  • Developers can declare Claude agents, execution environments, skills, memory stores, and scheduled deployments in local files.
  • State management is tracked via a generated claude-lock.json file that synchronizes remote API resource IDs and hashes.
  • The tool resolves cross-file relative path dependencies automatically and provides dry-run planning before applying API updates.

Anthropic has introduced ant apply to its official ant command-line interface, bringing declarative infrastructure-as-code patterns to Claude Managed Agents and related API resources. According to an announcement from the @ClaudeDevs account on X and the updated Claude Platform documentation, developers can now define agent configurations, execution environments, external skills, memory stores, and automated deployments as version-controlled files inside their repositories.

Declarative AI Configuration as Code

Historically, configuring cloud-hosted agent environments and tool integrations has often required imperative API requests, manual dashboard entries, or custom deployment automation scripts. With ant apply, Anthropic introduces a model analogous to configuration-as-code tools such as Terraform or Kubernetes manifests, tailored specifically to the Claude ecosystem.

Developers author configurations locally using Markdown, YAML, or JSON. The CLI determines the resource type either from the file path conventions or internal specifications. For instance, putting a file in an agents/ directory marks it as an agent specification. When written as Markdown, the file's YAML frontmatter contains configuration options—such as model selection (including claude-opus-5), tools, and parameter settings—while the Markdown body acts as the agent's base system prompt.

State Tracking with the Lockfile

A central component of this workflow is the claude-lock.json file generated in the project root. When a user runs ant apply for the first time, the CLI outputs an execution plan detailing resources to be created. Once approved, the command provisions the resources on the Claude Platform API and records their unique identifiers, workspace IDs, organization details, and configuration hashes into claude-lock.json.

This lockfile serves several operational functions:

  • Idempotent updates: Subsequent executions compare local definitions against remote API hashes, ensuring resources are updated in place rather than duplicated.
  • CI/CD synchronization: Committing the lockfile to source control allows continuous integration pipelines and team members to synchronize the exact same deployed environments.
  • Session discovery: Client applications can read the generated lockfile to retrieve runtime resource IDs necessary to instantiate user sessions.

The command features interactive confirmations, allowing engineers to review plans or pass a --dry-run flag to inspect detailed diffs without making remote API modifications.

Supported Resource Primitives

The system expands beyond simple agent prompt definitions to cover several components of the Claude platform architecture:

  • Agents: Authored in agents/, containing system instructions, tool definitions (such as agent_toolset_20260401), and references to coordinator or sub-agent rosters.
  • Environments: Authored as YAML files in environments/, specifying execution settings like container configurations and network access policies (e.g., unrestricted networking).
  • Memory Stores: Written in memory_stores/, defining persistent storage across distinct execution runs for house-style decisions or recurring data.
  • Skills: Packaged as directories containing a SKILL.md manifest under skills/, bundleable as a single unit or referenced directly from public or private GitHub repositories.
  • Deployments: Markdown manifests under deployments/ that configure schedule triggers, cron parameters, and the initial messages used to bootstrap recurring tasks.

Dependency Resolution and Path Referencing

One of the primary complexities in managing multi-component AI systems is orchestrating dependent resources, such as an agent that requires a specific skill bundle, an execution container, and shared memory. The ant apply mechanism handles this by permitting relative path references across files.

Instead of requiring hardcoded identifiers, a deployment manifest can directly reference ../agents/reviewer.md and ../environments/cloud.yaml. During parsing, the CLI computes the dependency graph, provisions dependencies in their proper order, pins the versions, and replaces relative paths with the generated remote API identifiers before dispatching the final API payloads. If an unmanaged cloud asset needs to be referenced, the tool also accepts direct API resource IDs.

By shifting agent definitions from manual API calls to version-controlled declarative files, Anthropic aims to bring standardized software engineering review practices, code collaboration, and automated continuous delivery pipelines to autonomous agent management.

Diagram: Declarative AI resource management workflow using Anthropic's 'ant apply'

Enjoyed this?

Get more posts like this delivered to your inbox.