UI-first Approach
UI-first Approach
UI-first Approach
The instructions below will guide you through pulling a Workflow from the Vellum UI to modify and run locally.
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.

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.
If you run ls in your terminal, you should see two new items in your current directory:
vellum.lock.jsonprompt_chaining/ (or [your_workflow_module]/)From here, you can do the following:
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 code locally with:
python -m [your_workflow_module].sandbox
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
pyproject.toml and set up your development environment