edict is a free, open source project & work management project written in Python and released under MIT. It has 16,900 GitHub stars, 1,769 forks and 18 open issues, and was last pushed 11 days ago. On this registry it ranks #4 of 62 tracked projects in Project & Work Management, with 5 head-to-head comparisons available. It gained 6 stars over the last 3 tracked days.

What is edict?

Edict is an MIT-licensed Python orchestration system that runs multi-agent LLM work through the Tang-dynasty Three Departments and Six Ministries, splitting the job across eleven business roles plus one compatibility role so that planning, review, dispatch, and execution are handled by separate agents, and it is built for teams running OpenClaw that need every hand-off between agents to be reviewable, auditable, and interruptible.

What it is

Edict layers a governance structure onto OpenClaw, the agent runtime named by its homepage and topics. Instead of letting agents converse freely, it assigns fixed duties: the Crown Prince (太子) sorts incoming messages and only creates a task when the message is an actual edict, the Zhongshu province (中书省) plans, the Menxia province (门下省) reviews, the Shangshu province (尚书省) dispatches, and seven executing ministries (户, 礼, 兵, 刑, 工, 吏, plus the morning-court officer) carry the work out before it returns as a memorial. Installation creates a workspace per role, writes a SOUL.md defining that role's persona, workflow rules, and data-cleaning conventions, and registers the agents together with a permission matrix into openclaw.json.

The problem it attacks is the "finish and hand over" model that the README attributes to CrewAI, MetaGPT, and AutoGen, where agents talk among themselves and the user receives a result with no record of how it was produced and no way to intervene. Edict replaces that with an institutional review gate: the Menxia province checks whether the plan and its subtask breakdown are sound, rejects substandard output outright rather than warning about it, and forces a rework loop until the plan passes. That gate is part of the architecture, not an optional plugin, so every edict passes through it before execution begins.

Key capabilities

  • Twelve-role agent hierarchy with a strict permission matrix defining which agent may send messages to which, written into openclaw.json at install time.
  • State transition validation enforced by kanban_update.py, which rejects illegal jumps between task statuses rather than accepting them silently.
  • The 军机处 dashboard with ten panels, including the 旨意看板 Kanban, 省部调度 monitor, 奏折阁 memorial archive, 旨库 template library, 官员总览 officials overview, 天下要闻 news feed, 模型配置 model config, 技能配置 skills config, 小任务 sessions, 上朝仪式 ceremony, and 朝堂议政 court discussion.
  • Per-agent model switching from the dashboard, applied after an automatic Gateway restart in roughly five seconds.
  • Task intervention controls that allow an edict to be halted, cancelled, or resumed while it is in flight.
  • Agent health monitoring through heartbeat badges marked active, stalled, or alert, alongside activity and token-consumption rankings per official.
  • The 奏折阁 archive, which files finished edicts with a five-stage timeline of 圣旨, 中书, 门下, 六部, and 回奏, with one-click copy to Markdown, plus nine preset edict templates in the 旨库 carrying parameter forms and estimated time and cost.

Who uses it and how

  • Teams already running OpenClaw that install via install.sh and inherit the full agent workspaces, role personalities, and permission registration without hand-wiring each agent.
  • Operators who want to inspect the workflow before committing, using the Docker image with preloaded simulated data to browse the dashboard at localhost:7891.
  • Organisations issuing work through Feishu (飞书), where edicts are created from chat, results return as memorials, and the 天下要闻 panel pushes a daily digest of technology and finance news back to the same channel.
  • Managers tracking spend and throughput across a fleet of roles, using the token leaderboard, activity figures, completion counts, and session statistics in the officials overview to see which departments are carrying load.
  • Teams that want multiple departments on the record for a decision, using 朝堂议政 to run an LLM-driven multi-round discussion where each ministry argues from its own remit and the conclusion with the discussion record is kept.

Getting started

The fastest path is the published Docker image, run as docker run -p 7891:7891 cft0808/sansheng-demo and then opened at http://localhost:7891. For the full system, clone cft0808/edict and run chmod +x install.sh && ./install.sh, which requires OpenClaw already installed, Python 3.10 or later, and macOS or Linux.

