A visual, node-based workflow builder for constructing and executing AI-powered tasks. Built with Next.js and powered by Firecrawl, Cohere, and Qdrant.
- Visual Workflow Builder: Drag-and-drop interface powered by React Flow
- DAG-Based Execution: Parallel execution of independent nodes for optimal performance
- AI-Powered Node Types:
- π₯ Input Node - Starting point with data
- π€ LLM Task - AI text generation via OpenRouter
- π Web Scraper - Advanced web scraping with Firecrawl
- π Structured Output - Extract structured data with JSON schemas
- 𧬠Embedding Generator - Generate text embeddings with Cohere
- π Similarity Search - Vector similarity search with Qdrant
- π€ Output Node - Final workflow results
- Real-time Execution Monitoring: Live logs and node state tracking
- Import/Export Workflows: Save and load workflows as JSON
- Workflow Validation: Automatic detection of cycles, disconnected nodes, and configuration errors
- Full-Stack Next.js: No Python backend required - all processing happens in Next.js API routes
- Node.js 18+ and npm
- API keys for:
- OpenRouter (LLM tasks)
- Firecrawl (web scraping)
- Cohere (embeddings)
- Qdrant Cloud (vector search)
# Clone the repository
git clone <repository-url>
cd agent-workflow-builder
# Install dependencies
npm install
# Create .env.local file with your API keys
# See SETUP_GUIDE.md for detailed instructionsCreate a .env.local file in the root directory:
OPENROUTER_API_KEY=your_openrouter_key_here
FIRECRAWL_API_KEY=your_firecrawl_key_here
COHERE_API_KEY=your_cohere_key_here
QDRANT_URL=https://your-cluster.qdrant.io
QDRANT_API_KEY=your_qdrant_key_hereπ See SETUP_GUIDE.md for detailed API key setup instructions.
npm run devThe application will be available at http://localhost:3000
- Add Nodes: Click on node types in the left palette to add them to the canvas
- Connect Nodes: Drag from one node's output (right) to another node's input (left)
- Configure Nodes: Click on a node to configure its parameters in the right panel
- Execute: Click "Run Workflow" to execute the workflow
- Monitor: Watch real-time logs and node states during execution
- Save/Load: Export workflows as JSON or load existing workflows
Here's a simple workflow that scrapes a website and summarizes it:
- Add a Web Scraper node and set the URL
- Add an LLM Task node and set the prompt to: "Summarize this content: {{input}}"
- Connect the Web Scraper to the LLM Task
- Add an Output node and connect it to the LLM Task
- Click Run Workflow
- Payload: Raw text or JSON data to start the workflow
- Prompt: The prompt for the LLM (use
{{input}}to reference previous node output) - Model: Choose from available OpenRouter models
- Temperature: Control randomness (0-2)
- Max Tokens: Maximum response length
- URL: The webpage to scrape
- Max Length: Maximum text length to extract
- Uses Firecrawl for advanced scraping with markdown output
- JSON Schema: Define the structure you want to extract
- Model: Choose the LLM model for extraction
- Automatically validates output against schema
- Model: Choose between embed-english-v3.0 or embed-multilingual-v3.0
- Input Type: search_document, search_query, classification, or clustering
- Custom Text: Optional text to embed (otherwise uses input from previous nodes)
- Generates 1024-dimensional vectors using Cohere
- Collection Name: Name of the Qdrant collection to search
- Top K: Number of similar results to return (1-20)
- Score Threshold: Minimum similarity score (0-1)
- Query Text: Optional text query (will be auto-embedded if provided)
- Returns ranked results with similarity scores
- No configuration needed - displays final results
- React Flow: Visual node editor for drag-and-drop workflow building
- Zustand: Lightweight state management for workflow state
- TypeScript: Type safety across the entire application
- Tailwind CSS: Modern, utility-first styling
- Next.js API Routes: Serverless functions for all backend logic
- OpenRouter: Unified LLM API access for text generation and structured extraction
- Firecrawl: Advanced web scraping with markdown output and dynamic content support
- Cohere: Text embedding generation for semantic search
- Qdrant Cloud: Vector database for similarity search
User Interface (React Flow)
β
Workflow Store (Zustand)
β
Workflow Engine (TypeScript)
β
Next.js API Routes
β
External APIs (OpenRouter, Firecrawl, Cohere, Qdrant)
- DAG-based: Topological sort for execution order
- Parallel Execution: Independent nodes run simultaneously
- Real-time Updates: Live log streaming
- Cancellable: Stop execution mid-workflow
agent-workflow-builder/
βββ src/
β βββ app/
β β βββ api/
β β β βββ workflow/
β β β βββ execute/route.ts # Workflow execution endpoint
β β β βββ validate/route.ts # Workflow validation endpoint
β β βββ page.tsx # Main application page
β β βββ globals.css # Global styles
β βββ components/
β β βββ nodes/ # Custom node components
β β β βββ BaseNode.tsx
β β β βββ InputNode.tsx
β β β βββ LLMTaskNode.tsx
β β β βββ WebScraperNode.tsx
β β β βββ StructuredOutputNode.tsx
β β β βββ OutputNode.tsx
β β βββ WorkflowCanvas.tsx # React Flow canvas
β β βββ ConfigPanel.tsx # Node configuration panel
β β βββ Toolbar.tsx # Top toolbar
β β βββ LogPanel.tsx # Execution logs
β β βββ NodePalette.tsx # Node type palette
β βββ lib/
β β βββ engine.ts # Workflow execution engine
β β βββ validator.ts # Workflow validation
β β βββ workflow-io.ts # Import/export utilities
β βββ store/
β β βββ workflowStore.ts # Zustand store
β βββ types/
β βββ workflow.ts # TypeScript types
OPENROUTER_API_KEY=your_openrouter_api_key_here- Core workflow builder with React Flow
- DAG-based parallel execution
- 5 essential node types
- Real-time execution logs
- Import/export workflows
- Workflow templates library
- Custom node creation API
- Database persistence
- Scheduled workflow execution
- Multi-user support & authentication
- Node marketplace
- Advanced error handling & retry logic
- Workflow versioning
- Ensure Python virtual environment is activated
- Check that all dependencies are installed:
pip install -r requirements.txt - Verify OpenRouter API key is set in
.env
- Check that FastAPI server is running on
http://localhost:8000 - The Next.js application automatically routes requests to FastAPI via
/api/fastapi/* - Check browser console and logs panel for errors
- Ensure FastAPI server is configured to allow requests from
http://localhost:3000 - Check that both servers are running
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions, please open an issue on GitHub.
Built with β€οΈ using Next.js, React Flow, and FastAPI