---
name: envloop
description: Install and use EnvLoop to run agent evaluations, inspect results, fine-tune models, manage checkpoints, and deploy or call inference endpoints. Use for EnvLoop CLI, Python SDK, or public API workflows.
metadata:
  author: EnvLoop
  homepage: https://docs.envloop.ai
---

# EnvLoop

Canonical entry: https://docs.envloop.ai/skill.md

## Install this skill

If this skill is not already available to your coding agent, run this from your
project and choose the agent and Project installation scope when prompted:

```bash
npx skills@latest add https://docs.envloop.ai --skill envloop
```

The Skills CLI requires Node.js 22.20 or later. You can select an agent explicitly
with `--agent codex` or `--agent claude-code`. The skill adds reusable EnvLoop
instructions to your agent; install the CLI or Python SDK below when your task
needs them.

## EnvLoop workflows

EnvLoop provides Agent, Sandbox, Train and Inference Jobs, typed Trials, versioned datasets, execution Profiles and checkpoints. Submit Jobs through the CLI or SDK; Console Experiment pages provide read-only progress, results and artifacts. For existing training code, see https://docs.envloop.ai/agent-docs/en/training/sdk-compatibility.md . Follow the user's requested workflow; installing or reading this skill does not request a training run.

> Inference deployments are typed Jobs. A Trial represents one independently managed worker process lifetime. Submit through `el job submit --type inference --file REQUEST.json`, then use the returned Job ID with `job get/pause/resume/wake/event/stop`. Inference calls use `/v1/job/{job_id}/Inference/*` (capital I), and the model must belong to that Job. Do not route by Trial ID or retry retired root `inference` commands.

## 1. Choose an integration

- **CLI:** `el` and `envloop` are equivalent entrypoints. Best for discovery, resource operations and scripts.
- **Python SDK:** `from envloop import Client`; training uses `client.training_jobs.models()` and `client.training_jobs.submit(request)`. Public interactive training is removed; use managed Jobs only.
- **Continued and tagged training:** Managed `Qwen/Qwen3.8-27B` text SFT accepts `parent_checkpoint` (an `envloop://` checkpoint of a succeeded Job in the same project), `hyperparams`, `loss_on` and `labels`; discover the ranges in `GET /v1/job/training-models` and read https://docs.envloop.ai/agent-docs/en/training/optimization.md#qwen-options .
- **Image training:** Managed GLM-5.3-Flash and configured Qwen3.8-27B SFT recipes accept bounded inline images in message records. Discover modalities before submission; public image-conditioned interactive sampling is removed. Check model-specific limits at https://docs.envloop.ai/agent-docs/en/training/models.md and prepare images with https://docs.envloop.ai/agent-docs/en/training/data.md .
- **HTTP API:** `https://api.envloop.ai` for resource operations; `https://api.envloop.ai/v1/job/YOUR_JOB_ID/Inference` for OpenAI-compatible inference.
- **Browser Console:** https://console.envloop.ai for sign-in, project selection, keys and account management.
- **Human documentation:** https://docs.envloop.ai/ (English), https://docs.envloop.ai/zh-cn/ (简体中文). Respond in the user's preferred language; identifiers and commands stay unchanged.

