FLOW MASON
beginner 15 min

Getting Started with FlowMason

Install FlowMason, set up your development environment, and run your first pipeline.

Welcome to FlowMason! In this tutorial, you’ll install FlowMason, set up your development environment, and run your first AI pipeline.

What You’ll Learn

Step 1: Install FlowMason CLI

Open your terminal and install FlowMason using pip:

pip install flowmason

Verify the installation:

fm --version

You should see output like:

flowmason 0.7.3

Step 2: Install VSCode Extension

The VSCode extension provides IntelliSense, debugging, and visual editing for FlowMason pipelines.

From Command Line

code --install-extension flowmason.flowmason

From VSCode

  1. Open VSCode
  2. Press Cmd+Shift+X to open Extensions
  3. Search for “FlowMason”
  4. Click Install

Step 3: Create a New Project

Create a new FlowMason project:

fm init my-first-project
cd my-first-project

This creates the following structure:

my-first-project/
├── flowmason.json          # Project configuration
├── components/             # Custom components
│   ├── nodes/             # AI-powered nodes
│   └── operators/         # Utility operators
├── pipelines/             # Pipeline definitions
│   └── main.pipeline.json # Sample pipeline
└── tests/                 # Pipeline tests

Step 4: Explore the Project

Open the project in VSCode:

code .

flowmason.json

This file configures your project:

{
  "name": "my-first-project",
  "version": "1.0.0",
  "components": {
    "nodes": ["components/nodes/**/*.py"],
    "operators": ["components/operators/**/*.py"]
  }
}

Sample Pipeline

Open pipelines/main.pipeline.json to see a simple pipeline:

{
  "name": "hello-world",
  "version": "1.0.0",
  "stages": [
    {
      "id": "greet",
      "component": "generator",
      "config": {
        "prompt": "Say hello in a creative way!"
      }
    }
  ]
}

Step 5: Start FlowMason Studio

Studio is the backend service that executes pipelines:

fm studio start

You’ll see:

FlowMason Studio starting...
✓ API server running at http://localhost:8999
✓ WebSocket server ready
✓ Database initialized

Keep this terminal open while developing.

Step 6: Run Your First Pipeline

Using the CLI

fm run pipelines/main.pipeline.json

Using VSCode

  1. Open pipelines/main.pipeline.json
  2. Press F5 to run

You should see the AI-generated greeting in the output!

Step 7: Try Debugging

  1. Click in the gutter next to the “greet” stage to set a breakpoint
  2. Press F5 to start debugging
  3. When paused, inspect the Variables panel
  4. Press F5 to continue

What’s Next?

You’ve successfully set up FlowMason and run your first pipeline. In the next tutorial, you’ll build a more complex pipeline with multiple stages.

Key concepts covered:

Ready for more? Continue to Building Your First Pipeline.