Observed since 21 Oct, 09:32 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AgentEnv Cloud CLI and Python SDK for sandboxes, notebooks, clusters, and AI workloads
A command-line interface for AgentEnv Cloud - manage containers, sandboxes, and more.
pip install agv
This package publishes the Python module as agentenv and installs two CLI entrypoints:
agv: package-aligned short commandagentenv: explicit command name for documentation and shell usageThe examples below keep using agv, but agentenv is equivalent:
agv version
agentenv version
python -m agentenv version
# Authenticate with an API key
agv login --api-key sk_live_xxxxx
# Set default sandbox type
agv set type xl
# Run a Python sandbox
agv run -- python3 -m http.server
# List sandboxes
agv ls
# View logs
agv logs -f <sandbox-id>
The CLI now includes cluster lifecycle commands, and the Python SDK also exposes higher-level helpers that can provision Ray/Spark clusters and connect to the cluster head over a direct public endpoint.
agv cluster ray 4x2xH100 --workspace <workspace-id>
agv cluster spark 2xH100 --workspace <workspace-id> --wait
agv cluster ls
agv cluster inspect <cluster-id>
agv cluster stop <cluster-id>
Direct-connect requires the scheduler to be able to resolve the head hypervisor public IP and (best-effort) open inbound security group rules for allow_cidr. If that integration is not configured, the cluster may start but metadata.rayAddress / metadata.sparkRemote will be missing and auto-connect will fail.
Install optional client deps if you want auto-connect:
pip install "agv[ray]"
pip install "agv[spark]"
The spark extra installs PySpark plus Spark Connect runtime deps (pandas/pyarrow/grpcio/grpcio-status/zstandard).
Keep the PySpark major/minor in sync with the Spark server version (defaults to Spark 3.5.x).
import agentenv as agv
# Shape formats:
# - "4x2xH100" => head + 4 workers, 2x H100 per worker
# - "2xH100" => single node (head only), 2x H100 on the head
cluster = agv.ray_init("4x2xH100", allow_cidr="1.2.3.4/32")
import ray
@ray.remote
def f(x):
return x + 1
print(ray.get(f.remote(1)))
cluster.close(stop_cluster=True)
import agentenv as agv
spark = agv.spark_init("4x2xH100", allow_cidr="1.2.3.4/32")
print(spark.range(10).count())
spark.close(stop_cluster=True)
Notes:
spark.remote is a standard Spark Connect URL that includes an auth param: sc://<host>:<port>/;x-api-key=<token>.haproxy). Use Dockerfile.spark and scripts/ci/build-public-spark-image.sh, then set SPARK_IMAGE_DEFAULT on the api-server (or pass image= explicitly).agv login --api-key <key> # Login with API key
agv login # Browser-based login
agv login --username <user> --password <pass> # Local dev login
agv logout # Logout
agv auth status # Show auth status
agv auth create-key "My CLI Key" # Create API key; type inferred
agv auth create-key "CI Key" --type workspace --workspace-id <workspace-id>
agv auth list-keys # List API keys
agv auth list-keys --type workspace --workspace-id <workspace-id>
API keys can be user-scoped or workspace-scoped. User keys authenticate as the
user and can access any workspace the user can access. Workspace keys are pinned
to one workspace and cannot be used against other workspace IDs. When logged in
with a workspace key, workspace list/resource commands are narrowed to that
workspace, and cross-workspace IDs return 404 Resource not found.
Use user keys for personal automation and account-level commands such as profile
inspection and selected-workspace changes. Use workspace keys for CI or services
that should only touch one workspace. agv logout only clears local
credentials.
agv run --type xl -- python3 -m http.server # Create and run
agv run --expose 8080:http -- node server.js # With port exposed
agv ls # List sandboxes
agv inspect <id> # Show details
agv logs -f <id> # Follow logs
agv stop <id> # Stop sandbox
agv rm <id> # Delete sandbox
| Type | CPU | Memory |
|---|---|---|
| micro | 500 | 512 MB |
| small | 2000 | 4 GB |
| medium | 4000 | 8 GB |
| large | 8000 | 16 GB |
| xl | 16000 | 32 GB |
agv snapshot create <sandbox-id> --name "My Environment"
agv snapshot ls
agv snapshot restore <snapshot-id>
agv app create --name web --port 8080 --min 0 --max 3
agv app create --name api --port 8080 --ready http_health --health-path /health
agv app deploy web --snapshot <snapshot-id>
agv app ls
agv app inspect <app-id-or-slug>
agv app logs <app-id-or-slug>
agv app rm <app-id-or-slug>
Notes:
port_accessible, http_health.http_health without --health-path, the CLI defaults to /health.import agentenv as agv
@agv.function("small", image="python:3.11-slim")
def add(x, y):
return x + y
print(add(2, 3))
Using an ImageBuilder:
import agentenv as agv
builder = agv.py().python_packages(["numpy"])
@agv.function("small", image=builder)
def norm(x):
import numpy as np
return float(np.linalg.norm(x))
print(norm([3, 4]))
Notes:
small, or cpu:mem).__main__ functions).agv browser create # Create browser session
agv browser create --screen-width 1920 --screen-height 1080 --stealth
agv browser create --profile-mode ephemeral --rrweb
agv browser ls
agv browser inspect <id>
agv managed-agent ls --workspace <workspace-id>
agv managed-agent create --name "Research Agent" --workspace <workspace-id> --upstream-id <upstream-id>
agv managed-agent create --name "Research Agent" --workspace <workspace-id> --upstream-id <upstream-id> --image docker://registry.example/tintin-managed-agent:latest
agv managed-agent create --name "Focused Agent" --workspace <workspace-id> --upstream-id <upstream-id> --skill-id <skill-id> --mcp-id <mcp-id>
agv managed-agent inspect <agent-id>
agv managed-agent messages <agent-id>
agv managed-agent send <agent-id> -- "summarize the repo status"
agv managed-agent wake <agent-id>
agv managed-agent fork <agent-id>
agv managed-agent rm <agent-id> --force
# Skills
agv managed-agent skill upload ./my-skill.zip --workspace <workspace-id> --name "PR reviewer"
agv managed-agent skill ls --workspace <workspace-id>
agv managed-agent skill assign <agent-id> <skill-id>
agv managed-agent skill unassign <agent-id> <skill-id>
agv managed-agent skill rm <skill-id> --force
# MCP servers
agv managed-agent mcp create --name GitHub \
--config '{"command":"npx","args":["-y","@modelcontextprotocol/server-github"]}' \
--workspace <workspace-id> \
--secret-refs '{"env":{"GITHUB_TOKEN":"secret_abc123"}}'
agv managed-agent mcp ls --workspace <workspace-id>
agv managed-agent mcp assign <agent-id> <mcp-id>
agv managed-agent mcp unassign <agent-id> <mcp-id>
agv managed-agent mcp rm <mcp-id> --force
# Telegram binding
agv managed-agent telegram bind <agent-id> \
--workspace <workspace-id> \
--name "Telegram Agent" \
--bot-token '<telegram-bot-token>' \
--bot-username agentbot
agv managed-agent telegram ls --workspace <workspace-id>
agv managed-agent telegram sync-webhook <integration-id> --workspace <workspace-id>
agv managed-agent telegram enable <integration-id> --workspace <workspace-id>
agv managed-agent telegram unbind <integration-id> --workspace <workspace-id>
agv managed-agent create --image ... overrides the server default image for this agent.agv managed-agent create without --image uses the server-configured default image (MANAGED_AGENT_IMAGE).--skill-id or --mcp-id during create to select a subset.agv managed-agent create prints Public Token: <token> in non-JSON output when the create response includes one.?token=... on /v1/public/managed-agent/* helper routes such as GET /v1/public/managed-agent/messages or POST /v1/public/managed-agent/messages.agv managed-agent inspect does not regenerate that token later..zip bundles smaller than 50 MB with SKILL.md in the archive.--workspace; if omitted, the selected CLI workspace is used.--config matches Codex mcp_servers config: use command/args for STDIO or url for HTTP/SSE servers. --secret-refs points to workspace secret IDs, never plaintext.--bot-token.managed-agent telegram bind for an agent that already has a Telegram binding overwrites that binding with the new bot token.agv notebook session create --workspace <workspace-id>
agv notebook session create --workspace <workspace-id> --type xl
agv notebook session create --workspace <workspace-id> --image docker://quay.io/jupyter/datascience-notebook:notebook-7.5.5
agv notebook session create --workspace <workspace-id> --storage-mode persistent --idle-ttl 600
agv notebook session list
agv notebook session get <id>
The CLI focuses on common day-to-day workflows. The Mintlify site and checked-in OpenAPI schema document the full api-server surface, including operational resources such as proxy usage, captcha usage, and webhook ingress.
agv workspace create "My Workspace"
agv workspace ls
agv workspace use <workspace-id>
agv workspace secret-set <ws-id> KEY value
agv file upload ./myfile.txt
agv file download /remote.txt ./local.txt
agv file ls
agv workflow ls
agv workflow create "Daily Sync" --file workflow.json
agv workflow inspect <workflow-id>
agv workflow update <workflow-id> --file workflow.json
agv workflow deploy <workflow-id>
agv workflow undeploy <workflow-id>
agv workflow execute <workflow-id> --input '{"customerId":"cus_123"}'
agv workflow execute-in-memory --workspace-id <workspace-id> --file workflow.json
agv workflow executions <workflow-id>
agv workflow execution <workflow-id> <execution-id>
agv workflow cancel <workflow-id> <execution-id>
agv workflow metrics <workflow-id>
agv workflow metrics-timeseries <workflow-id> --interval day
agv workflow node-definitions
agv workflow node-definition webhook
agv workflow plugins
agv balance # Show balance
agv billing history # Transaction history
agv set type xl # Set default type
agv set image python:3.11 # Set default image
agv set workspace <workspace-id> # Set default workspace
agv config show # Show configuration
The CLI includes full support for the AgentEnv AI Gateway:
# Chat with AI models
agv ai chat "Hello!" --model gpt-4
# Manage providers
agv ai upstreams list
agv ai pools create --name production
# See the dedicated AI Gateway guide for complete documentation
See the AI Gateway guide: https://github.com/agentenv/monorepo/blob/main/cli/README-AI-GATEWAY.md
The CLI reads configuration from multiple sources (in priority order):
--api-url, --workspace, etc.)AGENTENV_API_URL, AGENTENV_API_KEY, etc.)~/.agentenv/config.yaml).env fileapi_url: https://api.agentenv.io
workspace: wk_abc123
defaults:
type: small
image: docker.io/library/python:3.11-slim
cpu: 2000
memory: 4096
region: us-east-1
Use the API root as api_url without /v1. If you do pass a /v1 suffix, the CLI normalizes it automatically.
Build release artifacts locally:
cd cli
uv build
python3 -m twine check dist/*
Release flow:
# 1. Bump the package version in cli/src/agentenv/_version.py
# 2. Sanity-check the version metadata
cd cli
python3 scripts/check_release_version.py --print-version
# 3. Build and validate the distributions
uv build
python3 -m twine check dist/*
# 4. Tag the release with the enforced format
git tag "agv-v$(python3 scripts/check_release_version.py --print-version)"
git push origin --tags
Upload them manually when you have PyPI credentials. The API token is read from
environment/config (TWINE_PASSWORD, with TWINE_USERNAME=__token__):
TWINE_USERNAME=__token__ TWINE_PASSWORD="$PYPI_API_TOKEN" python3 -m twine upload dist/*
The repository also includes a GitHub Actions workflow for trusted publishing to PyPI, and it rejects tags whose version does not match the package version.
pypistats · 58 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-20 – 2026-10-20 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-19 – 2026-10-19 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-16 – 2026-10-16 | 3 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-14 – 2026-10-14 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-13 – 2026-10-13 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-10 – 2026-10-10 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-09 – 2026-10-09 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-08 – 2026-10-08 | 4 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-06 – 2026-10-06 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-05 – 2026-10-05 | 3 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-03 – 2026-10-03 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-02 – 2026-10-02 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-10-01 – 2026-10-01 | 5 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-30 – 2026-09-30 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-29 – 2026-09-29 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-28 – 2026-09-28 | 3 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-27 – 2026-09-27 | 3 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-26 – 2026-09-26 | 3 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-25 – 2026-09-25 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-23 – 2026-09-23 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-21 – 2026-09-21 | 58 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-19 – 2026-09-19 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-18 – 2026-09-18 | 10 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-17 – 2026-09-17 | 9 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-15 – 2026-09-15 | 7 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-14 – 2026-09-14 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-13 – 2026-09-13 | 23 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-11 – 2026-09-11 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-10 – 2026-09-10 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-09 – 2026-09-09 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-07 – 2026-09-07 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-05 – 2026-09-05 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-09-01 – 2026-09-01 | 8 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-31 – 2026-08-31 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-29 – 2026-08-29 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-28 – 2026-08-28 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-25 – 2026-08-25 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-24 – 2026-08-24 | 5 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-23 – 2026-08-23 | 4 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-22 – 2026-08-22 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-21 – 2026-08-21 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-18 – 2026-08-18 | 18 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-17 – 2026-08-17 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-15 – 2026-08-15 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-14 – 2026-08-14 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-13 – 2026-08-13 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-12 – 2026-08-12 | 4 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-10 – 2026-08-10 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-09 – 2026-08-09 | 9 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-05 – 2026-08-05 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-04 – 2026-08-04 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-02 – 2026-08-02 | 4 | 2026-10-21T10:00:41.1335624Z |
| 2026-08-01 – 2026-08-01 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-07-30 – 2026-07-30 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-07-27 – 2026-07-27 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-07-26 – 2026-07-26 | 1 | 2026-10-21T10:00:41.1335624Z |
| 2026-07-24 – 2026-07-24 | 2 | 2026-10-21T10:00:41.1335624Z |
| 2026-07-23 – 2026-07-23 | 1 | 2026-10-21T10:00:41.1335624Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.3.16 | 12 May 2026 | 21 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:32 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:27f08cecf02d2e25fd66c5c06c20e3d7c26b53edba482f0dd7cc367e5ccb382c