Can Tang Dynasty Bureaucracy Manage AI Agents? Inside the edict Open‑Source Multi‑Agent Framework
The edict project adapts the Tang dynasty’s three‑province, six‑department bureaucracy to a multi‑agent AI framework, introducing a hierarchical “Prince”, “Three Ministries”, and “Six Departments” structure with a veto‑power “Chancellor” layer, real‑time dashboards, task intervention, health monitoring, and zero‑dependency deployment.
1. The "free‑wheeling" problem of AI agents
Recent multi‑agent frameworks such as CrewAI, AutoGen and MetaGPT aim to let multiple AI agents cooperate freely, but they suffer from a fundamental risk: lack of checks and balances. A poorly planned plan can be executed without any review, causing errors to cascade unchecked.
edict’s author cft0808 proposes borrowing the Tang dynasty’s three‑province, six‑department system—an historical solution for constraining power—to impose institutional control on multi‑agent workflows.
2. Mapping the Tang bureaucracy to 12 dedicated agents
edict maps the entire system to twelve specialized agents:
Prince : receives user requests, classifies messages and triages tasks.
Three Ministries (core flow layer) :
Six Departments (execution layer) :
Morning Briefing Officer : aggregates daily AI news into a briefing.
The workflow forms a pipeline with a mandatory review node:
User command → Prince (triage) → Secretariat (planning) → Chancellor (review/veto) → Ministerial Office (dispatch) → Six Departments (parallel execution)
3. The impact of the Chancellor’s veto
Unlike CrewAI or AutoGen, where a plan proceeds directly to execution, edict forces every plan through the Chancellor’s review. The Chancellor can approve and forward the plan, reject it and send it back for re‑planning, or attach revision comments. This design catches errors before execution, which is especially valuable for high‑reliability tasks such as compliance checks, code audits or document generation.
4. Real‑time dashboards and intervention
edict includes a full‑featured real‑time dashboard with ten panels, providing both observability and the ability to intervene:
Task Intervention : pause, cancel or resume a running task without waiting for the pipeline to finish.
Hot‑plug LLMs : each agent can be configured with a different LLM (e.g., GPT‑4 for planning, cheaper models for execution), allowing cost‑effective model selection.
Heartbeat Monitoring : continuous health checks detect lost or stalled agents and raise alerts.
Audit Log : every routing decision, review comment and execution result is recorded for full traceability.
Several screenshots illustrate the main board, task details, agent health status and skill management.
5. Historical‑themed extras
Beyond core functionality, edict embraces the “ancient bureaucracy” theme:
Memorial Archives : all submitted tasks are archived as “memorials” that can be searched and replayed.
Morning Briefing : an automated daily AI news digest mimics the ancient court briefing.
Opening Ceremony Animation : a visual ceremony runs at system startup, adding a sense of ritual.
6. Zero extra dependencies and Docker experience
The backend relies solely on the Python 3.9+ standard library, eliminating dependency conflicts. Deployment options include local install, Docker or docker‑compose. Example commands:
git clone https://github.com/cft0808/edict.git cd edict && chmod +x install.sh && ./install.sh docker run -p 7891:7891 cft0808/sansheng-demoTech stack summary:
Backend: Python 3.9+ (standard library only)
Frontend: React 18 (optional, with a pure‑HTML fallback)
Runtime: OpenClaw for multi‑agent orchestration
Deployment: Docker / docker‑compose / local
7. Comparison with CrewAI / AutoGen / MetaGPT
edict does not aim to replace existing frameworks; it addresses reliability gaps. The comparison table highlights that edict provides a mandatory review layer, ten real‑time panels, full task intervention, independent LLM configuration per agent, heartbeat health checks, and zero extra Python dependencies—features missing or limited in the other frameworks.
8. Key takeaways
Without checks, AI planning errors become execution errors.
The Chancellor’s veto is the core design that enforces accountability.
A 1300‑year‑old institutional design remains applicable to modern multi‑agent systems.
Observability and intervention are essential thresholds for production‑grade multi‑agent deployments.
Conclusion
edict stands out for its creative blend of historical bureaucracy and concrete engineering value: mandatory review, task intervention, and observability solve real challenges when deploying multi‑agent systems at scale. With 4.6k Stars, zero extra dependencies and a one‑click Docker start, it is worth a hands‑on trial for anyone exploring AI agent orchestration.
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.
