# YunAgent **Repository Path**: imagescience/yun-agent ## Basic Information - **Project Name**: YunAgent - **Description**: 轻量级的AI工作流编排系统,类似dify、n8n,全程使用Vibe Coding,AI工具为Qoder+CLI。涉及到的技术栈包括SpringAI、LangGraph4J、SSE、MinIO、DAG自定引擎等。 - **Primary Language**: Java - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-13 - **Last Updated**: 2026-08-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # YunAgent A lightweight AI workflow orchestration platform with a visual flow editor, multi-LLM provider support, and tool node integration. The flagship use case is **AI podcast generation** (text input → LLM rewrite → speech synthesis → audio playback). > Similar to Dify / n8n. Built entirely with Vibe Coding using Qoder + CLI. ## Tech Stack | Layer | Technology | |-------|-----------| | Frontend | React 18 + TypeScript + Vite + React Flow + Ant Design + Zustand | | Backend | Spring Boot 3.2.5 + Java 17 + Maven multi-module | | Engine | Custom DAG workflow engine (Kahn's topological sort) | | Communication | SSE (Server-Sent Events) real-time streaming | | Database | H2 embedded (switchable to MySQL) | | LLM | OpenAI / DeepSeek / ZhiPu / DashScope (Qwen) via OpenAI-compatible API | | TTS | DashScope CosyVoice ultra-realistic speech synthesis | | Storage | MinIO object storage (falls back to local temp files) | ## Project Structure ``` yun-agent/ ├── backend/ # Spring Boot multi-module │ ├── yun-agent-common/ # Enums, models, DTOs │ ├── yun-agent-engine/ # DAG workflow engine core │ ├── yun-agent-service/ # Business logic, LLM/TTS integration │ └── yun-agent-web/ # REST API, SSE, application entry ├── frontend/ # React frontend │ └── src/ │ ├── components/ # UI components (canvas, nodes, panels, debug) │ ├── stores/ # Zustand state management │ ├── services/ # API client + SSE client │ └── types/ # TypeScript type definitions └── docs/ # Project documentation ├── summary.md # Project summary └── user_guide.md # User manual ``` ## Quick Start ### Prerequisites - JDK 17+ - Maven 3.8+ - Node.js 18+ / npm 8+ ### 1. Start Backend ```bash cd backend mvn spring-boot:run -pl yun-agent-web ``` Backend running at: `http://localhost:8080` ### 2. Start Frontend ```bash cd frontend npm install # First time only npm run dev ``` Frontend running at: `http://localhost:5173` ## Usage ### Build a Workflow 1. Drag nodes from the **Node Library** (left sidebar) onto the canvas: `User Input` → `LLM` → `TTS Tool` → `Output` 2. Connect nodes by dragging from the bottom handle to the target node's top handle 3. Click a node to open the **Config Panel** (right sidebar) and set parameters: - LLM node: select provider, enter API Key, choose model, write system prompt - TTS node: enter API Key, select voice and speed ### Debug & Run 1. Click **Save** to persist the workflow 2. Click **Debug** to open the debug drawer at the bottom 3. Enter test text and click **Run** (or press `Ctrl+Enter`) 4. Nodes light up in real-time: blue (running) → green (success) → red (failed) 5. Once complete, an audio player appears to play the AI-generated podcast ### Supported LLM Providers | Provider | Code | Recommended Models | |----------|------|-------------------| | OpenAI | `openai` | gpt-4o, gpt-3.5-turbo | | DeepSeek | `deepseek` | deepseek-chat | | ZhiPu AI | `zhipu` | glm-4 | | DashScope (Qwen) | `dashscope` | qwen-turbo, qwen-plus | ## API Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | `/api/workflows` | GET / POST | List / create workflows | | `/api/workflows/{id}` | GET / PUT / DELETE | Get / update / delete workflow | | `/api/workflows/{id}/run` | POST (SSE) | Execute workflow (SSE streaming) | | `/api/workflows/{id}/history` | GET | Execution history | | `/api/nodes/types` | GET | Available node types & config schemas | ## Configuration Backend config: `backend/yun-agent-web/src/main/resources/application.yml` Key settings (overridable via environment variables): ```yaml server.port: 8080 minio.endpoint: ${MINIO_ENDPOINT:http://localhost:9000} minio.access-key: ${MINIO_ACCESS_KEY:minioadmin} minio.secret-key: ${MINIO_SECRET_KEY:minioadmin} cors.allowed-origins: http://localhost:5173 ``` To switch to MySQL: update the datasource config in `application.yml` and add `mysql-connector-j` dependency to `yun-agent-web/pom.xml`. ## Documentation - [Project Summary](docs/summary.md) — Architecture, tech stack, module details - [User Guide](docs/user_guide.md) — Setup, usage guide, FAQ ## Contributing 1. Fork this repository 2. Create a `feat_xxx` branch 3. Commit your changes 4. Open a Pull Request ## License [MIT](LICENSE)