For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
BlogLog InRequest Demo
HomeProductDevelopersSelf-HostingChangelog
HomeProductDevelopersSelf-HostingChangelog
  • Getting Started
    • Overview
  • Workflows SDK
    • Introduction
    • Installation
      • Overview
      • Start in Code
      • Start in UI
    • Core Concepts
    • Defining Control Flow
    • Configuration
    • Custom Docker Images
  • Client SDK
    • Introduction
    • Authentication
    • API Versioning
LogoLogo
BlogLog InRequest Demo
On this page
  • Next Steps
Workflows SDKQuickstart

UI-first Approach

Was this page helpful?
Previous

Core Concepts

Next
Built with

The instructions below will guide you through pulling a Workflow from the Vellum UI to modify and run locally.

1

Set up your environment

Using uv (Recommended)
Using venv
$uv venv
$source .venv/bin/activate # On Windows: .venv\Scripts\activate
$uv add vellum-ai

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.

2

Get CLI command from Vellum UI

  1. Open a Workflow on the Workflows page in Vellum. In this example we’ll use one of the prebuilt workflows: Prompt Chaining.
Prompt Chain Workflow UI (condensed node view)
  1. 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

  2. Paste that command into your terminal and voila! You’ve now pulled your Workflow into locally runnable SDK code.

3

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:

1# ... node imports ...
2
3class Workflow(BaseWorkflow[Inputs, BaseState]):
4 graph = TopicResearch >> OutlineCreation >> ContentGeneration >> FinalOutput
5 unused_graphs = {Note}
6
7 class Outputs(BaseWorkflow.Outputs):
8 final_output = FinalOutput.Outputs.value
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