A Python CLI for migrating datasets, experiments, annotation queues, project rules, prompts, and charts between LangSmith instances.
# Install (requires uv: https://docs.astral.sh/uv/)
uv tool install "langsmith-data-migration-tool @ https://github.com/langchain-ai/langsmith-data-migration-tool/releases/latest/download/langsmith_data_migration_tool-0.0.41-py3-none-any.whl"
# Set up environment variables
export LANGSMITH_OLD_API_KEY="your_source_api_key"
export LANGSMITH_NEW_API_KEY="your_destination_api_key"
# Test connections
langsmith-migrator test
# Start migrating
langsmith-migrator datasets- All-in-One Wizard: Interactive migration of all resources (
migrate-all) - Datasets: Migrate datasets with examples and file attachments
- Experiments: Migrate experiments with runs and feedback (
--include-experiments) - Annotation Queues: Transfer queue configurations
- Project Rules: Copy automation rules with automatic project creation
- Prompts: Migrate prompts with version history
- Charts: Migrate monitoring charts with filter preservation
- Interactive CLI: TUI-based selection with search/filter
This tool does not support migrating trace data. It migrates:
- Datasets and examples (including file attachments)
- Experiments, runs, and feedback
- Annotation queues
- Project rules
- Prompts
- Charts
For trace data, use LangSmith's Bulk Export functionality: LangSmith Bulk Export Documentation
Prerequisites: Python 3.12+, uv
uv tool install "langsmith-data-migration-tool @ https://github.com/langchain-ai/langsmith-data-migration-tool/releases/latest/download/langsmith_data_migration_tool-0.0.41-py3-none-any.whl"
# To update an existing installation, use --force:
uv tool install --force "langsmith-data-migration-tool @ https://github.com/langchain-ai/langsmith-data-migration-tool/releases/latest/download/langsmith_data_migration_tool-0.0.41-py3-none-any.whl"uvx --from "langsmith-data-migration-tool @ https://github.com/langchain-ai/langsmith-data-migration-tool/releases/latest/download/langsmith_data_migration_tool-0.0.41-py3-none-any.whl" langsmith-migrator testpip install "langsmith-data-migration-tool @ https://github.com/langchain-ai/langsmith-data-migration-tool/releases/latest/download/langsmith_data_migration_tool-0.0.41-py3-none-any.whl"git clone https://github.com/langchain-ai/langsmith-data-migration-tool.git
cd langsmith-data-migration-tool
uv sync
# Run with: uv run langsmith-migrator <command>export LANGSMITH_OLD_API_KEY="your_source_api_key"
export LANGSMITH_NEW_API_KEY="your_destination_api_key"
# Optional: Custom base URLs (default: https://api.smith.langchain.com)
export LANGSMITH_OLD_BASE_URL="https://your-source-instance.com"
export LANGSMITH_NEW_BASE_URL="https://your-destination-instance.com"Or use a .env file:
LANGSMITH_OLD_API_KEY=your_source_api_key
LANGSMITH_NEW_API_KEY=your_destination_api_key
LANGSMITH_VERIFY_SSL=true# Test connections
langsmith-migrator test
# Interactive wizard for all resources
langsmith-migrator migrate-all
# Datasets
langsmith-migrator datasets # Interactive selection
langsmith-migrator datasets --all # All datasets
langsmith-migrator datasets --include-experiments # With experiments, runs, and feedback
# Note: When running `datasets` without `--include-experiments`, you'll be prompted
# interactively whether to include experiments. Experiments include all runs and feedback.
# Annotation queues
langsmith-migrator queues
# Prompts
langsmith-migrator prompts
langsmith-migrator prompts --all --include-all-commits
# Project rules
langsmith-migrator rules
langsmith-migrator rules --strip-projects # As global rules
# Charts
langsmith-migrator charts
langsmith-migrator charts --session "project-name"
# Utilities
langsmith-migrator list-projects --source
langsmith-migrator resume
langsmith-migrator clean--source-key TEXT Source API key
--dest-key TEXT Destination API key
--source-url TEXT Source base URL
--dest-url TEXT Destination base URL
--no-ssl Disable SSL verification
--batch-size INTEGER Batch size (default: 100)
--workers INTEGER Concurrent workers (default: 4)
--dry-run Run without making changes
--verbose, -v Verbose output--include-experiments Include experiments, runs, and feedback (prompts if not specified)
--all Migrate all datasets without interactive selectionKeyboard shortcuts in TUI:
↑↓Navigate |SpaceToggle |aSelect all |nClear/Search |EnterConfirm |EscCancel
For self-hosted instances with SSL errors:
# Use --no-ssl flag
langsmith-migrator --no-ssl datasets
# Or set environment variable
export LANGSMITH_VERIFY_SSL=falseMIT License - see LICENSE for details.
Contributions welcome! Fork, create a feature branch, and submit a Pull Request.
For issues or questions: GitHub repository