Use SvelteFlow to Create AI Workflow Visualized Node-Edge Graph GUI Editor

What I want

like dify, Coze, n8n…..

and self-host, more flexibity, use langgraph

The Core Problem: Why Build Another One?

Although existing platforms are powerful, they commonly suffer from several pain points:

Why Is Visual Programming Needed?

Time Flies……

OpenAI AgentKit

Similar LLM libs

Feature CrewAI LangChain LangGraph
Graph Support ❌ Limited ⚠️ Linear chains ✅ Full graphs
Loops ❌ No ❌ No ✅ Yes
Conditions ❌ No ⚠️ Limited ✅ Yes
Multi-agent ✅ Yes ⚠️ Basic ✅ Yes
GUI Support ❌ No ❌ No ❌ No

all of these not have official GUI, we need create by ourself.

core design

use Nodes as SSOT to represent Edges

flowchart LR A((Step1)) B((Step2)) C((Step3)) D((Step4)) E((Step5)) F((Step6)) A --next--> B B --next--> C B --next--> D D --next--> E E --next--> F C --next--> F

Evolution: From PyQt to Web-Based Solution

CrewAI-GUI-pyQt

Limitations:

Technology Stack

backend API

If your backend have JWT, you can switch by username

post /clean-cache/{username}
get /download/{username}
post /upload/{username}
post /run/{username}

Run Graph Button

post /upload/{username}
post /run/{username}

LangGraph.js

Graph Data Strcture Design

Why xyflow

xyflow is mature js graph library (svelteflow, reactflow)

Custom Nodes

no code

Custom Nodes

low code

Why ReactFlow

Benefit from ReactFlow

custom edge, custom nodes

The Jourery of ReactFlow

LangGraph-GUI 1.0 using reactflow

graph LR redux[redux Nodes] react[ReactFlow] edges[EdgesState] nodes[NodeState] edge((edge)) react --change--> edge edge --modify--> edges edge --modify--> nodes nodes --update--> redux redux --update--> edges react --change--> nodes graphs[graphs.json] backend[Backend] redux --store--> graphs redux --load--> nodes graphs --> backend graphs --load--> redux

learn lessons from ReactFlow

Fixing typing content in node too early

Fixing Japanese Input in React (IME Support)

JS → TS

bothered by TS

"scripts": {
  "lint": "prettier --write . && prettier --check . && npx eslint . --ext .svelte,.svelte.ts,.svelte.js --fix",
},

any will through warning, this is annoying

// lib/json.ts

export type Json = 
  | string 
  | number 
  | boolean 
  | null 
  | Json[] 
  | { [key: string]: Json };

Why SvelteFlow

Signals

Signals

Framework / Library signal computed effect
Solid.js createSignal createMemo createEffect
Angular (v16+) signal() computed() effect()
Preact Signals signal() computed() effect()
Vue 3 ref / reactive computed watchEffect
Svelte 5 $state / writable store $derived / derived store $effect / $: declaration

llms.txt

SvelteFlow 1.0 release

xyflow/svelte 1.0.0 released at 2025 May 14

fully support rune

Svelte is Elegant

sample code

signal chain: Node(SSOT) –> Edge –> SvelteFlow

graph LR ssot[SSOT Nodes] A[Modify Nodes] B[Modify Edges] A --modify--> ssot B --update--> ssot ssot --signals--> edges backend[Backend] ssot --"run graphs.json"--> backend outputs(("`LLM Outputs`")) backend --> outputs

bind:nodes={$currentNodes}
edges={$currentEdges} 

Svelte is Elegant (cont.)

define your own signal object:

Simple Demo

Extend Demo

Extend Demo

Loading content…

END

Thank You