Reading this file requires no account. Install the public [envloop-cli package](https://pypi.org/project/envloop-cli/) for both CLI and Python SDK access. API usage requires an authorized EnvLoop account/project and credential.

## 2. Install the public CLI and SDK

Use Python and pip; current interpreter requirements are listed on [PyPI](https://pypi.org/project/envloop-cli/). Reuse a suitable existing client environment, or create a virtual environment in the user's project. Do not overwrite an existing environment.

```bash
python -m pip install --upgrade envloop-cli
el --help
el checkpoint --help
el job --help
```

The client project and distribution are named `envloop-cli`, distinct from the EnvLoop organization and platform. Its Python import package is `envloop`; CLI entrypoints remain `el` and `envloop`.
The standard installation includes training dependencies. Verify imports in the
Python environment that will run the user's script:

```bash
python -c 'from envloop import Client; print("EnvLoop managed SDK ready")'
```

Install the CLI as an isolated tool with `uv tool install envloop-cli` when that
fits the user's environment. A tool environment does not automatically install
the SDK into another Python project. Check `el --help` before assuming command
availability. Use a fresh environment if an earlier source installation also
owns the `envloop` Python module. If an older installation lacks a needed capability,
follow the installation guide to upgrade the environment that runs the script,
respecting the project’s dependency locks. No source checkout or GitHub account is needed.

Installation details: https://docs.envloop.ai/agent-docs/en/cli-install.md

## 3. Authenticate and verify the project

Reuse the user's existing saved configuration when it matches the requested project. For initial setup, choose one path:

```bash
# Initiate the normal browser authorization flow.
el auth login
el auth status --check
```

The user completes the browser sign-in and approves their initiated request. To create a project API key in Console, select its workspace and project, open **Configure → API Keys** in the project navigation, and choose **Create API Key**. The secret is shown once; save it privately. Alternatively, configure an existing project API key with the masked input wizard:

```bash
el auth config set base-url https://api.envloop.ai
el auth config
el auth status --check
```

For noninteractive services, read `ENVLOOP_BASE_URL`, `ENVLOOP_API_KEY`, `ENVLOOP_WORKSPACE_ID`, and `ENVLOOP_PROJECT_ID` from the user's existing secret environment. Do not request secrets in chat, hardcode them in source, print them, or send them to documentation/GitHub hosts. Context headers choose a workspace/project; they do not enlarge the key's capabilities.

Harbor Agent settings use ordinary named Profile KV: String `AGENT_NAME=claude-code`, exact `AGENT_VERSION=X.Y.Z`, `MODEL_NAME`, `MODEL_PROTOCOL=anthropic`, HTTPS `MODEL_BASE_URL`, and Secret `MODEL_API_KEY`. Secret masks the Console only; authorized API reads, exports and the agent retain the original key. Do not print it in reports or logs. Submit with `el job submit --runner NAME@REVISION --dataset DATASET@VERSION --task-id TASK --profile NAME@VERSION --wait`. An approved exact Runner and validated task template are required. New KV mode has no gateway lease accounting or revocation. Historical Profile specs and hashes stay unchanged; editing a new version converts Agent keys. New writes use `agent` / `agent_version` for structured encrypted Profiles and reject retired or mixed keys and `claudecode`. Existing encrypted `model_connection.api_key_ref` bindings stay intact. See the Profiles guide for optional Claude Code variables and migration.

Verify access before creating work:

```bash
el auth config show --json
el dataset list --limit 5 --json
el dataset list --type trajectory --q demo --limit 5 --json
el job list --limit 5 --json
```

`auth config show` reports key presence, not its value. Empty resource lists are valid in a new project. Permission errors require the correct identity/context; reinstalling does not grant access.

### HTTP path without a CLI installation

Use an existing authorized `ENVLOOP_API_KEY`. A project-bound key selects its bound workspace/project, so these reads need neither an SDK package nor manually entered context IDs. Inspect `/v1/me` to verify the resolved context:

```bash
curl --fail-with-body --silent --show-error \
  https://api.envloop.ai/v1/me \
  -H "Authorization: Bearer $ENVLOOP_API_KEY"

curl --fail-with-body --silent --show-error \
  'https://api.envloop.ai/v1/job?limit=5' \
  -H "Authorization: Bearer $ENVLOOP_API_KEY"
```

Resource paths, encoding rules and errors: https://docs.envloop.ai/agent-docs/en/reference/http-api.md

## 4. Run the requested workflow

Read the relevant linked guide before a write; it contains inputs and currently supported behavior. Raw Markdown is available at the links below, without JavaScript or sign-in.

For training, use the user's project Key with training.run and sufficient balance. Discover configured managed recipes with client.training_jobs.models(), then submit a managed Job. Public interactive training is completely removed, including upstream SDK/direct HTTP and old credentials. GLM is a default managed offering in cloud mode; authentication, project isolation, enforce billing, budget/quota, rate, safety, region, capacity and emergency deny still apply. Configured readiness, accepted submission and runnable GPU capacity are separate.

1. Use the user’s existing goal, budget and stopping limits; clarify only missing constraints needed to proceed. Include startup and required evaluation/saves in estimates; estimates and reserved funds are not the final bill.
2. Prepare data and balance mixed-task examples and examples for the goal; custom loss/RL/optimizer resume are unsupported by the built-in SFT recipe. If assessing quality, choose held-out inputs and output format, length and stopping criteria before training. See https://docs.envloop.ai/agent-docs/en/training/data.md#mixed-tasks .
3. Submit the managed Job once and record its Job ID. Cold startup and the first step can take longer. Inspect the same Job within the agreed limits. A timeout does not establish whether work ran; retry identical content with the same request ID instead of creating duplicate paid Jobs.
4. Report the execution and metrics actually verified. For quality assessment, compare complete, unmodified baseline and trained outputs under the agreed criteria; successful training or lower NLL alone does not establish improvement.
5. Confirm saved checkpoint files are durable and retain the requested outputs before cleanup. Inspect the Job terminal state and resource-release evidence; stop your Job through the CLI when requested. When a download is needed, perform it and verify sizes/hashes on CPU. Clean only requested temporary resources. Follow https://docs.envloop.ai/agent-docs/en/training/checkpoints.md .

Dataset content types are `environment` (Task/environment collections) and `trajectory` (trajectory metadata); omitted legacy types read as `environment`. Use `el dataset list --type trajectory --q demo` or `GET /v1/datasets?type=trajectory&q=demo`. Filtering happens on authorized content before paging; keep type, search and scope when following a cursor. Visible revisions with different types return `DATASET_TYPE_CONFLICT`. Type is not Job type and does not enable trajectory file-only publishing, a training reader or execution. Console provides a Type column and All types / Environment / Trajectory filter.

The default `dataset list` table follows the Console catalog: Name, Type, Visibility, Splits, Authors, Versions, Catalog Updated. An Observed footer shows the page observation time when supplied. Times use the local timezone with its offset. Missing metadata displays `-`; a legacy response omitting type displays Environment in the table. Explicit unknown types remain visible. SDK and `--json` preserve the raw response, including omitted or unknown types. Compare catalog contents using the same platform, workspace and project as the Console.

Environment Dataset Jobs may contain Tasks with different images. On an E2B platform, the first run can wait for environment builds; `--delete-delay 600` retains sandboxes for ten minutes after completion or ordinary failure. Cancellation and timeout release them immediately. Registry and runtime support are controlled by the platform; see the Jobs guide.

Profile Key inputs suggest supported Agent/model keys and allow custom keys. Selecting MODEL_API_KEY chooses Secret. To edit via CLI, use `el profile update NAME NEW_VERSION --from-version BASE --file CHANGES.json`, with `{"spec":{"params":{"AGENT_VERSION":"2.1.208"}}}` for v2, or root params for historical v1. Omitted fields and Secret markers are preserved; supplied metadata replaces that field. New versions are immutable; omitted source versions use only the explicit default. Version numbers remain explicit and defaults change only through set-default. SDK v2: `client.profiles.update(name, new_version, from_version=base, patch={"spec":{"params": {...}}})`. Check `el profile --help` for client support.

Named Profile specs may use `secret_params` to mark string parameter keys for masked Console display (first/last four Unicode characters around a fixed mask; nonempty values of eight characters or fewer are fully masked). This is not encryption: authorized APIs, CLI exports and Runners retain the original values. Never print those values in reports or logs; see the Profiles guide.

| User intent | Guide |
| --- | --- |
| First small agent Job and output | https://docs.envloop.ai/agent-docs/en/guides/quickstart.md |
| Dataset Jobs, attempts, stop and results | https://docs.envloop.ai/agent-docs/en/guides/jobs.md |
| One Trial's logs, scores and artifacts | https://docs.envloop.ai/agent-docs/en/guides/trials.md |
| Dataset versions and task selection | https://docs.envloop.ai/agent-docs/en/guides/datasets.md |
| Execution Profiles | https://docs.envloop.ai/agent-docs/en/guides/profiles.md |
| Profile-based single-task evaluation: pin inputs, submit, verify and clean up with synthetic examples | https://docs.envloop.ai/guides/profiles#single-task-best-practice |
| Start, follow and steer RSI loops (MCP, REST, `el job run start/live/steer/stop`), the read-only Model Loops Console section and tagged training runs | https://docs.envloop.ai/agent-docs/en/guides/agent-runs.md |
| Evaluation and public leaderboard boundaries | https://docs.envloop.ai/agent-docs/en/guides/evaluation.md |
| Prepare SFT tokens, targets and masks | https://docs.envloop.ai/agent-docs/en/training/data.md |
| Fixed 10-step CLI Hello World | https://docs.envloop.ai/agent-docs/en/training/cli-hello-world.md |
| First training step | https://docs.envloop.ai/agent-docs/en/training/quickstart.md |
| Run existing compatible training SDK code on EnvLoop | https://docs.envloop.ai/agent-docs/en/training/sdk-compatibility.md |
| Train → verify checkpoint → deploy → call | https://docs.envloop.ai/agent-docs/en/training/train-deploy.md |
| Checkpoint recovery and downloads | https://docs.envloop.ai/agent-docs/en/training/checkpoints.md |
| Inference profiles, adapters, endpoints and lifecycle | https://docs.envloop.ai/agent-docs/en/guides/inference.md |
| Billing, members, limits and settings | https://docs.envloop.ai/agent-docs/en/guides/console.md |
| All CLI groups and options | https://docs.envloop.ai/agent-docs/en/reference/cli.md |
| Python SDK interfaces | https://docs.envloop.ai/agent-docs/en/reference/python-sdk.md |

Use `/agent-docs/zh-cn/` instead of `/agent-docs/en/` for matching Chinese documents. The full page directory is https://docs.envloop.ai/llms.txt .

A Trial is one Agent or Train Runner run; steps, futures, checkpoints and technical retries do not create Trials. Unified Trial workflows require matching platform and client updates. Train submission retains the old single spec and accepts `{request_id, trials: [{name?, spec}, ...]}` with independent specs/seeds and no inner request IDs. All items are validated before group creation; the current maximum is 16. Managed Trials are sequential by default and one failure does not stop siblings. Stop a Trial for one run, or the Job for all queued/running members. Do not infer real GPU success from local contract checks.

Common read-only commands:

```bash
el job get JOB_ID
el job result JOB_ID
el trail list --type train --job-id JOB_ID --json
el trail get TRIAL_ID
el trail result TRIAL_ID
el job list --type train --limit 5 --json
el job log JOB_ID --source system --tail 200 --json
el checkpoint list --limit 5 --json
el job list --type inference --json
```

Replace symbolic IDs with values returned by the platform. The CLI spells Trial as **`trail`**; HTTP paths and SDK fields retain `trial`. `checkpoint` is a root group; serving operations live under `job serving-profile`, `job adapter`, and `job submit --type inference` with `job get/pause/resume/wake/event/stop`; resource cleanup lives under `setting`. Check each command's `--help` before assuming a flag is accepted. Submit/get/result commands already return JSON; do not append `--json` where unsupported.

Use `el job log JOB_ID --follow` for incremental Agent, Sandbox and Train Job logs; `--follow --json` emits complete pages as NDJSON. Sources are `all`, `system` and `runtime`; `--cursor` and `--tail` are mutually exclusive. The default tail is 200, and `--limit` is 1–1000. Agent/Sandbox logs need `jobs.read`; Train logs need `training.read` and remain available for 7 days after a job ends. Historical or backend-specific output may be unavailable: inspect capture status, missing reasons and dropped bytes. Do not infer no output, successful training or resource release from an empty log page. Ctrl-C stops following without stopping training. In Console Jobs → Logs, select a recorded process and download its sanitized log artifact; archive upload status is separate from capture completeness. See https://docs.envloop.ai/agent-docs/en/training/monitoring.md .

## 5. Call a ready inference model

Obtain the exact model string from the endpoint or deployment receipt. An adapter alias is part of that string; do not substitute an endpoint ID. With an authorized project key and `ENVLOOP_MODEL` set to that returned model:

```python
import json
import os
import urllib.request

payload = {
    "model": os.environ["ENVLOOP_MODEL"],
    "messages": [{"role": "user", "content": "Reply with one short greeting."}],
    "max_tokens": 64,
}
request = urllib.request.Request(
    "https://api.envloop.ai/v1/job/YOUR_JOB_ID/Inference/chat/completions",
    data=json.dumps(payload).encode(),
    headers={"Content-Type": "application/json",
             "Authorization": "Bearer " + os.environ["ENVLOOP_API_KEY"]},
)
with urllib.request.urlopen(request, timeout=120) as response:
    result = json.load(response)
print(result["choices"][0]["message"]["content"])
```

This uses Python's standard library. An idle endpoint may need to wake and may allocate billable capacity; inspect its state and the user's intended operation before sending requests. The full deployment guide covers readiness, wake, pause, idle scaling and errors.

## Completion and recovery

- Carry out the user's authorized task. Model training, endpoint allocation and inference can incur costs; respect their model, step, duration and budget limits. Stop when a required permission, unsupported capability or budget limit prevents progress.
- Users choose task/model inputs, not executor/provider/backend selection. The platform owns execution resources.
- Save resource IDs and receipts immediately. An uncertain response is a reason to inspect the existing resource, not to create duplicate jobs or endpoints. Use the same request ID only for a retry of the same submission.
- Train Metrics contains actual observations only. Historical untagged logs or unsupported per-model stopping remain explicitly unavailable; do not substitute aggregate Job output or invent missing metrics.
- A Job `completed`, Trial `succeeded`, nonzero evaluation reward, durable checkpoint and callable endpoint are distinct results. Check what the user actually requested. Trial logs are separate from the public result payload.
- For checkpoint delivery, confirm durable files and retain the requested model outputs; verify sizes and hashes if a download is requested. Create a serving endpoint only when the user requests deployment; then verify readiness and an authorized inference response within their budget. Follow requested cleanup operations to their final result without deleting retained or unrelated work.
- Report the proven outcome, resource IDs, usable endpoint/model, verification limits, retained resources and any ongoing idle/serving behavior. Keep secrets, signed download URLs and private data out of reports.

Troubleshooting: https://docs.envloop.ai/agent-docs/en/guides/troubleshooting.md

Console Experiment pages are read-only. Submit Agent Jobs with `el job submit` and Train Jobs with `el job submit --type train`; use CLI lifecycle commands. Dataset pages provide no Run as job action.

In Data → Datasets, version numbers open fixed revisions. Blue Task names open a separate detail page with a Trial-style identity summary and Overview / Files tabs. Files supports folder browsing, read-only preview and download. Preserve the workspace, project, revision, member index and member-list cursor when sharing links; Back to Dataset revision returns to the same page and keeps duplicate names distinct.

Console observation: open Jobs, select the Job, then use Trials to open an individual Agent or Train run. Both Job types share Logs, Metrics and Events tabs; training charts and trace downloads live in Metrics. The header workflow shows lifecycle progress. Console Experiment pages remain read-only.

Agent Jobs also have a separate Eval Result tab showing scored/requested coverage, aggregate scores and per-Task score, pass, pass@k and pass^k. The `tab=eval-result` link opens it directly. Console labels the requested k explicitly (for example pass@2 / pass^2), displays unit-interval primary scores and pass rates as percentages. Job scores, per-Task results and the project leaderboard share this format; API score stays the raw mean reward. Values outside 0–1 and independent composite metrics retain their own scales. Only members with exactly the requested attempts, all scored, enter k metrics; inspect fully scored Task coverage. API score_counts.total includes undispatched requested slots. Zero scores are retained; missing scores remain unavailable. For general benchmark formulas and the missing-result policy difference from Harbor, see the Evaluation guide. Job Matrix is removed.

Job and Trial Artifacts load uploaded text/JSON/log contents on selection when inline previews are absent. Previews stop at 1 MiB with a truncation notice and support retry; download retains the full original file.

Cost is a separate shared Job tab. Training Overview contains configuration and metadata. Agent Job estimates may be unavailable; do not infer cost from duration.

Sandbox workflow: `el job submit --type sandbox --runner base`, then `el job log JOB_ID --source runtime --follow` and `el job result JOB_ID`. `base` resolves to registered ANS `envhub/base@main`; no Dataset is required. Default image: `python:3.11`; override with `--image IMAGE`. Pin a published revision with `--runner envhub/base@REVISION`; a missing registered Runner fails, with no implicit local fallback. Verify actual expected stdout/stderr, exit code zero and terminal completed status before reporting success. Executor/provider are server configuration.

Profile value configuration: Runner `[params]` declares required/default/description in one TOML inline table per parameter, for example `agent_name = { default = "oracle", description = "Harbor Agent name" }`; new Profiles use `envplatform.profile/v2`, basic fields at root and actual values in `spec.params`. Console separates Basic information / Spec configuration, supports local TOML/JSON import and Fork from existing. CLI `profile create --file PROFILE.toml` imports complete content; `profile fork SOURCE_NAME SOURCE_VERSION NAME VERSION` publishes an explicit new identity. For v2 update use `{"spec":{"params":{"AGENT_VERSION":"2.1.208"}}}` and SDK `patch={"spec":{"params": {...}}}`; v1 keeps root params. For schema-enabled Runners the platform renders names uppercase into Job env with Runner default < Profile < submission precedence, without `${...}` expansion. Profile runner/dataset can supply omitted submission selectors. Historical hashes, scope, explicit versions/defaults and the trusted Agent credential bridge stay intact. See the bilingual Profiles guide for examples and masking limits.
