Edict

Created on March 25, 2026
Updated on March 25, 2026

Multi-agent orchestration system based on Tang Dynasty's Three Departments and Six Ministries system. 9 specialized AI agents working together in an ancient Chinese governmental structure for modern task execution.

Tang Dynasty Multi-Agent Orchestration - 9 Specialized AI Agents

Edict is a unique multi-agent orchestration system inspired by the Tang Dynasty's Three Departments and Six Ministries governmental structure. Featuring 9 specialized AI agents organized in an ancient Chinese bureaucratic hierarchy, Edict brings historical wisdom to modern AI task execution with clear role separation and quality control. GitHub: https://github.com/cft0808/edict Developer: cft0808 (Community Open Source) License: MIT Key Innovation: Edict creatively maps the sophisticated Tang Dynasty governmental structure to modern AI agent orchestration, providing clear role specialization and built-in quality control through a hierarchical decision-making process.

Core Philosophy: "Ancient wisdom meets modern AI - structured collaboration for quality outcomes"


Why Edict?

Historical Structure: Tang Dynasty's proven organizational design.

9 Specialized Agents: Clear role separation for complex tasks.

Quality Control: Built-in review and approval workflow.

Visual Dashboard: Real-time monitoring of agent activities.


The Three Departments and Six Ministries

Three Departments (三省)

  1. Zhongshu Sheng (中书省) - Policy Planning

    • Task analysis and planning
    • Strategy formulation
  2. Menxia Sheng (门下省) - Review and Approval

    • Quality review
    • Output validation
  3. Shangshu Sheng (尚书省) - Execution

    • Task execution coordination
    • Results aggregation

Six Ministries (六部)

  1. Ministry of Personnel (吏部) - Resource Management
  2. Ministry of Revenue (户部) - Data Processing
  3. Ministry of Rites (礼部) - Format and Style
  4. Ministry of War (兵部) - Problem Resolution
  5. Ministry of Justice (刑部) - Compliance Check
  6. Ministry of Works (工部) - Final Production

Key Features

$#1.
Agent Specialization

  • Each agent has a specific role
  • Specialized prompts and capabilities
  • Clear responsibility boundaries
  • Expert-level task handling

$#2.
Hierarchical Workflow

  • Top-down task decomposition
  • Bottom-up result aggregation
  • Review gates at each level
  • Escalation mechanisms

$#3.
Real-Time Dashboard

  • Agent status monitoring
  • Task progress visualization
  • Communication logs
  • Performance metrics

$#4.
Quality Control

  • Multi-stage review process
  • Automatic validation
  • Error detection and correction
  • Output consistency

$#5.
Task Routing

  • Intelligent task assignment
  • Load balancing
  • Priority handling
  • Retry mechanisms

Installation

Docker

# Pull image
docker pull cft0808/edict:latest

# Run container
docker run -d \
  --name edict \
  -p 8080:8080 \
  -v ~/edict/data:/app/data \
  cft0808/edict:latest

Manual Installation

# Clone repository
git clone https://github.com/cft0808/edict.git
cd edict

# Create virtual environment
python -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Configure
cp config.example.yaml config.yaml

# Run
python main.py

Configuration

config.yaml

agents:
  count: 9
  model: "gpt-4o"
  timeout: 120

departments:
  zhongshu:
    enabled: true
    model: "gpt-4o"
  menxia:
    enabled: true
    model: "gpt-4o"
  shangshu:
    enabled: true
    model: "gpt-4o"

ministries:
  personnel: { enabled: true }
  revenue: { enabled: true }
  rites: { enabled: true }
  war: { enabled: true }
  justice: { enabled: true }
  works: { enabled: true }

api:
  port: 8080
  host: "0.0.0.0"

dashboard:
  enabled: true
  refresh_rate: 5

Usage

Submit a Task

curl -X POST http://localhost:8080/api/task \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Market Research Report",
    "description": "Research and analyze the AI agent market",
    "priority": "high"
  }'

Dashboard Access

Open: http://localhost:8080/dashboard
View real-time agent activities
Monitor task progress
Review outputs

Agent Commands

/status - Show all agent statuses
/queue - Show pending tasks
/logs - View execution logs
/metrics - Show performance metrics

Pricing

Free: Edict is completely free and open source under MIT license. You only pay for the AI models you use through their respective providers.


System Requirements

ComponentMinimumRecommended
OSLinux, macOS, WindowsLinux (Ubuntu 20.04+)
RuntimePython 3.9+Python 3.11+
Memory1GB RAM4GB+ RAM
Storage500MB2GB
NetworkRequiredStable internet

Use Cases

Complex Document Processing

Process documents through multiple stages of analysis, writing, and review.

Multi-Stage Workflows

Execute workflows that require sequential processing with quality gates.

Quality-Controlled Outputs

Ensure high-quality outputs through multi-stage review.

Research and Analysis

Conduct thorough research with specialized agents for different aspects.

Content Creation Pipelines

Build content creation pipelines with dedicated roles.

Educational Demonstrations

Teach multi-agent concepts using the historical metaphor.


Community and Support



Quick Start Guide

Get Edict up and running quickly.

Step 1: Install

cd edict
npm install
npx edict setup

Step 2: Configure

Set your AI model and API key in the configuration.

Step 3: Connect and Go

Link your messaging platform and start using your AI agent.

Full documentation: https://github.com/cft0808/edict#readme


FAQ

Is Edict free to use?

Yes, Edict is free and open source (MIT license). You only pay for AI model API costs if using external models.

What are the system requirements for Edict?

Edict requires 1GB RAM of RAM minimum. Runtime: Python. It runs on Windows, macOS, and Linux.

Can I self-host Edict?

Yes. Edict is open source (MIT) and can be self-hosted on your own hardware. Clone the repository from GitHub and follow the installation guide.

How does Edict compare to OpenClaw?

Edict offers a different approach compared to OpenClaw. While OpenClaw provides the largest ecosystem with 13,729+ skills and maximum flexibility, Edict focuses on multi-agent. Choose Edict if you prioritize its specific features; choose OpenClaw for the broadest compatibility and community support.

Is Edict suitable for beginners?

Edict requires some technical knowledge to set up (Python). If you are a beginner, consider starting with QClaw (one-click install) or MaxClaw (cloud-based, no setup) first, then graduate to Edict as you gain experience.

License

MIT License - Free for personal and commercial use.


Tags

multi-agent, orchestration, chinese-history, specialized-agents, government-structure, quality-control, tang-dynasty