itwanger/PaiAgent
🔥轻量级的AI工作流编排系统,类似dify、n8n,全程使用Vibe Coding,AI工具为Qoder+CLI。涉及到的技术栈包括SpringAI、LangGraph4J、SSE、MinIO、DAG自定引擎等。
PaiAgent – Enterprise‑grade visual AI workflow orchestration platform
What it is
PaiAgent is a self‑hosted, full‑stack platform that lets you build, schedule and run AI‑powered pipelines without writing code. A drag‑and‑drop editor (ReactFlow) on the front‑end lets business users and developers compose nodes that call large language models (OpenAI, DeepSeek, Alibaba Qwen, ZhiPu, etc.) and auxiliary tools (TTS, data I/O, custom plugins). At runtime the platform executes the graph either with a classic DAG engine (topological sort + cycle detection) or with a LangGraph4j state‑graph engine for richer conditional routing.
Core capabilities
| Feature | What you get |
|---|---|
| Zero‑code workflow design | Visual canvas, node palette, parameter panels – no Java/TS required to assemble a pipeline |
| Dual execution engine | DAG for simple linear/branching flows; LangGraph4j for state‑graph, conditional and dynamic routing – selectable per workflow |
| Unified LLM access | Spring AI + Spring AI Alibaba adapters expose OpenAI‑compatible, DeepSeek, Qwen, ZhiPu and AIPing models through a common ChatClient API |
| Skills system | Declarative “skill” definitions in SKILL.md (YAML front‑matter + Markdown). Skills are auto‑registered, lazily loaded (summary → detail → references) and exposed to LLMs as function callbacks so a model can invoke them on its own |
| Extensible node model | Implement NodeExecutor (or extend AbstractLLMNodeExecutor) and register it; the platform will expose the node in the UI automatically |
| Real‑time debugging | Server‑Sent Events stream execution logs to a side‑drawer, showing start/success/error per node |
| Persistence & monitoring | MySQL stores workflow definitions and run logs; optional MinIO for file blobs; execution history view in the UI |
| Built‑in tool nodes | Input/Output, TTS (Qwen3 TTS, StepAudio), plus a plug‑in hook for any custom service |
Typical use cases
| Domain | Example workflow |
|---|---|
| Content creation | Generate article drafts → translate → polish → synthesize audio narration |
| Customer support | Capture user query → route to appropriate LLM (knowledge base) → generate response → log ticket |
| Data processing | Pull raw text → LLM‑based entity extraction → store results in a database |
| Media production | Script generation → TTS → embed audio in video metadata |
| Automation | Periodic report generation → email dispatch → archive PDF |
Architecture at a glance
Frontend (React 18 + TypeScript)
└─ ReactFlow canvas, Ant Design UI, Zustand state
Backend (Spring Boot 3.4, Java 21)
├─ Controllers → Services → MyBatis‑Plus DAOs
├─ Engine layer
│ ├─ EngineSelector (dag ↔ langgraph)
│ ├─ DAGParser (Kahn topological sort, DFS cycle check)
│ └─ LangGraphWorkflowEngine (StateGraph, async node actions)
├─ Skill subsystem (SkillRegistry, progressive loading, FunctionCallback)
└─ AI model layer (Spring AI + Spring AI Alibaba, ChatClientFactory)
Data layer
├─ MySQL (workflow definitions, execution logs)
└─ MinIO (optional blob storage)
Technology stack
| Layer | Tech | Version |
|---|---|---|
| Frontend | React, TypeScript, Vite, ReactFlow, Ant Design, Tailwind, Zustand | 18.x / 5.x / latest |
| Backend | Spring Boot, Java 21, MyBatis‑Plus, FastJSON2, Maven | 3.4.1 / 21+ |
| AI integration | Spring AI (1.0.0‑M5), Spring AI Alibaba (1.0.0‑M6.1) | – |
| Workflow engines | Custom DAG engine, LangGraph4j Core (1.1.5) + Spring AI bridge (1.8.0‑beta3) | – |
| Storage | MySQL 8+, optional MinIO | – |
Getting started (quick‑start)
- Clone
git clone https://github.com/itwanger/PaiAgent-one.git cd PaiAgent-one - Create MySQL database and run
schema.sql(found underbackend/src/main/resources). - Configure environment – copy
.env.exampleinbackend/andfrontend/to.env/.env.localand fill in DB credentials, JWT secret, MinIO keys, etc. - Run the backend
cd backend ./mvnw spring-boot:run # starts on http://localhost:8084 - Run the frontend
cd frontend npm install npm run dev # opens http://localhost:5173 - Log in with the default dev account (
admin / admin123) or set your own via env vars. - Create a workflow – drag an Input node, an OpenAI node, a TTS node and an Output node, connect them, configure the model API key, and hit Debug to see live SSE logs.
Roadmap highlights
- v1.1 – conditional IF/ELSE nodes, loop (FOR/WHILE) nodes, more LLM providers (Claude, Gemini, local models), extra built‑in skills.
- v1.5 – sub‑workflow calls, cron‑based scheduling, versioned workflows, template marketplace, image/video processing nodes.
- v2.0 – multi‑tenant RBAC, collaborative editing, performance monitoring & alerts, i18n, third‑party plugin marketplace.
Who might benefit?
- Product teams building AI‑augmented features without deep ML code.
- Enterprises needing a controlled, auditable pipeline for LLM‑driven automation.
- Developers who want a plug‑and‑play engine to prototype complex LLM orchestration (e.g., RAG, tool‑calling, multi‑model routing).
All information above is taken directly from the repository’s README; no external assumptions have been added.
Related
- Project
- Project
- Project
- Project