Overview
An environment is a named collection that associates specific versions of prompts with a deployment context. This enables you to:- Maintain version control: Pin stable prompt versions to production while testing new versions in development
- Enable staged deployments: Promote prompt versions through dev/staging/production pipelines
- Support A/B testing: Compare different prompt versions across environments
- Isolate changes: Test prompt modifications without affecting production systems
Create environments
Environments are configured through the Braintrust UI in your organization settings. Each environment has:- Name: A human-readable name (e.g., “Development”, “Production”)
- Slug: A unique identifier used in API calls (e.g., “dev”, “prod”)
- Description: Optional details about the environment’s purpose
- Navigate to your organization settings
- Go to the Environments section
- Select Add Environment
- Enter the name, slug, and optional description
- Save the environment
Associate prompts with environments

Load prompts with environments
Using the SDK
The Braintrust SDK supports loading prompts with environment parameters:Using the REST API
You can load prompts with environment parameters directly via HTTP:load-prompts-rest.ts