AI Catchup

Claude Platform Ships the 'ant' CLI for Running Managed Agent Workers From the Terminal

By 5 min read

Anthropic's Claude Platform now documents an 'ant' command-line tool that runs a self-hosted Managed Agents worker from the terminal. It polls a work queue, downloads skills, executes tool calls on your own infrastructure, and posts results back, all in the managed-agents beta.

Anthropic's Claude Platform documents an ant command-line tool that runs a self-hosted Managed Agents worker straight from the terminal. The CLI polls a work queue, downloads the agent's skills, executes tool calls on infrastructure you control, and posts results back to Anthropic's control plane (Claude Platform docs).

The launch was surfaced via a ClaudeDevs announcement on June 2, 2026 (ClaudeDevs). The durable details below come from the official Claude Platform documentation, which is the source of truth for what the CLI actually does.

What the 'ant' CLI Is

The ant CLI is a terminal binary that ships a pre-built worker for Claude Managed Agents running in a self_hosted environment. Managed Agents is Anthropic's pre-built agent harness for long-running, asynchronous work; the self_hosted environment moves tool execution onto your own infrastructure while orchestration stays on Anthropic's side (self-hosted sandboxes).

In that setup, the self_hosted environment acts as a work queue. When a session is assigned to it, Anthropic enqueues the session as a work item. A worker -- run by the ant CLI or an Anthropic SDK -- claims items from the queue, spawns an execution context, downloads the agent's skills, runs the tool calls, and posts the results back (self-hosted sandboxes).

What You Can Run From the Terminal

The documentation shows ant commands across the Managed Agents lifecycle, not a generic wrapper over the full Claude API. The commands that appear in the official docs include:

CommandWhat it does
ant beta:environments createCreate a self-hosted environment via the CLI (self-hosted sandboxes)
ant beta:worker pollRun an always-on worker that claims and executes work items (self-hosted sandboxes)
ant beta:worker runPer-session entrypoint for sandbox-per-session isolation (self-hosted sandboxes)
ant beta:sessions createStart a session that targets the environment (self-hosted sandboxes)
ant beta:environments:work statsRead queue depth and worker liveness (self-hosted sandboxes)
ant beta:environments:work stopAsk a worker to shut a session down cleanly (self-hosted sandboxes)

Anthropic notes the ant CLI supports the always-on polling pattern only; the SDK additionally supports a webhook-triggered handler (self-hosted sandboxes).

Installing and Running the Worker

The docs install ant from the anthropic-cli GitHub releases (version 1.10.0 in the documented example) onto a Linux host with /bin/bash, then run the worker against an environment (self-hosted sandboxes).

VERSION=1.10.0
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')
curl -fsSL "https://github.com/anthropics/anthropic-cli/releases/download/v${VERSION}/ant_${VERSION}_${OS}_${ARCH}.tar.gz" \
  | sudo tar -xz -C /usr/local/bin ant

ant beta:worker poll --workdir "/workspace"

The worker authenticates to its queue with an environment key (ANTHROPIC_ENVIRONMENT_KEY) and targets an environment ID (ANTHROPIC_ENVIRONMENT_ID); your separate Claude API key is used from outside the worker host to create sessions and read queue stats (self-hosted sandboxes).

Worker Flags

The reference documents the flags for ant beta:worker that control where work runs and how the process behaves (Managed Agents reference):

FlagPurpose
--environment-idEnvironment to poll for work (also reads ANTHROPIC_ENVIRONMENT_ID)
--environment-keyAuthenticates the worker (also reads ANTHROPIC_ENVIRONMENT_KEY)
--workdirDirectory where skills download and tools read/write; defaults to .
--on-workScript to call per claimed work item instead of running tools in-process
--unrestricted-pathsAllow tool calls to access paths outside --workdir
--max-idleHow long to wait after the session goes idle before shutting down; defaults to 60s
--log-formatLog output format; use json for structured ingestion

Why It Matters

For teams that need agent tool execution to stay inside their security perimeter, the ant CLI is the lowest-friction way to stand up a self-hosted worker: a single long-running process that needs only outbound HTTPS, no inbound firewall rules, and no custom agent loop. It pairs with the broader self-hosted-sandbox push Anthropic shipped in May 2026 (self-hosted sandboxes and MCP tunnels).

Choose the ant CLI when you want the simplest always-on worker and don't need webhook-triggered handling. Reach for an Anthropic SDK (Python, TypeScript, or Go) when you need the webhook-triggered pattern or finer control over per-session sandboxing (self-hosted sandboxes).

Availability

The CLI's commands live under the beta: namespace, and every Managed Agents request requires the managed-agents-2026-04-01 beta header, so the capability is in beta, not general availability (Managed Agents overview). This is a worker CLI for Managed Agents specifically; the docs do not position ant as a general-purpose command-line client for the full Messages API.

ItemStatus
Claude Managed AgentsBeta (managed-agents-2026-04-01 header required)
ant self-hosted worker CLIDocumented; always-on polling pattern only
Webhook-triggered workerSDK only (Python, TypeScript, Go)

Sources

Keep building the workspace playbook

Frequently Asked Questions

What is the 'ant' CLI?

It is a command-line tool documented on the Claude Platform that runs a pre-built self-hosted worker for Claude Managed Agents. It claims work items, downloads skills, runs tool calls on your infrastructure, and posts results back.

Does 'ant' let you call any Claude API endpoint from the terminal?

The documented commands focus on Managed Agents: creating environments and sessions and running the self-hosted worker. It is not positioned in the docs as a general-purpose CLI for the full Messages API.

Is the 'ant' CLI generally available?

The commands sit under the 'beta:' namespace and require the managed-agents-2026-04-01 beta header, so the underlying Managed Agents feature is in beta, not general availability.

Get the weekly AI Catchup

Tools, practices, and what matters -- in your inbox every Monday.