Designing AI Agent Collaboration with a 1300‑Year‑Old Imperial System (12.7k Stars)
Edict (三省六部) is an open‑source AI multi‑agent framework that embeds a 1300‑year‑old Chinese imperial bureaucracy into its workflow, offering built‑in approval, real‑time dashboards, task intervention, and full audit trails, and it has already attracted 12.7k GitHub stars.
What Is Edict?
Edict (三省六部) is an open‑source project with 12.7k GitHub stars that literally incorporates the three‑province and six‑department imperial system from 1300 years ago into an AI agent collaboration workflow, providing a complete approval process rather than a mere metaphor.
Architecture and Agent Roles
The message flow mimics the historic bureaucracy:
你 (皇上) → 太子(分拣) → 中书省(规划) → 门下省(审核) → 尚书省(派发) → 六部(执行) → 回奏Each "department" is an independent AI agent with a specific responsibility:
太子 (Taizi) : receives user messages and decides whether they are casual chat or a task.
中书省 (Zhongshu) : plans the task and breaks it into steps.
门下省 (Menxia) : reviews the plan, can reject and send it back for revision.
尚书省 (Shangshu) : dispatches subtasks to the six ministries.
吏部 (Libu) : handles personnel‑related matters.
户部 (Hubu) : handles finance‑related matters.
兵部 (Bingbu) : handles military and security matters.
刑部 (Xingbu) : handles legal and compliance matters.
工部 (Gongbu) : handles engineering and development matters.
礼部 (Libu) : handles etiquette, external affairs, and operations.
早朝 (Zaochao) : a morning meeting where agents negotiate.
How It Beats CrewAI, MetaGPT, and AutoGen
Compared with existing frameworks, Edict adds several missing capabilities:
Audit mechanism : a dedicated Menxia review that can reject unsatisfactory outputs (CrewAI has none, MetaGPT makes it optional).
Real‑time kanban : a live dashboard ("军机处 Kanban") that visualizes every agent’s state (missing in the other three).
Task intervention : ability to pause, cancel, or resume tasks on demand (absent in the others).
Flow audit : complete "奏折" records for every step, enabling traceability (only a warning in the others).
Agent monitoring : heartbeat and activity detection for each agent.
Hot‑switch model : one‑click LLM switching within the kanban.
In short, other frameworks are "run‑and‑forget", while Edict is "fully observable and controllable".
Core Advantage: Menxia Review
The Menxia department is the key differentiator. It checks whether Zhongshu's plan is complete, whether sub‑tasks are reasonable, and whether the output meets quality standards, with the power to send the work back for re‑work ("封驳").
Live Dashboard
Every agent’s current action, thoughts, and progress are displayed in real time, as shown in the screenshots below.
Full Audit Trail
All workflow transitions generate a "奏折" record, making the entire process traceable and auditable.
Getting Started
One‑line Docker demo: docker run -p 7891:7891 cft0808/edict No OpenClaw required; the container includes sample data for immediate testing.
Local deployment:
git clone https://github.com/cft0808/edict.git
cd edict
chmod +x install.sh && ./install.shAdoption
12.7k GitHub stars
132 issues
23 pull requests
Already deployed in production environments
Conclusion
The value of Edict lies not in the historical gimmick but in solving observability and controllability problems of AI agent collaboration: a built‑in review mechanism, live kanban, on‑demand task intervention, and a complete audit log. If you are building multi‑agent systems or are frustrated by the black‑box nature of CrewAI/AutoGen, Edict is worth trying.
It is also fully compatible with the current OpenClaw ecosystem and its integration bots (e.g., Feishu), allowing AI to schedule agents without a human coordinator.
https://github.com/cft0808/edictGeek Labs
Daily shares of interesting GitHub open-source projects. AI tools, automation gems, technical tutorials, open-source inspiration.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
