Model or dataset
cft0808/edict avatar
cft0808/edict

Edict: Tang Dynasty Governance Applied to AI Multi-Agent Orchestration

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

16,915 stars1,766 forksPythonMIT

At a glance

What is it?
Edict maps the Tang Dynasty's Three Departments and Six Ministries structure onto AI agent coordination, adding a mandatory review stage that can veto plans before execution, a real-time Kanban dashboard, and full audit trails. It requires the OpenClaw platform and runs on macOS or Linux with Python 3.10 or later.
Who is it for?
Edict is a strong fit for teams that build multi-agent workflows and want mandatory quality review built into the architecture rather than added as an optional check. The per-agent model configuration and the task intervention controls (stop, cancel, resume) give operators practical levers that most multi-agent frameworks do not provide.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 10 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 26, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The Problem Edict Is Designed to Solve

Most multi-agent frameworks use a model the README describes as: agents discuss among themselves and hand you a result, with no visibility into what happened in between, no way to audit the steps, and no mechanism to intervene if a plan is poor.

The README states this directly: with CrewAI and AutoGen, you receive output you cannot reproduce, audit, or intervene in. There is no quality gate between planning and execution.

Edict takes a different approach. It models the Tang Dynasty's Three Departments and Six Ministries system (三省六部), a governance structure used in China for roughly 1,400 years, on the premise that the ancient system solved a real problem: how to prevent unchecked authority from producing errors.

The architectural answer is a mandatory review department. The README draws the comparison table explicitly:

| | CrewAI | MetaGPT | AutoGen | Edict | |---|:---:|:---:|:---:|:---:| | Review mechanism | none | optional | human-in-loop | dedicated review, can veto | | Real-time dashboard | no | no | no | yes | | Task intervention | no | no | no | stop / cancel / resume | | Audit trail | partial | partial | no | full archive | | Hot-swap LLM | no | no | no | yes |

This comparison is from the project README and reflects the author's assessment of the competing frameworks.

The Three Departments and Six Ministries Architecture

Edict deploys 12 agents organized by function, based on the Tang Dynasty administrative structure.

The routing layer has a single agent: 太子 (taizi, the Crown Prince), which receives incoming messages and decides whether they are casual conversation (which it handles directly) or tasks that need to enter the workflow.

The planning and oversight layer has three agents. 中书省 (zhongshu) receives the task, plans the approach, and breaks it into subtasks. 门下省 (menxia) reviews the plan and can veto it, returning it to zhongshu for revision. 尚书省 (shangshu) dispatches the approved plan to the execution layer.

The execution layer has seven agents covering finance and data (户部, hubu), documentation (礼部, libu), code and algorithms (兵部, bingbu), security and compliance (刑部, xingbu), engineering (工部, gongbu), officials management (吏部), and a morning briefing role.

The 门下省 veto mechanism is the architectural centerpiece. The README states it is not an optional plugin: every task must pass through it before reaching the execution layer, with no exceptions. If the plan is incomplete or the subtask decomposition is poor, menxia blocks it and forces a revision cycle.

The README notes that state transitions are enforced by kanban_update.py, which rejects illegal state jumps. A task cannot skip from planning to completed; it must follow the defined flow.

Running Edict: Docker Demo and Full Installation

The fastest way to see the Edict dashboard without a full installation is the Docker demo image:

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

This serves the dashboard on port 7891 with pre-built demonstration data. Open http://localhost:7891 to see the Kanban interface. If you are running on an x86/amd64 machine (Ubuntu, WSL2) and see an `exec format error`, the image requires a platform flag:

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

Or using Docker Compose (which already sets the platform in the compose file):

bash
docker compose up

For a full installation that runs real agents, the prerequisites are the OpenClaw platform (from openclaw.ai), Python 3.10 or later, and macOS or Linux:

bash
git clone https://github.com/cft0808/edict.git
cd edict
chmod +x install.sh && ./install.sh

The install script creates all agent workspaces, writes SOUL.md files (role and workflow rules) for each agent, registers agents and their permission matrix in openclaw.json, sets up symlinks so all workspaces share a common data directory, configures agent-to-agent message visibility, and builds the React frontend (requires Node.js 18+; the build is skipped if Node is absent).

After installation, if this is your first run, configure an API key with `openclaw agents add taizi` and then re-run `./install.sh` to propagate it to all agents.

To start the system:

bash
chmod +x start.sh && ./start.sh

Alternatively, start the data refresh loop and the dashboard server separately:

bash
bash scripts/run_loop.sh &
python3 dashboard/server.py

The dashboard server is available at http://127.0.0.1:7891. For production deployments, a systemd service file is provided:

bash
sudo cp edict.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable edict
sudo systemctl start edict

And a management script:

bash
bash edict.sh start
bash edict.sh status
bash edict.sh stop

The Military Chancery Dashboard: Ten Control Panels

