Skip to main content
This guide will walk you through setting up a Verifiers workspace, creating your first environment, and running evaluations.

Prerequisites

Before starting, ensure you have Python 3.10 or later installed.

Setup Your Workspace

1

Install uv and the Prime CLI

First, install uv (Python package manager) and the prime CLI tool:
2

Initialize Your Workspace

Set up a new workspace for developing environments:
This command:
  • Creates a Python project (if needed)
  • Installs verifiers
  • Creates the recommended workspace structure
  • Downloads starter configuration files
Your workspace structure will look like:
3

Add to Existing Project (Optional)

If you already have a Python project, add Verifiers without reinitializing:

Create Your First Environment

1

Initialize Environment Template

Create a new environment from the template:
This creates a new module in ./environments/my_env/ with:
2

Implement Your Environment

Edit environments/my_env/my_env.py with your environment logic:
The load_environment function is the entry point for your environment. It must return an Environment instance and can accept custom arguments.
3

Install Your Environment

Install the environment module into your project:
This makes your environment importable and runnable.

Run Your First Evaluation

1

Run Local Evaluation

Evaluate your environment with any OpenAI-compatible model:
This will:
  • Load your environment
  • Run rollouts with the specified model
  • Calculate rewards and metrics
  • Save results locally
By default, evaluations use Prime Inference. Configure custom API endpoints in ./configs/endpoints.toml.
2

View Results

Open the terminal UI to explore your evaluation results:
Navigate through:
  • Rollout samples
  • Reward distributions
  • Model completions
  • Metrics and statistics

Working with Existing Environments

1

Install from Environments Hub

Install any environment from the community hub:
2

Run Hub Environment

Evaluate it directly:

Environment Types

Verifiers supports multiple environment patterns:

SingleTurnEnv

Simple Q&A tasks with a single model response

ToolEnv

Environments with stateless Python function tools

StatefulToolEnv

Tools requiring per-rollout state (sandboxes, sessions)

MultiTurnEnv

Custom multi-turn interactions, games, agents

Building Complex Environments

Adding Tools

Create tool-enabled environments for agent tasks:

Using Sandboxes

For code execution tasks, use sandboxed environments:

Publishing Your Environment

1

Test Locally

Ensure your environment works correctly:
2

Push to Hub

Publish to the Environments Hub:
Your environment is now available to the community!

Next Steps

Environments Guide

Learn about datasets, rubrics, and custom protocols

Evaluation Guide

Deep dive into evaluation configurations

Training Guide

Train models with reinforcement learning

API Reference

Explore the complete API documentation

Common Patterns

Troubleshooting

Make sure you ran prime env install <env-name> and the environment has a valid load_environment function.
Configure your endpoints in ./configs/endpoints.toml. See the evaluation guide for details.
Ensure all dependencies are listed in your environment’s pyproject.toml and installed.