How it compares

The README positions Edict directly against CrewAI, MetaGPT, and AutoGen, claiming that none of them offers a real-time Kanban view, task intervention, or agent health monitoring, that CrewAI has no review mechanism while MetaGPT's is optional and AutoGen relies on human-in-the-loop, and that Edict adds hot model switching, skills management, and news aggregation that the others lack. Its stated differentiators are institutional review, full observability, and live intervention, with deployment rated easier than MetaGPT and comparable to or simpler than the other two. No list of paid products is given, so the honest framing is that Edict is one open-source option among several agent frameworks in this registry, distinguished mainly by its mandatory review stage and its dashboard rather than by any licensing or hosting advantage.

When to use it — and when not to

Adopting Edict means adopting OpenClaw as well, along with a Python 3.10+ runtime on macOS or Linux, and on x86 or amd64 hosts the demo image needs the --platform linux/amd64 flag or the bundled compose file to avoid an exec format error. The Docker demo ships with simulated data, so it demonstrates the interface rather than production behaviour, and the install path assumes you can create and maintain the per-role workspaces that the script writes. Anyone who wants a single lightweight agent, dislikes the imperial vocabulary threading through state, roles, and UI, or cannot run OpenClaw should look elsewhere; the repository also carries 18 open issues, so some rough edges are live.

project readme (upstream, from github) — read inline

⚔️ 三省六部 · Edict

我用 1300 年前的帝国制度,重新设计了 AI 多 Agent 协作架构。
结果发现,古人比现代 AI 框架更懂分权制衡。

12 个 AI Agent(11 个业务角色 + 1 个兼容角色)组成三省六部:太子分拣、中书省规划、门下省审核封驳、尚书省派发、六部+吏部并行执行。
比 CrewAI 多一层制度性审核,比 AutoGen 多一个实时看板

🎬 看 Demo · 🚀 30 秒体验 · 🏛️ 架构 · 📋 看板功能 · 📚 架构文档 · English · 日本語 · 参与贡献

OpenClaw Python Agents Dashboard License React Zero Backend Dependencies

WeChat


🎬 Demo

您的浏览器不支持视频播放,请查看下方 GIF 或 <a href="docs/Agent_video_Pippit_20260225121727.mp4">下载视频</a>。

🎥 三省六部 AI 多 Agent 协作全流程演示

📸 GIF 预览(加载更快)


飞书下旨 → 太子分拣 → 中书省规划 → 门下省审议 → 六部并行执行 → 奏折回报(30 秒)

🐳 没有 OpenClaw? 跑一行 docker run -p 7891:7891 cft0808/edict 即可体验完整看板 Demo(预置模拟数据)。


🤔 为什么是三省六部?

大多数 Multi-Agent 框架的套路是:

"来,你们几个 AI 自己聊,聊完把结果给我。"

然后你拿到一坨不知道经过了什么处理的结果,无法复现,无法审计,无法干预。

三省六部的思路完全不同 —— 我们用了一个在中国存在 1400 年的制度架构:

你 (皇上) → 太子 (分拣) → 中书省 (规划) → 门下省 (审议) → 尚书省 (派发) → 六部 (执行) → 回奏

这不是花哨的 metaphor,这是真正的分权制衡

CrewAI MetaGPT AutoGen 三省六部
审核机制 ❌ 无 ⚠️ 可选 ⚠️ Human-in-loop ✅ 门下省专职审核 · 可封驳
实时看板 ✅ 军机处 Kanban + 时间线
任务干预 ✅ 叫停 / 取消 / 恢复
流转审计 ⚠️ ⚠️ ✅ 完整奏折存档
Agent 健康监控 ✅ 心跳 + 活跃度检测
热切换模型 ✅ 看板内一键切换 LLM
技能管理 ✅ 查看 / 添加 Skills
新闻聚合推送 ✅ 天下要闻 + 飞书推送
部署难度 低 · 一键安装 / Docker

核心差异:制度性审核 + 完全可观测 + 实时可干预

