|
1 | | -# agentflow |
| 1 | +<div align="center"> |
2 | 2 |
|
3 | | -> Visual AI Agent Builder & Orchestration Platform |
| 3 | +# ⚡ agentflow |
4 | 4 |
|
5 | | -[](https://www.typescriptlang.org/) |
6 | | -[](https://nestjs.com/) |
7 | | -[](https://nextjs.org/) |
8 | | -[](https://opensource.org/licenses/MIT) |
| 5 | +**Visual AI Agent Builder & Orchestration Platform** |
9 | 6 |
|
10 | | -Build, chain, and deploy autonomous AI agents visually — no code required. Each node is a specialized agent; edges define how data flows between them. |
| 7 | +*Build multi-agent pipelines visually. Watch them execute in real time.* |
11 | 8 |
|
12 | | ---- |
| 9 | +[](https://www.typescriptlang.org/) |
| 10 | +[](https://nestjs.com/) |
| 11 | +[](https://nextjs.org/) |
| 12 | +[](https://reactflow.dev/) |
| 13 | +[](https://redis.io/) |
| 14 | +[](https://www.postgresql.org/) |
| 15 | +[](https://opensource.org/licenses/MIT) |
| 16 | + |
| 17 | +[Live Demo](https://agentflow.vercel.app) · [API Docs](http://localhost:3001/api) · [Report Bug](https://github.com/DIYA73/agentflow/issues) |
13 | 18 |
|
14 | | -## what it does |
| 19 | + |
15 | 20 |
|
16 | | -agentflow lets you design multi-agent pipelines on a drag-and-drop canvas. you connect nodes, hit run, and watch them execute in real time — nodes light up as they process, logs stream live, and results flow downstream automatically. |
| 21 | +</div> |
17 | 22 |
|
18 | 23 | --- |
19 | 24 |
|
20 | | -## features |
| 25 | +## what is this? |
| 26 | + |
| 27 | +agentflow is a self-hostable platform for building and running multi-agent AI pipelines visually. drag nodes onto a canvas, connect them, and hit run — each node executes in sequence, passes data downstream, and you watch everything happen live. |
| 28 | + |
| 29 | +no boilerplate. no LangChain spaghetti. just nodes and edges. |
21 | 30 |
|
22 | | -- **visual canvas** — drag-and-drop builder powered by React Flow |
23 | | -- **8 built-in agent types** — LLM, web scraper, API caller, code runner, email sender, data transformer, webhook output, condition branching |
24 | | -- **live execution** — nodes light up yellow → green/red as they run via WebSocket |
25 | | -- **real-time logs** — execution logs stream live to the UI |
26 | | -- **BullMQ queue** — async job processing with Redis, retry logic, exponential backoff |
27 | | -- **multi-tenant** — full workspace isolation per team |
28 | | -- **flow versioning** — every save creates a new version, one-click rollback |
29 | | -- **triggers** — run flows on cron schedule or via webhook |
30 | | -- **self-hostable** — Docker Compose, deploy anywhere |
| 31 | +--- |
31 | 32 |
|
| 33 | +## features |
| 34 | +🎨 Visual Canvas drag-and-drop agent builder powered by React Flow |
| 35 | +🤖 8 Agent Types LLM · scraper · API · code · email · transform · webhook · condition |
| 36 | +⚡ Live Execution nodes light up yellow → green/red as they run |
| 37 | +📡 Real-time Logs WebSocket streams every log line to the UI instantly |
| 38 | +🔁 BullMQ Queue async processing, retry logic, exponential backoff |
| 39 | +⏰ Triggers cron schedules + webhook endpoints |
| 40 | +🏢 Multi-tenant full workspace isolation per team |
| 41 | +📜 Flow Versioning every save is a version — one-click rollback |
| 42 | +🐳 Self-hostable Docker Compose, runs anywhere |
32 | 43 | --- |
33 | 44 |
|
34 | | -## tech stack |
| 45 | +## stack |
35 | 46 |
|
36 | | -| layer | technology | |
37 | | -|-------|-----------| |
38 | | -| frontend | Next.js 14, TypeScript, Tailwind CSS, React Flow, shadcn/ui | |
39 | | -| backend | NestJS, TypeScript, WebSockets (Socket.io), BullMQ | |
40 | | -| database | PostgreSQL + TypeORM | |
41 | | -| queue | Redis + BullMQ | |
| 47 | +| layer | tech | |
| 48 | +|-------|------| |
| 49 | +| frontend | Next.js 14 · TypeScript · Tailwind CSS · React Flow · shadcn/ui | |
| 50 | +| backend | NestJS · TypeScript · Socket.io · BullMQ | |
| 51 | +| database | PostgreSQL · TypeORM | |
| 52 | +| queue | Redis · BullMQ | |
42 | 53 | | ai | OpenAI GPT-4o | |
43 | | -| auth | JWT + Refresh Tokens | |
44 | | -| devops | Docker, Docker Compose, GitHub Actions | |
| 54 | +| auth | JWT · Refresh Tokens | |
| 55 | +| infra | Docker · GitHub Actions | |
45 | 56 |
|
46 | 57 | --- |
47 | 58 |
|
48 | 59 | ## quick start |
49 | 60 |
|
50 | 61 | ```bash |
| 62 | +# clone |
51 | 63 | git clone https://github.com/DIYA73/agentflow.git |
52 | 64 | cd agentflow |
| 65 | + |
| 66 | +# configure |
53 | 67 | cp .env.example .env |
54 | | -# fill in your values |
| 68 | +# edit .env with your values |
55 | 69 |
|
56 | | -docker compose up -d # starts postgres + redis |
57 | | -cd apps/api && npm run start:dev # terminal 1 |
58 | | -cd apps/web && npm run dev # terminal 2 |
| 70 | +# start infrastructure |
| 71 | +docker compose up -d |
| 72 | + |
| 73 | +# run (two terminals) |
| 74 | +cd apps/api && npm run start:dev |
| 75 | +cd apps/web && npm run dev |
59 | 76 | ``` |
60 | 77 |
|
61 | | -open http://localhost:3000 |
| 78 | +→ open [http://localhost:3000](http://localhost:3000) |
62 | 79 |
|
63 | 80 | --- |
64 | 81 |
|
65 | | -## agent node types |
| 82 | +## agent nodes |
66 | 83 |
|
67 | | -| node | what it does | |
| 84 | +| node | description | |
68 | 85 | |------|-------------| |
69 | | -| `ai-llm` | send prompt to GPT-4o, pass response downstream | |
70 | | -| `web-scraper` | fetch & parse any URL, extract text | |
71 | | -| `api-caller` | HTTP request to any endpoint | |
72 | | -| `code-runner` | execute sandboxed JavaScript | |
73 | | -| `email-sender` | send email via Resend | |
74 | | -| `data-transform` | map, filter, or reshape JSON | |
75 | | -| `webhook-output` | POST results to external URL | |
76 | | -| `condition` | branch flow based on data condition | |
| 86 | +| `ai-llm` | send prompt to GPT-4o, receive structured response | |
| 87 | +| `web-scraper` | fetch any URL, extract text and HTML | |
| 88 | +| `api-caller` | HTTP GET/POST/PUT/DELETE to any endpoint | |
| 89 | +| `code-runner` | execute sandboxed JavaScript snippets | |
| 90 | +| `email-sender` | send transactional email via Resend | |
| 91 | +| `data-transform` | pick, omit, merge, or map JSON data | |
| 92 | +| `webhook-output` | POST execution results to external URL | |
| 93 | +| `condition` | if/else branching based on data values | |
77 | 94 |
|
78 | 95 | --- |
79 | 96 |
|
80 | | -## architecture |
| 97 | +## how execution works |
| 98 | +User clicks Run |
| 99 | +│ |
| 100 | +▼ |
| 101 | +FlowsService.execute() |
| 102 | +│ |
| 103 | +▼ |
| 104 | +ExecutionsService.enqueue() ──→ BullMQ Queue (Redis) |
| 105 | +│ |
| 106 | +▼ |
| 107 | +ExecutionProcessor.handleRunFlow() |
| 108 | +│ |
| 109 | +├─ topological sort (Kahn's algorithm) |
| 110 | +├─ for each node: |
| 111 | +│ ├─ emit node:status → running ──→ WebSocket → UI (yellow) |
| 112 | +│ ├─ NodesService.execute() |
| 113 | +│ └─ emit node:status → success ──→ WebSocket → UI (green) |
| 114 | +│ |
| 115 | +└─ emit execution:status → SUCCESS |
| 116 | + |
81 | 117 | --- |
82 | 118 |
|
83 | 119 | ## environment variables |
84 | 120 |
|
85 | 121 | ```env |
| 122 | +# Database |
86 | 123 | DATABASE_URL=postgresql://postgres:password@localhost:5432/agentflow |
| 124 | +
|
| 125 | +# Redis |
87 | 126 | REDIS_URL=redis://localhost:6379 |
88 | | -JWT_SECRET=your-secret |
| 127 | +
|
| 128 | +# Auth |
| 129 | +JWT_SECRET=your-super-secret-key |
| 130 | +JWT_EXPIRES_IN=15m |
| 131 | +JWT_REFRESH_SECRET=your-refresh-secret |
| 132 | +JWT_REFRESH_EXPIRES_IN=7d |
| 133 | +
|
| 134 | +# OpenAI |
89 | 135 | OPENAI_API_KEY=sk-... |
| 136 | +
|
| 137 | +# Email (optional) |
| 138 | +RESEND_API_KEY=re_... |
| 139 | +
|
| 140 | +# App |
90 | 141 | PORT=3001 |
91 | 142 | NODE_ENV=development |
92 | 143 | WEB_URL=http://localhost:3000 |
93 | 144 | ``` |
94 | 145 |
|
95 | 146 | --- |
96 | 147 |
|
| 148 | +## project structure |
| 149 | +agentflow/ |
| 150 | +├── apps/ |
| 151 | +│ ├── api/ # NestJS backend |
| 152 | +│ │ └── src/ |
| 153 | +│ │ ├── auth/ # JWT authentication |
| 154 | +│ │ ├── executions/ # BullMQ execution engine |
| 155 | +│ │ ├── flows/ # flow CRUD + versioning |
| 156 | +│ │ ├── gateway/ # WebSocket gateway |
| 157 | +│ │ ├── nodes/ # 8 built-in node executors |
| 158 | +│ │ ├── triggers/ # cron + webhook triggers |
| 159 | +│ │ └── workspaces/ # multi-tenant isolation |
| 160 | +│ └── web/ # Next.js frontend |
| 161 | +│ └── src/ |
| 162 | +│ ├── app/ # App Router pages |
| 163 | +│ ├── components/ |
| 164 | +│ │ ├── canvas/ # React Flow canvas |
| 165 | +│ │ └── nodes/ # custom node renderers |
| 166 | +│ └── lib/ |
| 167 | +│ └── hooks/ # useExecutionSocket |
| 168 | +└── packages/ |
| 169 | +└── shared/ # shared TypeScript types |
| 170 | +--- |
| 171 | + |
97 | 172 | ## roadmap |
98 | 173 |
|
99 | | -- [x] visual canvas with React Flow |
| 174 | +- [x] visual drag-and-drop canvas |
100 | 175 | - [x] 8 built-in agent node types |
101 | | -- [x] real-time execution logs via WebSocket |
| 176 | +- [x] real-time execution via WebSocket |
102 | 177 | - [x] live node status (yellow → green/red) |
103 | | -- [x] BullMQ async execution engine |
| 178 | +- [x] BullMQ async queue with retry |
104 | 179 | - [x] multi-tenant workspaces |
105 | 180 | - [x] flow versioning + rollback |
106 | | -- [x] cron & webhook triggers |
| 181 | +- [x] cron + webhook triggers |
107 | 182 | - [ ] custom node SDK |
108 | 183 | - [ ] flow marketplace |
109 | 184 | - [ ] human-in-the-loop approval nodes |
110 | 185 | - [ ] Python SDK |
111 | 186 |
|
112 | 187 | --- |
113 | 188 |
|
114 | | -MIT © [DIYA73](https://github.com/DIYA73) — built with ❤️ |
| 189 | +<div align="center"> |
| 190 | + |
| 191 | +MIT © [DIYA73](https://github.com/DIYA73) · built with ❤️ |
| 192 | + |
| 193 | +*SaaS & Microservices Engineer · Web to IoT systems* |
| 194 | + |
| 195 | +</div> |
0 commit comments