The Kanban dashboard (called 军机处 in the README) is a core part of Edict's value proposition, not a monitoring add-on. The README lists ten panels:

The task board (旨意看板) shows all tasks by status column, with province and department filtering, full-text search, agent heartbeat badges (green for active, yellow for stalled, red for alarm), task detail with the full routing chain, and stop/cancel/resume controls.

The dispatch monitor (省部调度) visualizes task counts by status and shows agent health as real-time cards.

The archive panel (奏折阁) stores completed tasks as auditable records with a five-stage timeline: decree, planning, review, execution, report back. Each archived task can be copied as Markdown.

The template library (旨库) provides nine preset task templates with parameter forms, time estimates, and cost estimates. You can preview a task and submit it directly from the template.

The officials overview (官员总览) shows token consumption by agent, activity rates, task completion counts, and session statistics.

The models panel (模型配置) allows each agent's LLM to be changed independently. After applying a new model, the gateway restarts automatically, with the README stating the change takes effect in about five seconds.

The skills panel (技能配置) shows installed skills for each department and allows adding new ones.

Two additional panels cover news aggregation with Feishu push notifications, and a multi-agent discussion mode where multiple officials debate a topic from their departmental perspective.

Where Edict Falls Short

The dependency on OpenClaw is the primary constraint. Edict is not a standalone multi-agent framework. The install script registers agents in openclaw.json and the system is built around OpenClaw's agent workspace and gateway model. Teams that do not want to adopt OpenClaw cannot use Edict, regardless of how useful the three-departments-six-ministries architecture might be for their workflow.

The supported platforms are macOS and Linux only. The README does not list Windows as a supported installation target (there is a WINDOWS_INSTALL_CN.md file in the repository, which suggests Windows support exists in some form, but it is not part of the standard install instructions).

The repository has no GitHub releases. There is no semantic versioning for the agent configuration files or the dashboard API. If the upstream edict project changes the structure of openclaw.json or the SOUL.md format, existing installations may break without a clear upgrade path.

The requirements.txt lists only numpy (for the LinUCB router used in 吏部's agent recommendation model) and playwright (for screenshots) as optional dependencies. The core dashboard and data sync scripts rely entirely on Python's standard library, which keeps the footprint small but also means the system has no dependency-level indicator of which Python features or packages it requires beyond what's in requirements.txt.

The OpenClaw Dependency and Agent Communication Model

Understanding OpenClaw is necessary to understand what Edict actually is. OpenClaw (openclaw.ai) provides the agent runtime: workspaces, the gateway that routes messages between agents, and the skill system that agents use to extend their capabilities.

The install script creates workspaces for each of the twelve agents under the OpenClaw directory structure. Each workspace contains a SOUL.md file that defines the agent's role, workflow rules, and data-cleaning rules. The permission matrix registered in openclaw.json defines which agents can send messages to which other agents, which enforces the architectural hierarchy at the runtime level.

The `sessions.visibility all` setting in the install script allows agents to see each other's sessions, which the README notes is necessary to prevent message delivery failures.

The API key synchronization step (copying the key from a configured agent to all others via the install script) suggests that all agents in a default Edict setup share the same LLM API key unless you configure them individually through the model configuration panel.

For teams evaluating Edict, the Docker demo image is the lowest-friction path to seeing the dashboard and the audit trail behavior. The full installation requires OpenClaw to be already working in your environment before the install script will produce useful results.

Editorial conclusion

Edict is a strong fit for teams that build multi-agent workflows and want mandatory quality review built into the architecture rather than added as an optional check. The per-agent model configuration and the task intervention controls (stop, cancel, resume) give operators practical levers that most multi-agent frameworks do not provide. The requirement for the OpenClaw platform is the main adoption blocker: Edict does not run as a standalone system, and teams that cannot or will not adopt OpenClaw have no path forward. Confirm OpenClaw compatibility with your operating system and infrastructure before evaluating Edict's agent architecture.

Frequently asked questions

What is the Edict multi-agent system?

Edict is a multi-agent orchestration system that models the Tang Dynasty's Three Departments and Six Ministries governance structure as AI agent roles. It deploys 12 agents covering task routing, planning, mandatory review, dispatch, and specialized execution, all observable through a real-time dashboard and fully auditable as archived records.

Does Edict require OpenClaw to run?

Yes. Edict is built on top of the OpenClaw platform (openclaw.ai), which provides the agent workspace, gateway, and skill infrastructure. The install script registers all agents in OpenClaw's openclaw.json configuration file, and the system cannot run without a working OpenClaw installation.

How do I access the Edict dashboard after installation?

After running start.sh, the dashboard is served at http://127.0.0.1:7891. For a preview without a full installation, run `docker run -p 7891:7891 cft0808/sansheng-demo` and open http://localhost:7891; this serves the dashboard with pre-built demonstration data.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/cft0808-edict.svg)](https://hysenlabs.com/projects/cft0808-edict)