Quick Start

This guide walks you from a fresh clone to a running workflow in under 10 minutes.

Prerequisites

  • Node.js 18+ — check with node --version
  • npm 9+ or pnpm 8+
  • PostgreSQL — Neon (recommended, free tier) or a local instance
  • Redis — Upstash (recommended, free tier) or a local instance
  • NVIDIA NIM API key — free at build.nvidia.com (used for the default AI model)

Free tier friendly

Neon and Upstash both have generous free tiers. You can run the full stack without spending anything for development.

Step 1: Clone and Install

git clone https://github.com/SingularityAI-Dev/modular9.git
cd modular9
npm install

Step 2: Configure Environment Variables

Copy the example environment file and fill in your values:

cp .env.example .env.local

Open .env.local and set the required variables:

# Database — get a free connection string from neon.tech
DATABASE_URL="postgresql://user:password@host/dbname?sslmode=require"

# Redis — get free REST credentials from upstash.com
REDIS_KV_REST_API_URL="https://your-instance.upstash.io"
REDIS_KV_REST_API_TOKEN="your-token"

# AI — free API key from build.nvidia.com
NVIDIA_API_KEY="nvapi-..."

# Auth — generate with: openssl rand -base64 32
AUTH_SECRET="your-secret-here"

# Public demo route (can be same as NVIDIA_API_KEY)
NVIDIA_DEMO_API_KEY="nvapi-..."

Step 3: Set Up the Database

Run the Drizzle ORM migrations to create all required tables:

npx drizzle-kit push

This creates the tables for users, workflows, executions, knowledge bases, and triggers.

Step 4: Start the Development Server

npm run dev

Open http://localhost:3000. You should see the Modular9 canvas.

First launch

On your first visit, the Composer landing page appears if you have no saved workflows. This is the AI-powered entry point for building workflows in plain English.

Step 5: Build Your First Workflow

Let's build a simple two-node workflow that reviews code and then generates documentation.

  1. On the Composer screen, type a description:
    Review my code for security issues, then write documentation for the reviewed code
    
  2. Press Enter. The AI agent designs a workflow with a Code Review node and a Documentation Generator node, connected automatically.
  3. Click Run to execute.

Option B: Build Manually

  1. Click + New Workflow from the toolbar (or press N).
  2. A Chat trigger node appears at the canvas origin by default.
  3. Open the left sidebar and expand DevPack.
  4. Drag Code Review onto the canvas.
  5. Drag Documentation Generator onto the canvas.
  6. Connect: Trigger → Code Review → Documentation Generator by dragging from the source handle (right edge) to the target handle (left edge) of the next node.

Configure the Code Review Node

  1. Click the Code Review node to select it.
  2. In the right panel, click the gear icon (Advanced Settings).
  3. Under LLM Configuration, set:
    • Model: meta/llama-3.3-70b-instruct (default)
    • Temperature: 0.3 (lower = more consistent reviews)
    • Max Tokens: 4096

Default model

All nodes default to the model set in your user settings. You only need to override per-node if you want different behavior for specific agents.

Run the Workflow

  1. Click the Chat Trigger node and set an input prompt in the trigger settings dialog (gear icon on the node):
    Review this function for security vulnerabilities:
    
    function getUser(id) {
      return db.query(`SELECT * FROM users WHERE id = ${id}`)
    }
    
  2. Click Run in the toolbar.
  3. The Output tab in the right panel shows real-time results as each node executes.

Step 6: Save and Reload

  1. Press Cmd+S (or click Save in the toolbar) to save your workflow.
  2. Your saved workflows appear in the Workflows section of the sidebar.
  3. Load any workflow by clicking its name.

What's Next

Now that you have a working workflow, explore: