|
1 | | -# agentflow |
| 1 | +# agentflow |
2 | 2 |
|
3 | | -<div align="center"> |
| 3 | +> Visual AI Agent Builder & Orchestration Platform |
4 | 4 |
|
5 | | -**Visual AI Agent Builder & Orchestration Platform** |
| 5 | +[](https://www.typescriptlang.org/) |
| 6 | +[](https://nestjs.com/) |
| 7 | +[](https://nextjs.org/) |
| 8 | +[](https://opensource.org/licenses/MIT) |
6 | 9 |
|
7 | | -[](https://www.typescriptlang.org/) |
8 | | -[](https://nestjs.com/) |
9 | | -[](https://nextjs.org/) |
10 | | -[](https://reactflow.dev/) |
11 | | -[](https://openai.com/) |
12 | | -[](https://www.docker.com/) |
13 | | -[](LICENSE) |
14 | | - |
15 | | -[Live Demo](https://agentflow.vercel.app) · [API Docs](https://agentflow-api.onrender.com/api) · [Report Bug](https://github.com/DIYA73/agentflow/issues) |
16 | | - |
17 | | -</div> |
18 | | - |
19 | | ---- |
20 | | - |
21 | | -## 🖼️ Overview |
22 | | - |
23 | | -**agentflow** is an open-source platform to visually build, chain, and deploy autonomous AI agents. Design complex multi-agent pipelines on a drag-and-drop canvas — no code required. Each node is a specialized agent; edges define how data flows between them. |
24 | | - |
25 | | -> Build in minutes what used to take days of LangChain boilerplate. |
| 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. |
26 | 11 |
|
27 | 12 | --- |
28 | 13 |
|
29 | | -## ✨ Features |
| 14 | +## what it does |
30 | 15 |
|
31 | | -- 🎨 **Visual Canvas** — Drag-and-drop agent builder powered by React Flow |
32 | | -- 🤖 **Built-in Agent Types** — Web scraper, code writer, API caller, email sender, data transformer, AI summarizer |
33 | | -- ⚡ **Real-time Execution Logs** — Watch agents run live via WebSocket |
34 | | -- 🔁 **Chaining & Branching** — Pass outputs between agents, conditional branches |
35 | | -- ⏰ **Triggers** — Run flows on schedule (cron) or via webhook |
36 | | -- 🏢 **Multi-tenant** — Full workspace isolation per team |
37 | | -- 📜 **Version History** — Every flow version saved, one-click rollback |
38 | | -- 🐳 **Self-hostable** — Docker Compose, deploy anywhere |
| 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. |
39 | 17 |
|
40 | 18 | --- |
41 | 19 |
|
42 | | -## 🏗️ Architecture |
| 20 | +## features |
43 | 21 |
|
44 | | -``` |
45 | | -┌──────────────────────────────────────────────────────────────┐ |
46 | | -│ agentflow │ |
47 | | -├────────────────────────┬─────────────────────────────────────┤ |
48 | | -│ apps/web (Next.js) │ apps/api (NestJS) │ |
49 | | -│ │ │ |
50 | | -│ ┌──────────────────┐ │ ┌──────────┐ ┌────────────────┐ │ |
51 | | -│ │ React Flow │ │ │ REST API │ │ WebSocket GW │ │ |
52 | | -│ │ Canvas Editor │◄─┼─►│ │ │ (exec logs) │ │ |
53 | | -│ │ Node Palette │ │ └────┬─────┘ └──────┬─────────┘ │ |
54 | | -│ │ Execution Logs │ │ │ │ │ |
55 | | -│ └──────────────────┘ │ ┌────▼────────────────▼─────────┐ │ |
56 | | -│ │ │ NestJS Modules │ │ |
57 | | -│ │ │ flows · agents · executions │ │ |
58 | | -│ │ │ nodes · triggers · gateway │ │ |
59 | | -│ │ └────┬──────────┬────────────────┘ │ |
60 | | -├────────────────────────┤ │ │ │ |
61 | | -│ Infrastructure │ ┌────▼──┐ ┌───▼──────┐ │ |
62 | | -│ │ │ PG │ │ Redis │ │ |
63 | | -│ packages/shared │ │ DB │ │ BullMQ │ │ |
64 | | -│ (types + utils) │ └───────┘ └──────────┘ │ |
65 | | -└────────────────────────┴─────────────────────────────────────┘ |
66 | | -``` |
| 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 |
67 | 31 |
|
68 | 32 | --- |
69 | 33 |
|
70 | | -## 🛠️ Tech Stack |
| 34 | +## tech stack |
71 | 35 |
|
72 | | -| Layer | Technology | |
73 | | -|------------|----------------------------------------------------------| |
74 | | -| Frontend | Next.js 14, TypeScript, Tailwind CSS, React Flow, shadcn/ui | |
75 | | -| Backend | NestJS, TypeScript, WebSockets, BullMQ | |
76 | | -| Database | PostgreSQL + TypeORM | |
77 | | -| Queue | Redis + BullMQ (async agent execution) | |
78 | | -| AI | OpenAI GPT-4o (agent reasoning & tool calls) | |
79 | | -| Auth | JWT + Refresh Tokens | |
80 | | -| DevOps | Docker, Docker Compose, GitHub Actions | |
81 | | -| Deployment | Vercel (web) · Render (api) · Upstash (redis) | |
| 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 | |
| 42 | +| ai | OpenAI GPT-4o | |
| 43 | +| auth | JWT + Refresh Tokens | |
| 44 | +| devops | Docker, Docker Compose, GitHub Actions | |
82 | 45 |
|
83 | 46 | --- |
84 | 47 |
|
85 | | -## 🚀 Quick Start |
86 | | - |
87 | | -### Prerequisites |
88 | | -- Node.js 20+ |
89 | | -- Docker & Docker Compose |
90 | | -- OpenAI API Key |
| 48 | +## quick start |
91 | 49 |
|
92 | | -### 1. Clone the repo |
93 | 50 | ```bash |
94 | 51 | git clone https://github.com/DIYA73/agentflow.git |
95 | 52 | cd agentflow |
96 | | -``` |
97 | | - |
98 | | -### 2. Configure environment |
99 | | -```bash |
100 | 53 | cp .env.example .env |
101 | | -# Fill in your values |
102 | | -``` |
103 | | - |
104 | | -### 3. Start with Docker |
105 | | -```bash |
106 | | -docker compose up -d |
107 | | -``` |
| 54 | +# fill in your values |
108 | 55 |
|
109 | | -### 4. Or run locally |
110 | | -```bash |
111 | | -npm install |
112 | | -cd apps/api && npm run start:dev # Terminal 1 |
113 | | -cd apps/web && npm run dev # Terminal 2 |
| 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 |
114 | 59 | ``` |
115 | 60 |
|
116 | | -Open [http://localhost:3000](http://localhost:3000) 🎉 |
117 | | - |
118 | | ---- |
119 | | - |
120 | | -## 📁 Project Structure |
121 | | - |
122 | | -``` |
123 | | -agentflow/ |
124 | | -├── apps/ |
125 | | -│ ├── api/ # NestJS backend |
126 | | -│ │ └── src/ |
127 | | -│ │ ├── flows/ # Flow CRUD + versioning |
128 | | -│ │ ├── agents/ # Agent type registry |
129 | | -│ │ ├── executions/ # Run engine + BullMQ processor |
130 | | -│ │ ├── nodes/ # Built-in node implementations |
131 | | -│ │ ├── triggers/ # Cron + webhook trigger system |
132 | | -│ │ ├── gateway/ # WebSocket execution log stream |
133 | | -│ │ ├── auth/ # JWT authentication |
134 | | -│ │ └── workspaces/ # Multi-tenant isolation |
135 | | -│ └── web/ # Next.js frontend |
136 | | -│ └── src/ |
137 | | -│ ├── app/ # App Router pages |
138 | | -│ ├── components/ |
139 | | -│ │ ├── canvas/ # React Flow canvas + toolbar |
140 | | -│ │ ├── nodes/ # Custom node renderers |
141 | | -│ │ └── ui/ # shadcn components |
142 | | -│ └── lib/ # API client, hooks, WS client |
143 | | -├── packages/ |
144 | | -│ └── shared/ # Shared TypeScript types |
145 | | -├── docs/ # Architecture diagrams |
146 | | -├── docker-compose.yml |
147 | | -└── .github/workflows/ # CI/CD pipeline |
148 | | -``` |
| 61 | +open http://localhost:3000 |
149 | 62 |
|
150 | 63 | --- |
151 | 64 |
|
152 | | -## 🤖 Built-in Agent Node Types |
| 65 | +## agent node types |
153 | 66 |
|
154 | | -| Node Type | What It Does | |
155 | | -|-------------------|---------------------------------------------------| |
156 | | -| `ai-llm` | Send prompt to GPT-4o, pass response downstream | |
157 | | -| `web-scraper` | Fetch & parse any URL, extract text/links | |
158 | | -| `api-caller` | HTTP request to any endpoint (GET/POST/PUT/DELETE)| |
159 | | -| `code-runner` | Execute sandboxed JavaScript or Python snippet | |
160 | | -| `email-sender` | Send email via Resend or SMTP | |
161 | | -| `data-transform` | Map, filter, or reshape JSON data | |
162 | | -| `webhook-output` | POST results to external URL | |
163 | | -| `condition` | Branch flow based on data condition (if/else) | |
| 67 | +| node | what it does | |
| 68 | +|------|-------------| |
| 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 | |
164 | 77 |
|
165 | 78 | --- |
166 | 79 |
|
167 | | -## 🔌 API Endpoints |
168 | | - |
169 | | -| Method | Endpoint | Description | |
170 | | -|--------|-----------------------------------|----------------------------------| |
171 | | -| POST | `/auth/register` | Create workspace + account | |
172 | | -| POST | `/auth/login` | JWT login | |
173 | | -| GET | `/flows` | List all flows in workspace | |
174 | | -| POST | `/flows` | Create new flow | |
175 | | -| PUT | `/flows/:id` | Save flow (creates new version) | |
176 | | -| POST | `/flows/:id/execute` | Trigger flow execution | |
177 | | -| GET | `/executions/:id/logs` | Get execution logs | |
178 | | -| POST | `/triggers/cron` | Schedule flow as cron job | |
179 | | -| POST | `/triggers/webhook` | Register flow as webhook | |
180 | | -| WS | `/gateway` | Real-time execution log stream | |
181 | | - |
| 80 | +## architecture |
182 | 81 | --- |
183 | 82 |
|
184 | | -## ⚙️ Environment Variables |
| 83 | +## environment variables |
185 | 84 |
|
186 | 85 | ```env |
187 | | -# Database |
188 | 86 | DATABASE_URL=postgresql://postgres:password@localhost:5432/agentflow |
189 | | -
|
190 | | -# Redis |
191 | 87 | REDIS_URL=redis://localhost:6379 |
192 | | -
|
193 | | -# Auth |
194 | | -JWT_SECRET=your-super-secret |
195 | | -JWT_EXPIRES_IN=15m |
196 | | -
|
197 | | -# OpenAI |
| 88 | +JWT_SECRET=your-secret |
198 | 89 | OPENAI_API_KEY=sk-... |
199 | | -
|
200 | | -# App |
201 | 90 | PORT=3001 |
202 | 91 | NODE_ENV=development |
203 | 92 | WEB_URL=http://localhost:3000 |
204 | 93 | ``` |
205 | 94 |
|
206 | 95 | --- |
207 | 96 |
|
208 | | -## 📈 Roadmap |
209 | | - |
210 | | -- [x] Visual canvas with React Flow |
211 | | -- [x] Built-in agent node types (8 types) |
212 | | -- [x] Real-time execution logs via WebSocket |
213 | | -- [x] Multi-tenant workspaces |
214 | | -- [x] Flow versioning + rollback |
215 | | -- [x] Cron & webhook triggers |
216 | | -- [ ] Custom node SDK (bring your own agent) |
217 | | -- [ ] Flow marketplace (share/import community flows) |
218 | | -- [ ] Human-in-the-loop approval nodes |
219 | | -- [ ] Python SDK for programmatic flow creation |
220 | | - |
221 | | ---- |
222 | | - |
223 | | -## 🤝 Contributing |
224 | | - |
225 | | -```bash |
226 | | -git checkout -b feature/your-feature |
227 | | -git commit -m 'feat: add your feature' |
228 | | -git push origin feature/your-feature |
229 | | -``` |
230 | | - |
231 | | ---- |
232 | | - |
233 | | -## 📄 License |
234 | | - |
235 | | -MIT © [DIYA73](https://github.com/DIYA73) |
| 97 | +## roadmap |
| 98 | + |
| 99 | +- [x] visual canvas with React Flow |
| 100 | +- [x] 8 built-in agent node types |
| 101 | +- [x] real-time execution logs via WebSocket |
| 102 | +- [x] live node status (yellow → green/red) |
| 103 | +- [x] BullMQ async execution engine |
| 104 | +- [x] multi-tenant workspaces |
| 105 | +- [x] flow versioning + rollback |
| 106 | +- [x] cron & webhook triggers |
| 107 | +- [ ] custom node SDK |
| 108 | +- [ ] flow marketplace |
| 109 | +- [ ] human-in-the-loop approval nodes |
| 110 | +- [ ] Python SDK |
236 | 111 |
|
237 | 112 | --- |
238 | 113 |
|
239 | | -<div align="center"> |
240 | | - <sub>Built with ❤️ — SaaS & Microservices Engineer | Web to IoT systems 🔥</sub> |
241 | | -</div> |
| 114 | +MIT © [DIYA73](https://github.com/DIYA73) — built with ❤️ |
0 commit comments