Skip to content

roh210/agent-workflow-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Agent Workflow Builder

A visual no-code platform for building AI-powered workflows. Drag, drop, and connect nodes to create RAG pipelines, automation workflows, and intelligent agents β€” without writing code.

License Version PRs Welcome


Overview

Agent Workflow Builder enables users to visually compose AI pipelines by connecting modular nodes on an interactive canvas. v1 focuses on RAG (Retrieval-Augmented Generation) patterns, with agentic features planned for future releases.

Why This Exists

Building AI workflows typically requires:

  • Writing integration code across multiple APIs
  • Managing complex data flow between steps
  • Handling execution order and error states

This tool abstracts that complexity into a visual interface where pipelines are composed by connecting nodes.


Features

Current (v1 - RAG Pipeline Builder)

  • 🎨 Visual Canvas β€” Drag-and-drop node-based workflow editor
  • πŸ”— 7 Core Nodes β€” Data Input, Web Scraping, Structured Output, Embeddings, Similarity Search, LLM Task, Data Output
  • βœ… Smart Validation β€” Type-safe connections with cycle detection and compatibility matrix
  • πŸ’Ύ Auto-Save β€” Changes persist automatically with debounced PUT requests
  • ⚑ Execution Engine β€” Topologically-sorted execution with real-time status
  • πŸ“Š Output Inspection β€” View results per node after execution

Roadmap

Version Focus Status
v1 RAG Pipelines 🚧 In Progress
v2 Triggers, Conditionals, Memory πŸ“‹ Planned
v3 Agentic Features (Tool Router, ReAct) πŸ“‹ Planned
v4 Production (Evals, Guardrails, Observability) πŸ“‹ Planned

Building a Valid Workflow

Workflows must follow the node compatibility matrix β€” each node only accepts specific inputs based on what it produces. Invalid connections are rejected with an error toast.

Node Data Flow

Node Receives Produces Can Connect To
Data Input Nothing β€” entry point Raw text or JSON Web Scraping, LLM Task, Embedding Generator, Structured Output
Web Scraping URL (text) Scraped + summarised text Structured Output, LLM Task, Embedding Generator, Data Output
Structured Output Unstructured text Structured JSON object Embedding Generator, LLM Task, Data Output
Embedding Generator Text Vector (float array) Similarity Search only
Similarity Search Query vector Similar text chunks + scores LLM Task, Data Output
LLM Task Text context Text response Data Output, Structured Output, Embedding Generator, LLM Task
Data Output Anything Nothing β€” terminal node Nothing

Rules

  • βœ… Every workflow needs at least one Data Input node
  • βœ… Every workflow needs at least one Data Output node
  • ❌ Circular connections are not allowed (cycle detection enforced)
  • ❌ A node cannot connect to itself
  • ❌ Duplicate edges between the same two nodes are not allowed
  • ℹ️ LLM Task β†’ LLM Task is valid for prompt chaining pipelines

Example Workflows

Simple LLM Pipeline:

Data Input β†’ LLM Task β†’ Data Output

RAG Pipeline (Chat with any website):

Data Input β†’ Embedding Generator β†’ Similarity Search β†’ LLM Task β†’ Data Output
                                         ↑
                        Web Scraping β”€β”€β”€β”€β”˜

Structured Data Extraction:

Data Input β†’ Web Scraping β†’ Structured Output β†’ Data Output

Prompt Chaining:

Data Input β†’ LLM Task (summarise) β†’ LLM Task (extract insights) β†’ Data Output

Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL database (local or hosted)
  • OpenAI API key

Installation

# Clone the repository
git clone https://github.com/yourusername/agent-workflow-builder.git
cd agent-workflow-builder

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env.local

Environment Variables

# .env.local
DATABASE_URL="postgresql://user:password@localhost:5432/agent_workflow_builder"
OPENAI_API_KEY="sk-..."
NEXT_PUBLIC_APP_URL="http://localhost:3000"

Database Setup

# Generate Prisma client
npx prisma generate

# Push schema to database
npx prisma db push

# (Optional) Open Prisma Studio
npx prisma studio

Run Development Server

npm run dev

Open http://localhost:3000 to access the application.


Architecture

Tech Stack

Layer Technology
Framework Next.js 14 (App Router)
Canvas React Flow
State Management Zustand
Database PostgreSQL + Prisma
AI OpenAI API
Styling Tailwind CSS

Data Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Canvas    │────▢│   Zustand   │────▢│   Prisma    β”‚
β”‚ (React Flow)│◀────│   Store     │◀────│ (PostgreSQL)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  Execution  β”‚
                    β”‚   Engine    β”‚
                    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β–Ό            β–Ό            β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚ Executor β”‚ β”‚ Executor β”‚ β”‚ Executor β”‚
        β”‚  (LLM)   β”‚ β”‚(Embedding)β”‚ β”‚ (Scrape) β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Execution Order

Nodes execute in topological order determined by Kahn's algorithm (BFS):

User clicks Run
      ↓
topologicalSort(nodes, edges)
      ↓
[dataInput, webScraping, embedding, similarity, llmTask, dataOutput]
      ↓
for each node in order:
  output = executeNode(node, previousOutput)

This guarantees every node receives fully computed input from its dependencies before executing.


Node Reference

v1 Nodes

Node Purpose Key Config
Data Input Entry point for workflows inputType, placeholder, defaultValue
Web Scraping Fetch content from URLs url, shouldSummarize, summarizationModel
Structured Output Extract JSON from text via LLM schemaDefinition, exampleOutput, model
Embedding Generator Convert text to vectors model, dimensions
Similarity Search Find similar chunks in vector store topK, similarityThreshold
LLM Task General LLM processing model, temperature, promptTemplate
Data Output Format and display final result outputFormat, prettyPrint

API Reference

Workflows

Method Endpoint Description
GET /api/workflows List all workflows (paginated)
POST /api/workflows Create workflow
GET /api/workflows/:id Get workflow with nodes and edges
PUT /api/workflows/:id Update workflow (nodes + edges)
DELETE /api/workflows/:id Delete workflow
POST /api/workflows/:id/execute Trigger execution

Executions

Method Endpoint Description
GET /api/executions/:id Get execution status and progress

Development

Running Tests

# Unit tests
npm run test

# Watch mode
npm run test:watch

# Test coverage
npm run test:coverage

Linting & Formatting

npm run lint
npm run format

Database Migrations

npx prisma migrate dev --name your_migration_name
npx prisma migrate deploy   # production

License

MIT β€” see LICENSE for details.


Acknowledgments


Contact

Roheena β€” LinkedIn Β· GitHub


Built with focus and intention 🌟

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages