I modeled an AI multi-agent system after China's 1,300-year-old imperial governance.
Turns out, ancient bureaucracy understood separation of powers better than modern AI frameworks.
12 AI agents (11 business roles + 1 compatibility role) form the Three Departments & Six Ministries: Crown Prince triages, Planning proposes, Review vetoes, Dispatch assigns, Ministries execute.
Built-in institutional review gates that CrewAI doesn't have. A real-time dashboard that AutoGen doesn't have.
🎬 Demo · 🚀 Quick Start · 🏛️ Architecture · 📋 Features · 中文 · Contributing
Your browser does not support video playback. See the GIF below or download the video.
🎥 Full demo: AI Multi-Agent collaboration with Three Departments & Six Ministries
Issue edict → Crown Prince triage → Planning → Review → Ministries execute → Report back (30s)
🐳 No OpenClaw? Run
docker run -p 7891:7891 cft0808/edictto try the full dashboard with simulated data.
Most multi-agent frameworks let AI agents talk freely, producing opaque results you can't audit or intervene in. Edict takes a radically different approach — borrowing the governance system that ran China for 1,400 years:
You (Emperor) → Crown Prince (Triage) → Planning Dept → Review Dept → Dispatch Dept → 6 Ministries → Report Back 皇上 太子 中书省 门下省 尚书省 六部 回奏
This isn't a cute metaphor. It's real separation of powers for AI:
"Instead of one AI doing everything wrong, 9 specialized agents check each other's work."
| CrewAI | MetaGPT | AutoGen | Edict | |
|---|---|---|---|---|
| Built-in review/veto | ❌ | ⚠️ | ⚠️ | ✅ Dedicated reviewer |
| Real-time Kanban | ❌ | ❌ | ❌ | ✅ 10-panel dashboard |
| Task intervention | ❌ | ❌ | ❌ | ✅ Stop / Cancel / Resume |
| Full audit trail | ⚠️ | ⚠️ | ❌ | ✅ Memorial archive |
| Agent health monitoring | ❌ | ❌ | ❌ | ✅ Heartbeat detection |
| Hot-swap LLM models | ❌ | ❌ | ❌ | ✅ From the dashboard |
| Skill management | ❌ | ❌ | ❌ | ✅ View / Add skills |
| News aggregation | ❌ | ❌ | ❌ | ✅ Daily digest + webhook |
| Setup complexity | Med | High | Med | Low · One-click / Docker |
Core differentiator: Institutional review + Full observability + Real-time intervention
CrewAI and AutoGen agents work in a "done, ship it" mode — no one checks output quality. It's like a company with no QA department where engineers push code straight to production.
Edict's Review Department (门下省) exists specifically for this:
This isn't an optional plugin — it's part of the architecture. Every command must pass through Review. No exceptions.
This is why Edict produces reliable results on complex tasks: there's a mandatory quality gate before anything reaches execution. Emperor Taizong figured this out 1,300 years ago — unchecked power inevitably produces errors.
| Panel | Description |
|---|---|
| 📋 Edicts Kanban | Task cards by state, filters, search, heartbeat badges, stop/cancel/resume |
| 🔭 Department Monitor | Pipeline visualization, distribution charts, health cards |
| 📜 Memorial Archive | Auto-generated archives with 5-phase timeline |
| 📜 Edict Templates | 9 presets with parameter forms, cost estimates, one-click dispatch |
| 👥 Officials Overview | Token leaderboard, activity stats |
| 📰 Daily Briefing | Auto-curated news, subscription management, Feishu push |
| ⚙️ Model Config | Per-agent LLM switching, automatic Gateway restart |
| 🛠️ Skills Config | View installed skills, add new ones |
| 💬 Sessions | Live session monitoring with channel labels |
| 🎬 Court Ceremony | Immersive daily opening animation with stats |











docker run -p 7891:7891 cft0808/edict
Prerequisites: OpenClaw · Python 3.9+ · macOS/Linux
git clone https://github.com/cft0808/edict.git
cd edict
chmod +x install.sh && ./install.sh
The installer automatically:
~/.openclaw/workspace-*, including Crown Prince/HR/Briefing)openclaw.json# Terminal 1: Data sync loop (every 15s)
bash scripts/run_loop.sh
# Terminal 2: Dashboard server
python3 dashboard/server.py
# Open browser
open http://127.0.0.1:7891
📖 See Getting Started Guide for detailed walkthrough.
┌───────────────────────────────────┐ │ 👑 Emperor (You) │ │ Feishu · Telegram · Signal │ └─────────────────┬─────────────────┘ │ Issue edict ┌─────────────────▼─────────────────┐ │ 👑 Crown Prince (太子) │ │ Triage: chat → reply / cmd → task │ └─────────────────┬─────────────────┘ │ Forward edict ┌─────────────────▼─────────────────┐ │ 📜 Planning Dept (中书省) │ │ Receive → Plan → Decompose │ └─────────────────┬─────────────────┘ │ Submit for review ┌─────────────────▼─────────────────┐ │ 🔍 Review Dept (门下省) │ │ Audit → Approve / Reject 🚫 │ └─────────────────┬─────────────────┘ │ Approved ✅ ┌─────────────────▼─────────────────┐ │ 📮 Dispatch Dept (尚书省) │ │ Assign → Coordinate → Collect │ └───┬──────┬──────┬──────┬──────┬───┘ │ │ │ │ │ ┌─────▼┐ ┌───▼───┐ ┌▼─────┐ ┌───▼─┐ ┌▼─────┐ │💰 Fin.│ │📝 Docs│ │⚔️ Eng.│ │⚖️ Law│ │🔧 Ops│ │ 户部 │ │ 礼部 │ │ 兵部 │ │ 刑部 │ │ 工部 │ └──────┘ └──────┘ └──────┘ └─────┘ └──────┘ ┌──────┐ │📋 HR │ │ 吏部 │ └──────┘
| Dept | Agent ID | Role | Expertise |
|---|---|---|---|
| 👑 Crown Prince | taizi | Triage, summarize | Chat detection, intent extraction |
| 📜 Planning | zhongshu | Receive, plan, decompose | Requirements, architecture |
| 🔍 Review | menxia | Audit, gatekeep, veto | Quality, risk, standards |
| 📮 Dispatch | shangshu | Assign, coordinate, collect | Scheduling, tracking |
| 💰 Finance | hubu | Data, resources, accounting | Data processing, reports |
| 📝 Documentation | libu | Docs, standards, reports | Tech writing, API docs |
| ⚔️ Engineering | bingbu | Code, algorithms, checks | Development, code review |
| ⚖️ Compliance | xingbu | Security, compliance, audit | Security scanning |
| 🔧 Infrastructure | gongbu | CI/CD, deploy, tooling | Docker, pipelines |
| 📋 HR | libu_hr | Agent management, training | Registration, permissions |
| 🌅 Briefing | zaochao | Daily briefing, news | Scheduled reports, summaries |
| From ↓ \ To → | Prince | Planning | Review | Dispatch | Ministries |
|---|---|---|---|---|---|
| Crown Prince | — | ✅ | |||
| Planning | ✅ | — | ✅ | ✅ | |
| Review | ✅ | — | ✅ | ||
| Dispatch | ✅ | ✅ | — | ✅ all | |
| Ministries | ✅ |
Emperor → Prince Triage → Planning → Review → Assigned → Executing → ✅ Done ↑ │ │ └── Veto ──┘ Blocked ──
edict/ ├── agents/ # 12 agent personality templates (SOUL.md) │ ├── taizi/ # Crown Prince (triage) │ ├── zhongshu/ # Planning Dept │ ├── menxia/ # Review Dept │ ├── shangshu/ # Dispatch Dept │ ├── hubu/ libu/ bingbu/ # Finance / Docs / Engineering │ ├── xingbu/ gongbu/ # Compliance / Infrastructure │ ├── libu_hr/ # HR Dept │ └── zaochao/ # Morning Briefing ├── dashboard/ │ ├── dashboard.html # Dashboard (single file, zero deps, works out of the box) │ ├── dist/ # Pre-built React frontend (included in Docker image) │ └── server.py # API server (stdlib, zero deps) ├── scripts/ # Data sync & automation scripts │ ├── kanban_update.py # Kanban CLI with data sanitization (~300 lines) │ └── ... # fetch_morning_news, sync, screenshots, etc. ├── tests/ # E2E tests │ └── test_e2e_kanban.py # Kanban sanitization tests (17 assertions) ├── data/ # Runtime data (gitignored) ├── docs/ # Documentation + screenshots ├── install.sh # One-click installer └── LICENSE # MIT
| React 18 Frontend | TypeScript + Vite + Zustand, 13 components |
| stdlib Backend | server.py on http.server, zero dependencies |
| Agent Thinking Visible | Real-time display of agent thinking, tool calls, results |
| One-click Install | Workspace creation to Gateway restart |
| 15s Auto-sync | Live data refresh with countdown |
| Daily Ceremony | Immersive opening animation |
Full roadmap with contribution opportunities: ROADMAP.md
All contributions welcome! See CONTRIBUTING.md
The examples/ directory contains real end-to-end use cases:
| Example | Command | Departments |
|---|---|---|
| Competitive Analysis | "Analyze CrewAI vs AutoGen vs LangGraph" | Planning→Review→Finance+Engineering+Docs |
| Code Review | "Review this FastAPI code for security issues" | Planning→Review→Engineering+Compliance |
| Weekly Report | "Generate this week's engineering team report" | Planning→Review→Finance+Docs |
Each case includes: Full command → Planning proposal → Review feedback → Ministry outputs → Final report.
MIT · Built by the OpenClaw community
In ancient China, the “Dǐbào” (imperial gazette) delivered edicts across the empire. Today we have a WeChat account.
Scan to follow · cft0808
What you’ll find:
⚔️ Governing AI with the wisdom of ancient empires
以古制御新技,以智慧驾驭 AI