An enterprise-grade, full-stack AI Operations Automation Platform that enables operators to describe complex workflows in plain English and automatically turns them into executable, visual multi-agent graphs.
The platform executes workflows through a deterministic and autonomous chain of 5 cooperating AI agents, connects to third-party SaaS tools (Gmail, Slack, Discord, Google Sheets) with application-level token encryption (AES-256-GCM), queues background jobs with exponential retry backoff, and streams live multi-agent execution events to the browser in real time via Socket.IO.
- π€ Prompt-to-Workflow AI Compiler: Automatically generates complete DAG nodes, coordinates, animated edges, and step configurations from natural language prompts using OpenRouter (LLaMA 3.3 / Claude 3.5), Google Gemini 1.5 Flash, or a deterministic rule-based graph engine.
- π¨ Visual Drag-and-Drop Canvas: Built with React Flow (
@xyflow/react), featuring custom node components, animated edge flow lines, mini-map navigation, draggable node library palette, and dynamic node configuration inspector. - π 5-Agent Cooperating Orchestration Engine:
- Planner Agent: Performs topological sort on the workflow DAG, resolves step dependencies, and emits a confidence score.
- Execution Agent: Executes steps by evaluating dynamic template tags (e.g.,
{{nodes.ai_1.output.summary}}) and invoking external integrations or AI models. - Validation Agent: Verifies output schema integrity, field presence, and data correctness.
- Recovery Agent: Classifies runtime errors (
MISSING_FIELDS,API_FAILURE,AUTH_EXPIRED,RATE_LIMIT,TRANSIENT) and applies exponential backoff retries or operator escalations. - Monitoring Agent: Persists an immutable timeline audit trail in MongoDB and broadcasts real-time WebSocket events.
- π Encrypted Third-Party Integrations: OAuth & webhook integrations for Gmail, Slack, Discord, and Google Sheets. Credentials are encrypted at rest with AES-256-GCM using
CREDENTIAL_ENCRYPTION_KEY. - β‘ Zero-Friction Local Development: Built-in fallback engines allow the entire platform to boot and run locally without requiring standalone external MongoDB or Redis services installed.
- π‘ Real-Time Live Timeline: Watch multi-agent execution events stream into the UI with color-coded agent badges, live node output inspection, and pause/resume/cancel controls.
graph TD
User([Operator / User]) --> Prompt[Natural Language Prompt]
Prompt --> AIBuilder[AI Builder / AI Workflow Compiler]
AIBuilder --> Providers[OpenRouter / Gemini / Rule Engine]
AIBuilder --> DAG[Visual React Flow Canvas]
DAG --> BackendAPI[Backend API / Express REST API]
BackendAPI --> Save[Save / Execute]
subgraph "Agentic Orchestration Layer"
BackendAPI --> Planner["1. Planner Agent"]
Planner --> ExecutorAgent["2. Execution Agent"]
ExecutorAgent --> Validator["3. Validation Agent"]
Validator --> ValidationResult{"Schema Valid?"}
ValidationResult -->|Yes| Monitor["5. Monitoring Agent"]
ValidationResult -->|No| Recovery["4. Recovery Agent"]
Recovery --> Retry["Retry with Backoff"]
Recovery --> Escalate["Escalate"]
Retry --> ExecutorAgent
Escalate --> Monitor
end
subgraph "Third-Party Integrations Layer (AES-256 Encrypted)"
ExecutorAgent --> Gmail["Gmail API"]
ExecutorAgent --> Slack["Slack API / Webhooks"]
ExecutorAgent --> Discord["Discord Webhooks / Bot"]
ExecutorAgent --> Sheets["Google Sheets API"]
end
subgraph "Real-Time and Persistence"
ExecutorAgent --> MongoDB[(MongoDB)]
ExecutorAgent --> Redis[(Redis)]
Monitor --> Events["Real-Time Events"]
end
- Frontend: Next.js (Pages Router), React 19, Tailwind CSS, Zustand, Axios, React Flow (
@xyflow/react), Socket.IO client, Lucide React icons. - Backend: Node.js, Express, MongoDB (Mongoose), JSON Web Tokens (JWT), BullMQ + Redis (via
iorediswith in-memory fallback), Socket.IO, Helmet, Morgan, Compression, Express-Validator, Bcryptjs (Cost 12), Cryptography (AES-256-GCM). - AI Models: OpenRouter API, Google Generative AI (
@google/genai& REST), Deterministic DAG Compiler. - Integrations: Gmail, Slack, Discord, Google Sheets.
Follow these steps to get the entire platform up and running locally in under 2 minutes.
- Node.js:
v18.0.0or higher (tested onv20.xandv24.x) - npm:
v9.0.0or higher
(Optional: External MongoDB or Redis instances. If not present, the system automatically uses embedded in-memory database and queue fallbacks!)
From the project root directory, install all dependencies for root, server, and client:
# Install root, backend server, and frontend client dependencies
npm run install:allOr install them manually:
npm install
cd server && npm install
cd ../client && npm install
cd ..Copy .env.example to server/.env (and .env in root):
cp .env.example server/.envDefault configuration in server/.env:
PORT=5000
CLIENT_URL=http://localhost:3000
NODE_ENV=development
# Database (Leave empty for automatic embedded in-memory MongoDB)
MONGODB_URI=
# Redis (Leave empty or set to redis://localhost:6379 for automatic in-memory queue fallback)
REDIS_URL=
# Security Keys
JWT_SECRET=agentflow_super_secret_jwt_encryption_key_2026_x!
JWT_EXPIRES_IN=7d
CREDENTIAL_ENCRYPTION_KEY=agentflow_aes256_credential_key_32_bytes_len!
# AI Providers (Optional - Deterministic rule engine is used if omitted)
OPENROUTER_API_KEY=
GEMINI_API_KEY=Start both the backend server and frontend client concurrently with a single command from the root directory:
npm run devAlternatively, you can run them in separate terminal windows:
# Terminal 1: Backend Server (runs on http://localhost:5000)
npm run dev:server
# Terminal 2: Frontend Client (runs on http://localhost:3000)
npm run dev:clientOpen your browser and navigate to: π http://localhost:3000
You can register a new account on the /register page, or click "Demo Operator Quick Login" on the /login page:
- Email:
operator@agentflow.io - Password:
Password123!
Project Folder/
βββ client/ # Next.js Pages Router Frontend
β βββ src/
β β βββ components/
β β β βββ AppShell/ # Layout, Sidebar, Header, Notification Drawer
β β β βββ MetricGrid/ # Dashboard KPI metrics
β β β βββ NodePalette/ # Draggable visual node library
β β β βββ NodeConfigPanel/ # Node properties sidebar
β β β βββ WorkflowCanvas/ # React Flow canvas & custom node types
β β β βββ ProtectedRoute/ # Route guard for authenticated views
β β βββ pages/
β β β βββ _app.js # Global styles & auth initialization
β β β βββ index.js # Landing page with multi-agent showcase
β β β βββ login.js # User login page
β β β βββ register.js # User registration page
β β β βββ dashboard.js # Operator console & metrics
β β β βββ integrations.js # OAuth & API integrations manager
β β β βββ settings.js # Profile & security diagnostics
β β β βββ executions/
β β β β βββ index.js # Executions list & filter table
β β β β βββ [id].js # Real-time multi-agent timeline stream
β β β βββ workflows/
β β β βββ index.js # Workflow catalog & actions
β β β βββ builder.js # Prompt-to-workflow AI compiler
β β β βββ [id].js # Visual DAG editor & runner
β β βββ store/
β β β βββ authStore.js # Zustand auth store with localStorage
β β β βββ workflowStore.js # Zustand React Flow canvas store
β β βββ services/
β β β βββ api.js # Axios client with JWT interceptor
β β β βββ socket.js # Socket.IO client manager
β β βββ styles/
β β βββ globals.css # Tailwind CSS & glassmorphism theme
β βββ package.json
β βββ tailwind.config.js
β
βββ server/ # Express.js Backend Server
β βββ src/
β β βββ config/
β β β βββ env.js # Environment variables validation
β β β βββ db.js # MongoDB connection + in-memory fallback
β β β βββ socket.js # Socket.IO server & room manager
β β βββ models/ # Mongoose Models
β β β βββ User.js # Users & bcrypt cost 12 hashing
β β β βββ Workflow.js # Workflows & graph topologies
β β β βββ Execution.js # Run snapshots & statuses
β β β βββ ExecutionLog.js # Granular agent timeline logs
β β β βββ Integration.js # Encrypted credentials
β β β βββ Notification.js # System alerts
β β β βββ AgentMemory.js # Cross-step agent context
β β βββ agents/ # Multi-Agent Orchestration Chain
β β β βββ orchestrator.js # Pipeline coordinator & lifecycle controls
β β β βββ plannerAgent.js # Kahn's topological sort & confidence score
β β β βββ executionAgent.js # Step executor & template resolver
β β β βββ validationAgent.js # Schema & required fields validator
β β β βββ recoveryAgent.js # Error classifier & backoff retry
β β β βββ monitoringAgent.js # Timeline emitter & audit logger
β β βββ integrations/ # Third-Party Integrations
β β β βββ baseIntegration.js # Abstract provider contract
β β β βββ gmailIntegration.js # Send & read emails
β β β βββ slackIntegration.js # Messages & webhooks
β β β βββ discordIntegration.js# Bot messages & embeds
β β β βββ googleSheetsIntegration.js # Append & read rows
β β βββ services/ # Business Logic Services
β β β βββ authService.js
β β β βββ workflowService.js
β β β βββ executionService.js
β β β βββ aiService.js
β β β βββ integrationService.js
β β β βββ cryptoService.js # AES-256-GCM encryption
β β β βββ notificationService.js
β β βββ controllers/ # Thin Request Controllers
β β βββ routes/ # Express REST Routes
β β βββ middlewares/ # Auth, validation, error handler
β β βββ queues/
β β βββ executionQueue.js # BullMQ on Redis + Memory fallback
β βββ package.json
β βββ index.js
β
βββ package.json # Root npm orchestrator
βββ spec.md # Comprehensive project specification
βββ README.md # Documentation & setup guide
GET /api/healthβ System heartbeat and server status checkPOST /api/auth/registerβ Register a new operator accountPOST /api/auth/loginβ Authenticate and issue JWT tokenGET /api/auth/meβ Fetch authenticated profile
GET /api/workflows/dashboardβ Aggregated dashboard KPI metricsGET /api/workflowsβ List workflows with search and tag filtersPOST /api/workflowsβ Create a new workflow manuallyPOST /api/workflows/generateβ Generate workflow graph from prompt via AIGET /api/workflows/:idβ Fetch single workflow graphPUT /api/workflows/:idβ Update workflow nodes, edges, and configurationPOST /api/workflows/:id/duplicateβ Clone an existing workflowPOST /api/workflows/:id/executeβ Trigger an autonomous execution runDELETE /api/workflows/:idβ Delete a workflow
GET /api/executionsβ List all execution runs with paginationGET /api/executions/:idβ Fetch execution snapshot and node outputsGET /api/executions/:id/timelineβ Fetch detailed 5-agent timeline logsPOST /api/executions/:id/pauseβ Pause an active runPOST /api/executions/:id/resumeβ Resume a paused runPOST /api/executions/:id/cancelβ Cancel a running execution
GET /api/integrationsβ List all user third-party connection statesGET /api/integrations/statusβ Provider health and token validity checksGET /api/integrations/oauth/:provider/startβ Initiate OAuth flowGET /api/integrations/oauth/:provider/callbackβ Handle OAuth redirect callbackPOST /api/integrationsβ Save and encrypt provider credentials (AES-256)DELETE /api/integrations/:providerβ Disconnect providerGET /api/notificationsβ Fetch user alert notificationsPATCH /api/notifications/:id/readβ Mark single notification as readPOST /api/notifications/read-allβ Mark all notifications as read
Navigate to /workflows/builder and test any of the following natural language automations:
-
Customer Support Triage:
"When an incoming support ticket arrives, analyze urgency with AI, classify priority (P1/P2/P3), and post an alert to Slack #ops-alerts."
-
Invoice Processing & Google Sheets Logging:
"Extract invoice total, vendor name, and line items from incoming invoice documents, check if amount is over $1,000, and log audit details to Google Sheets."
-
Critical Incident Response:
"When a system error webhook triggers, run diagnostic root cause analysis with AI, and dispatch notifications to Discord and team leads via Gmail."
- Password Hashing: Bcrypt with cost factor
12. - JWT Protection: Signed HMAC-SHA256 tokens with configurable expiration.
- Data Encryption at Rest: AES-256-GCM authenticated cipher with dynamic IV and auth tags for OAuth credentials and API keys.
- Zero Token Leakage: Decrypted credentials are never logged or exposed via API response endpoints.
- HTTP Hardening: Helmet security headers, CORS origin whitelisting, and rate-limiting on auth endpoints.
Deploy the backend as a Render Web Service and the Next.js frontend as a Vercel project. The complete GitHub, Render, Vercel, environment variable, and production verification steps are in deploy.md.
The production frontend must use:
NEXT_PUBLIC_API_URL=https://<render-service>.onrender.com/api
NEXT_PUBLIC_SOCKET_URL=https://<render-service>.onrender.comSet the backend CLIENT_URL to the deployed Vercel URL, and use hosted MongoDB and Redis services for production data and background jobs.
This project is licensed under the MIT License.