Introduction
The Vellum Workflows SDK is a framework for defining and executing complex AI systems as graphs.
This SDK is currently in Beta and is subject to change. If you’d like to participate in our beta program, you can join our waitlist.
The Vellum Workflows SDK provides a declarative Python syntax for both defining and executing the control flow of graphs. Unlike other graph execution frameworks, which are functional or event-driven in nature, Vellum’s Workflows SDK defines the control flow of a graph statically and makes use of strict typing. This means that the structure of the graph is known ahead of time, and you get all the benefits of type safety and intellisense. This ultimately makes it easier to build more predictable and robust AI systems.
Unique amongst other frameworks, Vellum’s Workflows SDK also allows you to visualize, edit, and execute your graph in a UI, pushing and pulling changes from code to UI and vice versa.
Open Source
The Vellum Workflows SDK is open source and publicly available on GitHub. See source code here.
Core Features
- Nodes: Nodes are the basic building blocks of a graph. They represent a single task or function.
- Graph Syntax: An intuitive, declarative syntax for defining the control flow of a graph.
- Inputs and Outputs: Both the Workflow itself and individual Nodes can take in inputs and produce outputs, which can be used to pass information between Nodes or Workflows.
- State: Nodes can read and write to the graph’s global state, which can be used to share information between Nodes without defining explicit inputs and outputs.
- Advanced Control Flow: Support for looping, conditionals, paralellism, state forking, and more.
- Streaming: Nodes can stream output values back to the runner, allowing for long-running tasks like chat completions to return partial results.
- Human-in-the-loop: Nodes can wait for External Inputs, allowing for a pause in the Workflow until a human or external system provides input.
- UI Integration: Push and pull changes from code to Vellum’s UI and vice versa, allowing for rapid testing and iteration.
Quickstart
-
Install the Vellum Workflows SDK:
-
Import the Vellum Workflows SDK and define your first Workflow:
-
Run it!
Next Steps
Note: To use most out-of-box Nodes, and to push/pull to/from the Velłum UI, you’ll need a Vellum account and API key. Talk to us or visit our pricing page for more information.