Documentation Index
Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
Applies to:
- Plan -
- Deployment -
Summary
Automate prompt promotion across environments (local → dev → staging → production) using Braintrust API calls in CI/CD pipelines to eliminate manual environment assignments in the UI. The workflow uses prompt versioning via_xact_id transaction IDs and environment-specific assignments through idempotent PUT operations to programmatically manage prompt deployments.
Configuration Steps
Step 1: Configure environments in Braintrust UI
Create your environments (dev, staging, production) in Braintrust UI under Configuration > Environments before using the API.Step 2: Create or update prompt and assign to environments
UsePOST /v1/prompt or PUT /v1/prompt and pass environment_slugs to create the prompt and assign it to one or more environments in a single atomic request. The response includes a _xact_id (transaction ID) identifying the created version.
Step 3: Assign prompt version to additional environments
Use the environment-object API to promote the prompt version (using_xact_id from Step 2) to additional environments.
The
environment-object endpoint is not yet documented in the API reference. Contact support if you need details on this endpoint.