PHclaw/agentflow
About
自托管 AI Agent 平台:拖拽式工作流 + 知识库 RAG + 27 个内置技能,默认 SQLite 单机可跑,一条 docker compose 私有化部署。Self-hosted, OpenAI-compatible.
Systems & InfrastructureMeasured star growth
- in 24h
- +2
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
Original
Drag-and-drop AI Agent workflows · No code required · Live in 5 minutes
An open-source, zero-code AI Agent platform: drag-and-drop workflow editor + multi-model hot-swap + knowledge-base RAG + Skill marketplace + one-command deploy.
Runs on SQLite out of the box, so a single machine is enough — and every byte of data stays on your own hardware.
No install needed · just open it in a browser · sign up and build your own Agent
Product demo · Quick start · Features · Built-in skills · Docs · FAQ
📖 Docs site · Wiki · 💬 Discussions
📖 Table of contents
- Why AgentFlow · Product demo
- Screenshots · Agent group chat
- Features · Built-in skills
- Quick start · Key configuration
- Architecture · Project layout
- How it differs from Dify / Coze
- Roadmap · Contributing
- Disclaimer · License · Support
🎯 Why AgentFlow
| Capability | What it solves | See it |
|---|---|---|
| 💬 Multi-agent group chat | Route one task to the best-fit member, chain their work, and surface conflicts automatically — like real teammates | Group chat demo |
| 🛠️ Work mode | PiAgent really reads/writes the workspace and hands back PPT / Excel / image files as downloadable artifacts, not a "pretend" result | Chat-to-PPT |
| 📚 Knowledge-base RAG | Upload once, chunk automatically, recall by relevance, and highlight matched snippets in the UI | Knowledge search |
| 🐳 Self-hosted | Runs on SQLite out of the box; docker compose is all it takes, and all data stays on your machine |
Quick start |
📽️ Product demo
Real screen recordings (captured by a headless browser, unedited). Full videos live in
assets/videos/.
① The whole flow, end to end
Landing page → sign in → pick a template from the marketplace → create an Agent → chat → put a Skill to work. One clip, everything the product can do.

② Multi-agent group chat
One task, many agents. Each one sees the whole chain, not just the previous message. |
③ One sentence to a PPT
Work mode really reads/writes the workspace and hands back PPT / image files as downloadable artifacts. |
Up and running in 30 seconds
git clone https://github.com/PHclaw/agentflow.git
cd agentflow
cp .env.example .env # set JWT_SECRET_KEY at minimum
docker compose up -d --build
Open http://localhost:3000 and sign up, then go to Settings → Model Config and drop in any OpenAI-compatible endpoint. See Quick start and the Deployment guide.
More demos: drag-and-drop workflows · paste a table get a chart · knowledge-base search · tool calls (4 clips)
④ Building a workflow by dragging nodes
Pick nodes from the left panel onto the canvas, edit parameters on the right, save and it takes effect immediately — no code at any point.

▶ Full recording · ▶ Wiring nodes together
⑤ Skill marketplace: paste a table, get a chart
No need to tidy up the format first — messy tables with Chinese units are understood too. The chart shows up in the conversation seconds later, with the raw data and the script alongside.

⑥ Knowledge base: upload and semantic search
Upload a document → automatic chunking and indexing → recall by relevance when you ask a question. Matched snippets are highlighted right in the UI.

⑦ Tool calls inside a conversation
While the Agent runs, a live "calling tool" line appears; only the current one stays on screen, and it hides itself as soon as the reply is done.

🖼️ Screenshots