🔍 为什么「门下省审核」是杀手锏?(点击展开)

CrewAI 和 AutoGen 的 Agent 协作模式是 "做完就交"——没有人检查产出质量。就像一个公司没有 QA 部门,工程师写完代码直接上线。

三省六部的 门下省 专门干这件事:

  • 📋 审查方案质量 —— 中书省的规划是否完备?子任务拆解是否合理?
  • 🚫 封驳不合格的产出 —— 不是 warning,是直接打回重做
  • 🔄 强制返工循环 —— 直到方案达标才放行

这不是可选的插件——它是架构的一部分。每一个旨意都必须经过门下省,没有例外。

这就是为什么三省六部能处理复杂任务而结果可靠:因为在送到执行层之前,有一个强制的质量关卡。1300 年前唐太宗就想明白了——不受制约的权力必然会出错


✨ 功能全景

🏛️ 十二部制 Agent 架构

  • 太子 消息分拣 —— 闲聊自动回复,旨意才建任务
  • 三省(中书·门下·尚书)负责规划、审议、派发
  • 七部(户·礼·兵·刑·工·吏 + 早朝官)负责专项执行
  • 严格的权限矩阵 —— 谁能给谁发消息,白纸黑字
  • 状态流转校验 —— kanban_update.py 强制合法转换路径,非法状态跳转被拒绝
  • 每个 Agent 独立 Workspace · 独立 Skills · 独立模型
  • 旨意数据清洗 —— 标题/备注自动剥离文件路径、元数据、无效前缀

📋 军机处看板(10 个功能面板)

📋 旨意看板 · Kanban

  • 按状态列展示全部任务
  • 省部过滤 + 全文搜索
  • 心跳徽章(🟢活跃 🟡停滞 🔴告警)
  • 任务详情 + 完整流转链
  • 叫停 / 取消 / 恢复操作

🔭 省部调度 · Monitor

  • 可视化各状态任务数量
  • 部门分布横向条形图
  • Agent 健康状态实时卡片

📜 奏折阁 · Memorials

  • 已完成旨意自动归档为奏折
  • 五阶段时间线:圣旨→中书→门下→六部→回奏
  • 一键复制为 Markdown
  • 按状态筛选

📜 旨库 · Template Library

  • 9 个预设圣旨模板
  • 分类筛选 · 参数表单 · 预估时间和费用
  • 预览旨意 → 一键下旨

👥 官员总览 · Officials

  • Token 消耗排行榜
  • 活跃度 · 完成数 · 会话统计

📰 天下要闻 · News

  • 每日自动采集科技/财经资讯
  • 分类订阅管理 + 飞书推送

⚙️ 模型配置 · Models

  • 每个 Agent 独立切换 LLM
  • 应用后自动重启 Gateway(~5秒生效)

🛠️ 技能配置 · Skills

  • 各省部已安装 Skills 一览
  • 查看详情 + 添加新技能

💬 小任务 · Sessions

  • OC-* 会话实时监控
  • 来源渠道 · 心跳 · 消息预览

🎬 上朝仪式 · Ceremony

  • 每日首次打开播放开场动画
  • 今日统计 · 3.5秒自动消失

🏛️ 朝堂议政 · Court Discussion

  • 多官员围绕议题展开部门视角讨论
  • LLM 驱动的多角色辩论(各部依职责发表专业意见)
  • 支持多轮推进 · 总结结论 · 保留讨论记录

🖼️ 截图

旨意看板

旨意看板

📸 展开查看更多截图

省部调度

省部调度

任务流转详情

任务流转详情

模型配置

模型配置

技能配置

技能配置

官员总览

官员总览

会话记录

会话记录

奏折归档

奏折归档

圣旨模板

圣旨模板

天下要闻

天下要闻

上朝仪式

上朝仪式


🚀 30 秒快速体验

Docker 一键启动

docker run -p 7891:7891 cft0808/sansheng-demo

打开 http://localhost:7891 即可体验军机处看板。

⚠️ 遇到 exec format error?(点击展开)

