Claude Platform Ships the 'ant' CLI for Running Managed Agent Workers From the Terminal
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:
| Command | What it does |
|---|---|
ant beta:environments create | Create a self-hosted environment via the CLI (self-hosted sandboxes) |
ant beta:worker poll | Run an always-on worker that claims and executes work items (self-hosted sandboxes) |
ant beta:worker run | Per-session entrypoint for sandbox-per-session isolation (self-hosted sandboxes) |
ant beta:sessions create | Start a session that targets the environment (self-hosted sandboxes) |
ant beta:environments:work stats | Read queue depth and worker liveness (self-hosted sandboxes) |
ant beta:environments:work stop | Ask 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):
| Flag | Purpose |
|---|---|
--environment-id | Environment to poll for work (also reads ANTHROPIC_ENVIRONMENT_ID) |
--environment-key | Authenticates the worker (also reads ANTHROPIC_ENVIRONMENT_KEY) |
--workdir | Directory where skills download and tools read/write; defaults to . |
--on-work | Script to call per claimed work item instead of running tools in-process |
--unrestricted-paths | Allow tool calls to access paths outside --workdir |
--max-idle | How long to wait after the session goes idle before shutting down; defaults to 60s |
--log-format | Log 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.
| Item | Status |
|---|---|
| Claude Managed Agents | Beta (managed-agents-2026-04-01 header required) |
ant self-hosted worker CLI | Documented; always-on polling pattern only |
| Webhook-triggered worker | SDK only (Python, TypeScript, Go) |
Sources
- ClaudeDevs announcement post (June 2, 2026): https://x.com/ClaudeDevs/status/2061877343078244459
- Claude Platform docs, "Self-hosted sandboxes": https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes
- Claude Platform docs, "Reference" (self-hosted worker CLI flags): https://platform.claude.com/docs/en/managed-agents/reference
- Claude Platform docs, "Claude Managed Agents overview": https://platform.claude.com/docs/en/managed-agents/overview
Read next
Keep building the workspace playbookClaude Managed Agents Add Self-Hosted Sandboxes (Public Beta) and MCP Tunnels (Research Preview)
Anthropic says Claude Managed Agents can now run tool execution in a sandbox you control (public beta) and connect to private MCP servers via MCP tunnels (research preview). The update targets enterprise security requirements by keeping execution and private services within an organization’s perimeter.
Claude Code adds dynamic workflows (research preview) for large parallel agent runs
Dynamic workflows in Claude Code let Claude write orchestration scripts, fan out work across tens to hundreds of parallel subagents, verify results, and resume long-running jobs.
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.