Skip to main content

Prerequisites

Ensure you have:
  1. Prime CLI installed and configured
  2. Username set on your profile
  3. Authenticate the CLI:
    prime login
    

Creating a New Environment

Initialize Environment

Create a new environment with our starter template:
prime env init <your-env-name>
This creates a template for a Python module with:
  • A README.md file (displayed on the Environments Hub)
  • A pyproject.toml file for managing dependencies, versioning, tags, description, etc.
  • A Python file containing stub code for a load_environment function which returns a vf.Environment object — this will be the entrypoint for downstream applications to use your Environment, and should be used encapsulate any necessary preprocessing, resource provisioning, exposing configurable args, etc.

Develop Your Environment

After initialization, you can modify and test your environment. To install your environment locally, you can run:
uv pip install -e .
To test/evaluate the environment:
uv run vf-eval my-environment
Make sure to follow the verifiers library patterns when implementing your environment. Your environment should inherit from appropriate base classes and implement required methods.

Upload Your Environment

Once you’ve developed and tested your environment, push it to the Environments Hub:
# Inside the environments/<your-env-name>/ directory
prime env push
This will upload your environment under your user account. You can also upload it to a team using:
prime env push --team <team-username>
Once uploaded, your environment will be available for installation by others using prime env install owner/environment-name, unless you use the --visibility=PRIVATE flag.

URL Dependencies

If your environment depends on packages from Git repositories (not published to PyPI), you need to use the PEP 440/508 format directly in your dependencies list.

Correct Format

[project]
dependencies = [
    "verifiers",
    "tau2 @ git+https://github.com/sierra-research/tau2-bench.git",
]

Incorrect Format

Do not use [tool.uv.sources] for URL dependencies that need to work with the Environments Hub:
# ❌ This won't work - uv.sources is not embedded in wheel metadata
[tool.uv.sources]
tau2 = { git = "https://github.com/sierra-research/tau2-bench.git" }
The [tool.uv.sources] section is uv-specific and not included in the wheel package metadata. When users install your environment, the URL dependency information would be lost.
The Environments Hub automatically extracts URL dependencies from your wheel and passes them as direct requirements during installation. This works around uv’s security restriction on transitive URL dependencies from registry packages.

Version Management

Updating Your Environment

When you make changes to your environment:
  1. Update the version in pyproject.toml
  2. Push the updated environment:
prime env push
The system will automatically create a new version while keeping previous versions available.
You can use prime env push --auto-bump to automatically increment the version number for you, so you don’t need to manually update pyproject.toml each time.

Getting Help