简体中文 | English
-
FlowGame extends the Tinyflow canvas engine for AI workflows: it keeps Tinyflow’s drag-and-drop editing, adds custom nodes, and ships with a Python backend for real execution and persistence.
-
Embed the editor in any Vue 3 app via
@flowgame/vue’sFlowEditor. Trial runs, Redis flow storage, and vector search are handled by flowgame_python (FastAPI + Redis + Qdrant) — frontend and backend are separate and deployable via Docker.
Custom nodes added on top of Tinyflow (registered in @flowgame/core):
| Node | Description |
|---|---|
| Start API | HTTP entry point — external API path and input params |
| LLM API | Configure API key, endpoint, and model for LLM calls |
| Knowledge Base+ | Qdrant-backed retrieval for RAG |
| Memory Write / Read | Cross-node, cross-turn session context |
| HTML Template | Render structured HTML from templates |
- Built on Tinyflow: Reuses the canvas engine and adds Start API, LLM API, Knowledge Base+, memory read/write, and HTML template nodes.
- Python backend execution: flowgame_python parses workflows, calls LLM/HTTP, reads/writes Redis and Qdrant, with sync and streaming trial runs.
- Ready-to-use component: Drop in
<FlowEditor />with built-in flow list, knowledge base panel, node inspector, and trial run. - Clear layering:
@flowgame/corefor nodes and API client;@flowgame/vuefor Vue 3 UI customization. - Flexible deployment: npm integration, local monorepo dev, or Docker one-shot (web + API + Redis + Qdrant).
| Tool | Version |
|---|---|
| Node.js | 18+ |
| pnpm / npm / yarn | Any (pnpm recommended) |
| Python backend (full features) | 3.10+, see flowgame_python |
pnpm create vite my-flow-app --template vue-ts
cd my-flow-app
pnpm installpnpm add @flowgame/vue @flowgame/core @tinyflow-ai/ui @arco-design/web-vue vueCurrent npm version: 0.1.9 (check with npm view @flowgame/vue version).
src/main.ts
import { createApp } from 'vue'
import ArcoVue from '@arco-design/web-vue'
import '@arco-design/web-vue/dist/arco.css'
import '@tinyflow-ai/ui/dist/index.css'
import '@flowgame/vue/style.css'
import { configureFlowGameClient } from '@flowgame/core'
import App from './App.vue'
configureFlowGameClient({
baseURL: '/api',
// When sharing Redis / Qdrant across projects (must match flowgame_python .env):
// redisKeyPrefix: 'myapp:',
// qdrantKbPrefix: 'myapp_',
onError: (msg) => alert(msg)
})
createApp(App).use(ArcoVue).mount('#app')src/App.vue
<script setup lang="ts">
import { FlowEditor } from '@flowgame/vue'
</script>
<template>
<div class="flow-editor-host">
<FlowEditor />
</div>
</template>
<style>
html, body, #app { margin: 0; height: 100%; overflow: hidden; }
</style>vite.config.ts (dev proxy to backend)
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
server: {
proxy: {
'/api': {
target: 'http://127.0.0.1:8008',
changeOrigin: true
}
}
}
})# In the flowgame_python repo
python run.py # default http://127.0.0.1:8008pnpm devOpen the dev URL in your browser. Without the backend, the canvas works; save, trial run, flow list, and knowledge base APIs will fail — this is expected.
After installing dependencies and configuring main.ts, App.vue, and vite.config.ts as above, mount <FlowEditor /> in your page.
| Type | Name | Description |
|---|---|---|
| Prop | readonly |
Read-only view mode |
| Prop | flow-name / redis-key |
Load a flow from Redis |
| Prop | builtin-business-modals |
Built-in flow list / knowledge modals (default true) |
| Event | saved |
Save succeeded, { flowName } |
| Event | executed |
Trial run finished, { phase: 'success' | 'error' } |
| Event | open-flow-list / open-flow-knowledge |
Custom modals when builtin-business-modals=false |
| Expose | getWorkflow() |
Current workflow JSON |
| Expose | openFlowFromListPanel(payload) |
Open or create a flow from the list |
Full API details: packages/vue/README.md.
In production, proxy /api via Nginx to the Python service and keep baseURL: '/api'. For cross-origin APIs, set a full baseURL in configureFlowGameClient and configure CORS.
git clone https://github.com/lianyinging/flowgame.git
cd flowgame
pnpm install
pnpm dev # Official editor → http://127.0.0.1:8009
pnpm dev:playground # Minimal example → http://127.0.0.1:8010Vite references packages/*/src directly — hot reload works without building first.
flowgame/
├── packages/
│ ├── core/ # @flowgame/core — nodes, canvas patches, API client
│ └── vue/ # @flowgame/vue — FlowEditor, side panels, modals
├── apps/
│ ├── editor/ # Official demo (pnpm dev → 8009)
│ └── playground-vue/ # Minimal integration example (8010)
├── deploy/ # Docker / Nginx configs
│ ├── docker-compose.yml
│ ├── Dockerfile
│ └── nginx.conf
├── README.md # Chinese docs
├── README.en-US.md # This file
├── Docker部署.md # Detailed Docker guide (Chinese)
└── CHANGELOG.md # Published package changelog
| You want to change… | Directory |
|---|---|
| Custom nodes, canvas logic, API | packages/core/src |
| Editor UI, inspector panel | packages/vue/src |
| Official demo pages | apps/editor/src |
Related repositories
| Repo | Description |
|---|---|
| flowgame | This repo (frontend monorepo) |
| flowgame_python | Python executor, Redis, Qdrant API |
Default ports
| Service | URL |
|---|---|
| Official editor | http://127.0.0.1:8009 |
| Playground | http://127.0.0.1:8010 |
| Python API | http://127.0.0.1:8008 |
| API docs | http://127.0.0.1:8008/docs |
| Issue | Fix |
|---|---|
Cannot find @flowgame/core |
Install both @flowgame/core and @flowgame/vue |
| Missing styles / huge node icons | Import @tinyflow-ai/ui/dist/index.css and @flowgame/vue/style.css |
| Updated npm package but behavior unchanged | Delete node_modules/.vite and restart pnpm dev |
form-data has no default export |
Do not optimizeDeps.exclude @flowgame packages; clear .vite cache |
| Trial run / save fails | Start flowgame_python; Vite proxy port must match backend (default 8008) |
| Arco component errors | Call app.use(ArcoVue) and import arco.css |
| Flow list only shows Message | Use a recent @flowgame/vue version and ensure /api backend is up |
| Docker port 8009 connection reset | Ensure nginx.conf listens on 8009 and mapping is 8009:8009 |
Deploy the full stack — web + API + Redis + Qdrant — on a server with Docker.
flowgame and flowgame_python must be siblings under the same parent:
/opt/flowgame/
├── flowgame/ # This repo
│ └── deploy/
└── flowgame_python/ # Python backend
mkdir -p /opt/flowgame && cd /opt/flowgame
git clone https://github.com/lianyinging/flowgame.git flowgame
git clone https://github.com/lianyinging/flowgame_python.git flowgame_python
cd flowgame/deploy
cp .env.example .env # Edit ports as needed
docker compose up -d --buildcurl http://127.0.0.1:8008/health
curl -I http://127.0.0.1:8009Open in browser: http://<server-ip>:8009 (API docs: http://<server-ip>:8009/docs).
| Container | Default host port | Role |
|---|---|---|
web |
8009 | Nginx serves editor, proxies /api to backend |
api |
8008 | FastAPI workflow execution |
redis |
6379 | Flow storage |
qdrant |
6333 | Vector knowledge base |
Full guide: Docker部署.md.
FlowGame (@flowgame/core, @flowgame/vue) is licensed under Apache License 2.0.
Peer dependencies such as @tinyflow-ai/ui (LGPL-3.0-or-later) and @arco-design/web-vue use their own licenses — verify compatibility before distribution.