Skip to main content
The env command group manages AgentKit environment resources. The current public workflow is for Claude self-host sandbox projects: create the sandbox Tool with sandbox, then create the Runtime bound to that Tool with env create. environment is an alias of env.
env create provisions a cloud Runtime and may use or create a runtime IAM role, which can incur charges while the resources exist. Confirm that the Tool, Runtime, region, and Anthropic environment settings in .agentkit/sandbox.yaml belong to the target project before running it.

Command overview

env create

Create the Runtime for the current Claude self-host sandbox project. The command requires .agentkit/sandbox.yaml generated by agentkit sandbox init -t self-host in the current directory, with project_type set to self-host. By default it reads self_host.sandbox.id as the existing Tool ID; pass --tool-id to override it. During creation, the CLI writes progress state to .agentkit/environment.yaml. After a successful create, it prints the environment state as JSON. If local state already contains a Runtime ID, the command stops unless --force-new is passed explicitly. When creating the Runtime, the CLI injects ANTHROPIC_ENVIRONMENT_ID, ANTHROPIC_BASE_URL, ANTHROPIC_ENVIRONMENT_KEY, and AGENTKIT_TOOL_ID from self_host.environment and the Tool ID. Replace the generated placeholders with real values first; this workflow does not require an additional dotenv file.

env status

Refresh and print the current self-host environment status. The command reads the Tool ID and Runtime ID from .agentkit/environment.yaml, then queries the latest cloud status. Local environment status becomes ready only when both the Tool and Runtime are Ready.

State File

.agentkit/environment.yaml is the current project’s local environment state file, written by env create and env status. It records the environment type, overall status, Tool ID, Runtime ID, image URLs, error message, and timestamps. Command output does not include the env field.
.agentkit/environment.yaml
Last modified on September 19, 2026