Skip to main content
Applies to:
  • Plan - Any
  • Deployment - Any
  • Use case - Migrate selected project resources between Braintrust organizations and validate destination projects before switching applications

Summary

You can copy project resources from one organization to another with the braintrust-migrate tool. The tool copies logs, experiments, dataset contents, and the latest prompts. Enable attachment copying to copy attachments. Recreate organization-scoped credentials, re-push bundled functions, reconfigure environments, and validate copied automations in the destination project.

What is happening

The migration tool copies selected resources into destination projects. It does not change organization-scoped credentials. Older prompt or function versions and dataset revision history are not preserved. Bundled code functions must be re-pushed. Project environments and provider secret values are not migrated and need manual setup. The tool copies project automations.

Fix or suggestion

  1. Clone or download the migration tool from github.com/braintrustdata/braintrust-migrate, then follow its installation instructions to install the Python package. Run the workflow to copy the chosen projects to the destination org. Use date filters to start with a representative subset of production logs and experiments, and enable attachment copying for the selected data.
  2. Validate the migrated development project in the destination org before migrating production. Test and validate a representative subset of production logs and experiments before expanding the production migration. Confirm logs, experiments, datasets, and prompts look correct.
  3. Create a Braintrust API key or service token in the destination organization with the required permissions. Update your applications to use the new key. Keys scoped to the source organization do not transfer.
  4. Re-push any bundled code functions to the destination project with your normal deployment process, for example bt functions push.
  5. Recreate project environments and provider secrets in the destination project. Validate the automations copied by the tool rather than recreating them.

Option 2: Manual recreate and selective import

  1. Create the destination projects in the new organization.
  2. Export datasets or artifacts you need from the source project and import them into the destination project. Use the tool only for items you want copied.
  3. Manually recreate environments and provider secrets. Recreate automations only if you did not copy them with the tool. Re-push bundled code functions and generate a new Braintrust API key in the destination org.

How to confirm it worked

  • Open the destination project URL such as braintrust.dev/app/my-org/p/my-project-dev and confirm logs, experiments, and dataset rows are present.
  • Verify your application can authenticate with the new Braintrust API key and that online scorers or other integrations run successfully.

Notes

  • The migration does not preserve older prompt or function versions or dataset revision history. Plan to recreate history you need.
  • Large-scale log and experiment migrations are not thoroughly tested. Use date filters to test a representative subset of production logs and experiments before expanding the migration, and enable attachment copying for the selected data.
  • Public repository: github.com/braintrustdata/braintrust-migrate.