UI-first Approach
The instructions below will guide you through pulling a Workflow from the Vellum UI to modify and run locally.
Set up your environment
Using uv (Recommended)
Using venv
Before proceeding, make sure you have set your VELLUM_API_KEY
environment variable. See the installation guide for instructions on how to set this up.
Get CLI command from Vellum UI
- Open a Workflow on the Workflows page in Vellum. In this example we’ll use one of the prebuilt workflows: Prompt Chaining.

-
Click the “Command Line” option and copy the CLI snippet in the subsequent modal.
The command should look like this:
vellum workflows pull --workflow-sandbox-id=<some_id> --include-sandbox
-
Paste that command into your terminal and voila! You’ve now pulled your Workflow into locally runnable SDK code.
Closing out
If you run ls
in your terminal, you should see two new items in your current directory:
vellum.lock.json
prompt_chaining/
(or[your_workflow_module]/
)
From here, you can do the following:
View the Workflow code
Open [your_workflow_module]/workflow.py
to see the top-level graph definition for your Workflow. In the Prompt Chaining example, it should look like this:
Run the Workflow
Run the code locally with:
python -m [your_workflow_module].sandbox
Push changes back to the UI
To push changes back to the UI, head back to the Workflow Sandbox UI and grab the “push” CLI command from the Command Line UI.
The command should look like this:
vellum workflows push [your_workflow_module]
for example:
vellum workflows push prompt_chaining
Next Steps
- Core Concepts - Learn about BaseWorkflow, BaseNode, and control flow
- Defining Control Flow - Master workflow graph patterns
- Configuration - Create a
pyproject.toml
and set up your development environment - Examples - Explore real-world Workflow examples
- Evaluations - Test your Workflows rigorously
- Custom Nodes - Add Custom Nodes to your project, share with teammates in UI or as code