如果你在 x86/amd64 机器(如 Ubuntu、WSL2)上看到:

exec /usr/local/bin/python3: exec format error

这是因为镜像架构不匹配。请使用 --platform 参数:

docker run --platform linux/amd64 -p 7891:7891 cft0808/sansheng-demo

或使用 docker-compose(已内置 platform: linux/amd64):

docker compose up

完整安装

前置条件
  • OpenClaw 已安装
  • Python 3.10+
  • macOS / Linux
安装
git clone https://github.com/cft0808/edict.git
cd edict
chmod +x install.sh && ./install.sh

安装脚本自动完成:

  • ✅ 创建全量 Agent Workspace(含太子/吏部/早朝,兼容历史 main)
  • ✅ 写入各省部 SOUL.md(角色人格 + 工作流规则 + 数据清洗规范)
  • ✅ 注册 Agent 及权限矩阵到 openclaw.json
  • 符号链接统一数据(各 Workspace 的 data/scripts → 项目目录,确保数据一致)
  • 设置 Agent 间通信可见性sessions.visibility all,解决消息不可达问题)
  • 同步 API Key 到所有 Agent(自动从已配置的 Agent 复制)
  • ✅ 构建 React 前端(需 Node.js 18+,如未安装则跳过)
  • ✅ 初始化数据目录 + 首次数据同步(含官员统计)
  • ✅ 重启 Gateway 使配置生效

⚠️ 首次安装:需先配置 API Key:openclaw agents add taizi,然后重新运行 ./install.sh 同步到所有 Agent。

启动
# 方式 1:一键启动(推荐)
chmod +x start.sh && ./start.sh

# 方式 2:分别启动
bash scripts/run_loop.sh &      # 数据刷新循环
python3 dashboard/server.py     # 看板服务器

# 打开浏览器
open http://127.0.0.1:7891
🖥️ 生产环境部署(systemd)
# 安装 systemd 服务
sudo cp edict.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable edict
sudo systemctl start edict

# 或使用管理脚本
bash edict.sh start    # 启动
bash edict.sh status   # 查看状态
bash edict.sh restart  # 重启
bash edict.sh stop     # 停止

💡 看板即开即用server.py 内嵌 dashboard/dashboard.html,Docker 镜像包含预构建的 React 前端

💡 详细教程请看 Getting Started 指南


🏛️ 架构

                           ┌───────────────────────────────────┐
                           │          👑 皇上(你)              │
                           │     Feishu · Telegram · Signal     │
                           └─────────────────┬─────────────────┘
                                             │ 下旨
                           ┌─────────────────▼─────────────────┐
                           │          � 太子 (taizi)            │
                           │    分拣:闲聊直接回 / 旨意建任务      │
                           └─────────────────┬─────────────────┘
                                             │ 传旨
                           ┌─────────────────▼─────────────────┐
                           │          📜 中书省 (zhongshu)       │
                           │       接旨 → 规划 → 拆解子任务       │
                           └─────────────────┬─────────────────┘
                                             │ 提交审核
                           ┌─────────────────▼─────────────────┐
                           │          🔍 门下省 (menxia)         │
                           │       审议方案 → 准奏 / 封驳 🚫      │
                           └─────────────────┬─────────────────┘
                                             │ 准奏 ✅
                           ┌─────────────────▼─────────────────┐
                           │          📮 尚书省 (shangshu)       │
                           │     派发任务 → 协调六部 → 汇总回奏    │
                           └───┬──────┬──────┬──────┬──────┬───┘
                               │      │      │      │      │
                         ┌─────▼┐ ┌───▼───┐ ┌▼─────┐ ┌───▼─┐ ┌▼─────┐
                         │💰

readme truncated — read the full docs on github

Frequently asked questions

Is edict free to use?

edict is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does edict do?

🏛️ 三省六部制 · OpenClaw Multi-Agent Orchestration System — 9 specialized AI agents with real-time dashboard, model config, and full audit trails

What is edict written in?

edict is primarily written in Python. Its source is publicly available at https://github.com/cft0808/edict, and it has 16,900 GitHub stars.