Workflow editor — three-column layout of node panel / drag-and-drop canvas / node configuration, node and connection counts in the top bar, with test, undo/redo, import and export.
![]() Landing page — the no-code value proposition |
![]() Dashboard — total agents, active conversations, knowledge bases, new conversations this month |
![]() Agent setup — name, prompt, model, with workflow and knowledge base on separate tabs |
![]() Chat — streaming replies with inline artifact preview |
![]() Template marketplace — browse by category, one click to apply |
![]() Skill plaza — skill extension and installation |
![]() Knowledge base — upload, chunk, semantic search |
![]() Conversations — pick any past session and keep talking |
✨ Features
- 🎨 Drag-and-drop workflow editor — ReactFlow canvas with six node types (Trigger / LLM / Knowledge / Tool / Condition / Response) to combine freely; edits take effect on save
- 🤖 Multi-model hot-swap — just fill in the endpoint and model name under Settings → Model Config. Works with any OpenAI-compatible endpoint (including local Ollama), no restart needed
- 📚 Knowledge-base RAG — documents are chunked and indexed on upload, vector recall returns results with relevance scores; the embedding model is configured separately from the chat model
- 🧩 Skill marketplace — 28 bundled skills, each a directory with a
SKILL.md; admins can add or remove them from the console. Third-party licenses are listed in THIRD_PARTY_NOTICES.md; see also skills/README.md - 📎 Artifact delivery — files generated by an Agent come back as downloadable attachments, and image artifacts render inline in the conversation instead of forcing a download first
- 🧰 Template marketplace — customer service / sales / HR / finance scenarios; one click turns a template into a working Agent
- 👤 User system — JWT auth, email-code signup, plan quotas, admin allowlist, fully self-hosted data
- 💬 Agent group chat — multi-agent chain collaboration, auto-recruit, and Feishu-style interactions (quotes, @, edit/revoke, reactions, read receipts, search); attachments auto-switch to work mode for real file access
Who it's for: companies that want an AI customer-service or sales assistant but have no dev team; product managers who need to validate an Agent scenario fast; developers who want to orchestrate LLM workflows with low code.
🚀 Quick start
Requirements
| Dependency | Version | Notes |
|---|---|---|
| Python | 3.11+ | CI baseline; official images use 3.13 |
| Node.js | 18+ | CI baseline; official images use 20 |
| Docker | 20+ | Recommended — one command brings everything up |
Neither PostgreSQL nor Redis is required. SQLite is the default, and when Redis is missing verification codes fall back to process memory — plenty for a single-machine deployment.
Option 1: Docker (recommended)
git clone https://github.com/PHclaw/agentflow.git
cd agentflow
cp .env.example .env # at minimum, set JWT_SECRET_KEY
docker compose up -d --build
docker compose logs -f backend
Open http://localhost:3000 and you're in. The default stack is just two containers (backend + frontend/nginx), data lands in ./data/agentflow.db, and docker compose down won't lose it.
If you need PostgreSQL + pgvector:
docker compose --profile postgres up -d
Option 2: local development
# backend
cd backend && python -m venv venv
.\venv\Scripts\Activate.ps1 # macOS / Linux: source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8001
# frontend (in another terminal)
cd frontend && npm install && npm run dev
The frontend dev server runs on http://localhost:5173 , the backend on http://localhost:8001 .
Option 3: SQLite single-machine lite mode
Just want the backend running, without installing PostgreSQL and Redis:
.\scripts\dev-backend.ps1
For environment variables, model configuration and other details, see the configuration guide.
⚙️ Key configuration
The full list lives in .env.example (every entry is commented) and the configuration guide. The ones you'll touch most:
| Variable | Required | Notes |
|---|---|---|
JWT_SECRET_KEY |
✅ | Falls back to a built-in plaintext secret when empty, which means anyone can forge a token. openssl rand -hex 32 |
DATABASE_URL |
— | Empty = SQLite; for PostgreSQL use postgresql+asyncpg://… |
REDIS_URL |
— | Empty = verification codes in process memory; only needed for multi-instance deploys |
EMBEDDING_BASE_URL |
Recommended for Docker | Embedding model for the knowledge base. The official image does not ship sentence-transformers, so leaving it empty falls back to local inference and fails |
ADMIN_EMAILS |
— | Admin email allowlist; logging in grants console access (grant-only, never revoked) |
REQUIRE_EMAIL_CODE |
— | Keep true in production; set false for internal demos |
MAIL_ENABLED |
— | When false no mail is sent and the code is printed to the backend log |
FREE_AGENTS / TEAM_AGENTS etc. |
— | Plan quotas, defined in exactly one place, shared by copy and enforcement |
Three easy traps (all spelled out in .env.example):
- Don't leave
DATABASE_URLas an empty string. An empty value is treated as a real connection string and the backend won't start — if you don't need to change it, comment the whole line out. - Always set
EMBEDDING_BASE_URLfor Docker deployments. The image doesn't includesentence-transformers(about 2GB extra), so knowledge-base search is unavailable when it's empty. - Changing plan quotas requires a re-login to take effect. Quotas are defined once in
.envto avoid "advertise 20, enforce 5".
🏗️ Architecture
React 18 + ReactFlow ──► FastAPI ──► SQLite (default)
frontend :5173 / :3000 backend :8001 └ switchable to PostgreSQL + pgvector
└ Redis (optional, verification codes)
| Layer | Tech |
|---|---|
| Frontend | React 18 · TypeScript 5.3 · Vite 5 · ReactFlow 11 · Tailwind CSS 3 · Zustand 4 · react-router 6 |
| Backend | Python 3.11+ · FastAPI · SQLAlchemy 2.0 (async) · Alembic · pydantic-settings |
| Storage | SQLite (default, aiosqlite) · PostgreSQL + pgvector (optional) · Redis (optional) |
| Models | Any OpenAI-compatible endpoint: OpenAI · Anthropic · DeepSeek · OpenDesign Go · Qwen · Ollama … |
| Retrieval | Vector embeddings configured independently, decoupled from the chat model |
| Deploy | Docker Compose (FastAPI + nginx) · local venv / npm |
| CI | GitHub Actions: ruff + pytest / tsc + vite build |
The full picture — system architecture, workflow node types, request flow — is in the architecture guide.
📁 Project layout
agentflow/
├── backend/ # FastAPI application
│ ├── app/
│ │ ├── api/ # REST routes: auth / users / agents / templates / knowledge / chat / skills …
│ │ ├── core/ # config, security, database
│ │ ├── models/ # SQLAlchemy models
│ │ └── services/ # workflow engine, skill execution, model gateway
│ └── tests/
├── frontend/ # React + Vite application
│ └── src/
│ ├── pages/ # landing / dashboard / agent / workflow / chat / skills / knowledge / templates
│ ├── components/ # UI kit, layout, workflow nodes
│ ├── stores/ # Zustand
│ └── services/ # API client
├── skills/ # 28 built-in skill directories (licenses in THIRD_PARTY_NOTICES.md)
├── static/ # runtime artifacts mount point (avatars / generated files)
├── docs/ # documentation
├── assets/ # banner / screenshots / GIFs / videos used by the README
├── config/ # static config for model validation
├── docker-compose.yml
└── .env.example
🧩 Built-in skills
The repository ships 28 skill directories out of the box; each skill is a folder containing SKILL.md, scanned at startup.
License note: these skills come from different communities with different licenses (Apache-2.0 / MIT / no notice / all rights reserved) and cannot be redistributed as a whole under this repository's license; see THIRD_PARTY_NOTICES.md. If you redistribute commercially, review that list first or remove the skills you don't need.
The most used ones:
| Skill | What it does |
|---|---|
| Excel Assistant | Upload Excel/CSV or paste a table → charts, grouped summaries, export |
| PPT Assistant | Generates a 16:9 HTML deck after confirming purpose and slide count, editable |
| HTML Slides | Multi-style static HTML presentations |
| Frontend Slides | Author animation-rich HTML presentations from scratch or by conversion |
| PDF Assistant | Upload a PDF → extract TOC, key points, tables, or just ask the document questions |
| Academic Search | Search papers by topic, with year, authors, citations and a clickable summary table |
| Paper Notes | Turn a paper into problem / method / results / limitations / references notes |
| Meeting Notes | Raw meeting transcript → conclusions, decisions and a task table (owners / deadlines) |
| Clinical Case Report | Chief complaint and findings → structured teaching case |
| Statistics Assistant | Hypothesis testing, sample size, confidence intervals, with decision advice |
| Chart Visualization | Picks the chart type that fits the data and renders it |
| API Doc Writer | Turns an API definition / OpenAPI spec into a deliverable doc: parameter tables, error codes, curl examples |
| Contract Summary | Upload a contract → six key clause categories (parties / amount / payment / term / breach / dispute resolution) in a table with source locations; missing clauses are marked "not found" |
Self-authored skills carry no such restrictions: add a folder following the SKILL.md format. The optional HTML-PPT pipeline also reads assets such as skills/html-ppt-skill-main/assets; calling it without those skills installed raises a missing-file error, which is expected.
💬 Agent Group Chat (Multi-Agent Collaboration)
Pull several agents into one room, send a task, and let the system decide who takes it, who fills the gaps, and who wraps up. This is the capability that sets AgentFlow apart from single-agent chat.
See the group chat card in Product demo above: full recording · full feature walkthrough (promo).
How to use
- Open Groups in the sidebar, click New, and pick a few agents
- Send a task — the UI shows "XX took this task + why + confidence"
- Type
@to assign explicitly, or quote a message to have its author continue - Group settings lets you add/remove members, enable chain collaboration, and set the auto-recruit limit
Chain collaboration
By default one agent handles the task. With collaboration enabled, members take turns like real teammates:
User: ship a launch plan for an AI support product (personas + competitors + copy + tech + compliance)
🔀 Compliance → Tech Advisor → Launch Planner
🔀 Collaboration loop closed
★ Group summary: two conflicting timelines, two incompatible customer-segmentation schemes
- Three strictly separated handoff types:
HANDOFF(I can't, take over),NEXT(I'm done, you fill the rest),NEED_MEMBER(nobody here can, recruit someone) - The next agent receives everyone's contributions, not just the previous speaker
- Anti-ping-pong: one loop back is fine, two means stop
- A final summary surfaces conflicts between sections and missing inputs
- Chain size is configurable (2–8) in group settings
Auto-recruit
When routing finds that no existing member covers the required capability,
AgentFlow creates a purpose-built agent on the fly (e.g. "Data Analyst",
"Compliance Advisor") and adds it to the group. New members inherit the group's
model config and are marked auto_created. Removing them deletes the agent entirely,
so disposable roles don't pile up. Default cap is 3, configurable up to 8.
Feishu-style message interactions
| Feature | Details |
|---|---|
| Quote reply | Hover a message → "Reply to this"; the quoted block is shown and its author continues |
| @ mention | Type @ to pick a member; "@all" is a marker only (it does not fire N separate replies) |
| Edit / revoke | Hover for ⋯; edits show "edited", revokes are soft-deletes that preserve the reply chain |
| Reactions | + Emoji under each message; existing reactions aggregate into chips, click again to remove yours |
| Read receipts | Marked read on group open; messages show "N read" |
| Message search | "Search history" filters as you type |
| File sending | Uploads auto-switch to work mode so a PiAgent can actually read the file |
| Markdown | Headings, lists, code blocks and tables render inline; @names are highlighted |
Two execution modes
- Quick answer (
llm): direct LLM call, fast, for text-only questions - Work mode (
pi): PiAgent with its own workspace, file I/O, multi-step tool loop, and real downloadable artifacts
Sending a message with attachments automatically switches to work mode so the model can't pretend to have read a file.
⚖️ How it differs from Dify / Coze
| AgentFlow | Dify | Coze | WorkBuddy | Codex | |
|---|---|---|---|---|---|
| Positioning | Zero-code agent orchestration | LLM app development platform | Conversational bot builder | Desktop AI agent workbench for office work | Terminal coding agent |
| Deployment | Self-hosted first, SQLite single-machine by default | Self-hosted / cloud | Cloud only | Desktop client, install and run | Local CLI + cloud sandbox |
| Data ownership | All in your own database | Yours when self-hosted | On the platform side | Local execution; enterprise edition centrally managed | Code stays local; cloud tasks run in sandboxes |
| License | Apache-2.0 | Open source (with additional terms) | Closed source | Proprietary | Open source (CLI, Apache-2.0) |
| Multi-model hot-swap | Change it in the UI, no restart | Edit config | Platform-bound | Hunyuan-first, hybrid multi-model access | OpenAI models mainly, configurable endpoints |
| Skill extension | Add a directory with SKILL.md |
Plugin marketplace | Plugin marketplace | Built-in skills + office connectors | MCP + config files |
| Deliverables | ✅ file download + inline image preview | Partial | Partial | Reports / decks / spreadsheets | Code diffs and command output |
WorkBuddy and Codex belong to different categories — a desktop office agent and a terminal coding agent — rather than visual agent-orchestration platforms like the first three. They are listed for positioning context, not as a ranking of like-for-like competitors.
The full comparison lives in How it differs from Dify / Coze.
🗺️ Roadmap
- Drag-and-drop workflow editor (six node types)
- Multi-model hot-swap + any OpenAI-compatible endpoint
- Knowledge-base RAG (embedding model configured independently)
- Skill plaza and template marketplace
- Artifact delivery + inline image preview
- One-command Docker Compose deploy (SQLite by default)
- Agent group chat & Feishu-style interactions (chain collaboration / auto-recruit / edit-revoke / read receipts / reactions / search)
- End-to-end pgvector path verification
- Async task queue (the current compose has no worker container;
celery_app.pyis unreferenced) - More skills and templates
📚 Docs
🌐 English landing page: https://phclaw.github.io/agentflow/en.html — a one-page overview with quick start and links.
| Document | Contents |
|---|---|
| Configuration guide | Environment variables · model hot-swap · SQLite lite mode |
| Architecture guide | System architecture · workflow node types · project layout |
| Deployment guide | Docker · Nginx reverse proxy · database backup |
| API reference | REST endpoints · auth · error handling |
| Development guide | Tests · database migrations · UI diagnostic scripts |
| FAQ | Models · RAG · self-hosting · billing |
| Changelog | Version history and roadmap |
| Security policy | Vulnerability reporting · responsible disclosure credits |
The detailed guides below are written in Chinese. For an English overview, see the English landing page and the English README.
Once the server is up, the live API docs are at http://localhost:8001/docs (Swagger) · http://localhost:8001/redoc
🤝 Contributing
Issue → Fork → Branch → Develop → Test → PR → Review → Merge
- Run the two CI steps locally before pushing:
cd backend && ruff check app/ && python -m pytest tests/ -vandcd frontend && npx tsc --noEmit && npm run build - See CONTRIBUTING.md for the full workflow; report security issues privately per SECURITY.md
⚠️ Disclaimer
Licensed under Apache-2.0: use, modification and redistribution, including commercial use, are permitted. No use restrictions beyond the license terms.
Use and compliance:
- This repository ships no API keys, mail credentials or user data; deployers configure
.envthemselves and keep it private - Users should assess the suitability and risk of the project themselves and comply with local laws
- When using crawler, document parsing or data analysis features, users must comply with robots.txt, terms of service, data protection law and third-party content licenses
Crawler disclaimer:
- Users determine the applicable scenario for crawler features and bear the corresponding responsibility
- Users must comply with the robots.txt protocol and terms of use of the target websites
- Users must comply with applicable laws and regulations, and must not crawl maliciously or abuse data
- Any legal consequences arising from use of the crawler functionality are borne solely by the user
Data usage disclaimer:
- Users are responsible for determining the suitability and compliance obligations of the data analysis features
- Any legal consequences arising from use of this project are borne solely by the user
- Users should ensure the legality and compliance of the data being analyzed
Technical disclaimer:
- This project is provided "as is", without any express or implied warranty
- The authors accept no liability for any direct or indirect loss caused by use of this project
- Users should assess the suitability and risk of the project themselves
Limitation of liability:
- Users should fully understand applicable laws and regulations before using this project
- Users should ensure their use complies with local laws and regulations
- Any consequence arising from use of this project in violation of laws and regulations is borne solely by the user
See SECURITY.md for private vulnerability reporting.
📄 License
Released under the Apache License 2.0. Full text in LICENSE. Third-party skills and assets are not distributed with this repository; see THIRD_PARTY_NOTICES.md.
🎉 Support
Getting help
| Channel | Where |
|---|---|
| FAQ | docs/FAQ.md |
| Live demo | http://159.75.21.251:3000/ |
| Bug reports | Issues |
| Feature requests | Discussions |
Contact
📧 Email: [email protected]
Business inquiries
- Enterprise custom development
- Big data services
- Academic collaboration
- Technical training
Explore related projects
Loading…









