Skip to content

Commit d341cf2

Browse files
committed
feat: add node execution delay for visual feedback + update README
1 parent 417c51e commit d341cf2

2 files changed

Lines changed: 66 additions & 191 deletions

File tree

README.md

Lines changed: 64 additions & 191 deletions
Original file line numberDiff line numberDiff line change
@@ -1,241 +1,114 @@
1-
# agentflow
1+
# agentflow
22

3-
<div align="center">
3+
> Visual AI Agent Builder & Orchestration Platform
44
5-
**Visual AI Agent Builder & Orchestration Platform**
5+
[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue)](https://www.typescriptlang.org/)
6+
[![NestJS](https://img.shields.io/badge/NestJS-10-red)](https://nestjs.com/)
7+
[![Next.js](https://img.shields.io/badge/Next.js-14-black)](https://nextjs.org/)
8+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
69

7-
[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
8-
[![NestJS](https://img.shields.io/badge/NestJS-10.x-E0234E?style=flat-square&logo=nestjs&logoColor=white)](https://nestjs.com/)
9-
[![Next.js](https://img.shields.io/badge/Next.js-14-000000?style=flat-square&logo=next.js&logoColor=white)](https://nextjs.org/)
10-
[![React Flow](https://img.shields.io/badge/React_Flow-11-FF0072?style=flat-square)](https://reactflow.dev/)
11-
[![OpenAI](https://img.shields.io/badge/OpenAI-GPT--4o-412991?style=flat-square&logo=openai&logoColor=white)](https://openai.com/)
12-
[![Docker](https://img.shields.io/badge/Docker-Compose-2496ED?style=flat-square&logo=docker&logoColor=white)](https://www.docker.com/)
13-
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](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.
2611

2712
---
2813

29-
## ✨ Features
14+
## what it does
3015

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.
3917

4018
---
4119

42-
## 🏗️ Architecture
20+
## features
4321

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
6731

6832
---
6933

70-
## 🛠️ Tech Stack
34+
## tech stack
7135

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 |
8245

8346
---
8447

85-
## 🚀 Quick Start
86-
87-
### Prerequisites
88-
- Node.js 20+
89-
- Docker & Docker Compose
90-
- OpenAI API Key
48+
## quick start
9149

92-
### 1. Clone the repo
9350
```bash
9451
git clone https://github.com/DIYA73/agentflow.git
9552
cd agentflow
96-
```
97-
98-
### 2. Configure environment
99-
```bash
10053
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
10855

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
11459
```
11560

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
14962

15063
---
15164

152-
## 🤖 Built-in Agent Node Types
65+
## agent node types
15366

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 |
16477

16578
---
16679

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
18281
---
18382

184-
## ⚙️ Environment Variables
83+
## environment variables
18584

18685
```env
187-
# Database
18886
DATABASE_URL=postgresql://postgres:password@localhost:5432/agentflow
189-
190-
# Redis
19187
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
19889
OPENAI_API_KEY=sk-...
199-
200-
# App
20190
PORT=3001
20291
NODE_ENV=development
20392
WEB_URL=http://localhost:3000
20493
```
20594

20695
---
20796

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
236111

237112
---
238113

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 ❤️

apps/api/src/executions/execution.processor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export class ExecutionProcessor {
5050

5151
try {
5252
const nodeInput = this.resolveNodeInput(node, edges, context);
53+
// Small delay so frontend can see node light up yellow before completing
54+
await new Promise((resolve) => setTimeout(resolve, 800));
5355
const output = await this.nodesService.execute(node, nodeInput, executionId);
5456
context[node.id] = output;
5557

0 commit comments

Comments
 (0)