Pricing
$0
Freemium
Overview
Edict is an OpenClaw multi-agent orchestration system inspired by China's historical Three Departments and Six Ministries governance structure. It applies a system of separation of powers developed more than 1,300 years ago to modern AI agent collaboration, creating an architecture where specialized agents plan, review, dispatch, and execute tasks instead of allowing agents to operate without structured oversight.
The system uses 12 AI agents consisting of 11 business roles and one compatibility role. The Crown Prince triages incoming requests, the Planning Department creates and decomposes plans, the Review Department audits plans and can veto inadequate proposals, the Dispatch Department assigns approved work, and the specialized ministries execute tasks in parallel. This introduces a mandatory institutional review layer before execution, providing stronger checks and balances for complex multi-agent workflows.
Edict also provides a real-time dashboard for monitoring agent collaboration, configuring models, tracking tasks, and maintaining complete audit trails. The project includes a full demonstration of the Three Departments and Six Ministries multi-agent workflow, showing how requests move from triage and planning through review, dispatch, parallel execution, and final reporting.
README
βοΈ Edict Β· Multi-Agent Orchestration
I modeled an AI multi-agent system after China's 1,300-year-old imperial governance.
Turns out, ancient bureaucracy understood separation of powers better than modern AI frameworks.
12 AI agents (11 business roles + 1 compatibility role) form the Three Departments & Six Ministries: Crown Prince triages, Planning proposes, Review vetoes, Dispatch assigns, Ministries execute.
Built-in institutional review gates that CrewAI doesn't have. A real-time dashboard that AutoGen doesn't have.
π¬ Demo Β· π Quick Start Β· ποΈ Architecture Β· π Features Β· Chinese Β· Japanese Β· Contributing
π¬ Demo
π³ No OpenClaw? Run
docker run -p 7891:7891 cft0808/edictto try the full dashboard with simulated data.
π‘ The Idea
Most multi-agent frameworks let AI agents talk freely, producing opaque results you can't audit or intervene in. Edict takes a radically different approach β borrowing the governance system that ran China for more than a thousand years:
You (Emperor) β Crown Prince (Triage) β Planning Dept β Review Dept β Dispatch Dept β 6 Ministries β Report Back
This isn't just a metaphor. It's real separation of powers for AI:
- Crown Prince triages messages β casual chat gets auto-replied, while real commands become tasks
- Planning Department breaks commands into actionable sub-tasks
- Review Department audits plans and can reject them, forcing re-planning
- Dispatch Department assigns approved tasks to specialist ministries
- Seven Ministries execute tasks in parallel, each with distinct expertise
- Data sanitization automatically strips file paths, metadata, and unwanted content from task titles
- Everything flows through a real-time dashboard where users can monitor and intervene
π€ Why Edict?
Instead of one AI doing everything wrong, specialized agents check each other's work.
Edict's core differentiator is its combination of institutional review, full observability, and real-time intervention.
Unlike systems where agents simply produce and pass along results, Edict includes a dedicated Review Department that acts as a mandatory quality gate. It audits the Planning Department's decomposition, can veto inadequate plans, and forces rework before execution begins.
Why the Review Department Matters
The Review Department is designed to:
- Audit plan quality β determine whether task decomposition is complete and appropriate
- Veto substandard output β reject plans rather than merely issuing warnings
- Enforce rework β rejected plans must be revised before execution
Review is part of the architecture rather than an optional plugin. Commands must pass through this quality gate before reaching execution.
β¨ Features
ποΈ Twelve-Department Agent Architecture
- Crown Prince β message triage and intent extraction
- Three Departments β Planning, Review, and Dispatch
- Seven Ministries β Finance, Documentation, Engineering, Compliance, Infrastructure, HR, and Briefing
- Strict permission matrix controlling communication between agents
- Separate workspace, skills, and LLM model for each agent
- Automatic data sanitization for task titles and metadata
π Command Center Dashboard
The real-time dashboard includes ten major panels:
- Edicts Kanban β task cards organized by state, with filtering, search, heartbeat badges, and stop/cancel/resume controls
- Department Monitor β pipeline visualization, distribution charts, and health information
- Memorial Archive β automatically generated task archives with five-phase timelines
- Edict Templates β reusable presets with parameter forms, cost estimates, and one-click dispatch
- Officials Overview β token usage rankings and agent activity statistics
- Daily Briefing β curated news, subscription management, and webhook delivery
- Model Config β per-agent LLM switching and automatic Gateway restart
- Skills Config β inspect installed skills and add new capabilities
- Sessions β real-time session monitoring with channel labels
- Court Ceremony β daily opening animation and system statistics
π Quick Start
Docker
docker run -p 7891:7891 cft0808/edict
Open http://localhost:7891.
Full Installation
Prerequisites: OpenClaw Β· Python 3.9+ Β· macOS/Linux
git clone https://github.com/cft0808/edict.git
cd edict
chmod +x install.sh && ./install.sh
The installer automatically:
- Creates workspaces for all departments
- Writes SOUL.md personality files for each department
- Registers agents and the permission matrix in
openclaw.json - Initializes the data directory and performs the first synchronization
- Restarts the Gateway
Launch
# Option 1: One-click launch
chmod +x start.sh && ./start.sh
# Option 2: Manual launch
bash scripts/run_loop.sh &
python3 dashboard/server.py
Open http://127.0.0.1:7891 in your browser.
ποΈ Architecture
Emperor (User)
β
Crown Prince β Triage
β
Planning Department β Receive β Plan β Decompose
β
Review Department β Audit β Approve / Reject
β
Dispatch Department β Assign β Coordinate β Collect
β
Finance Β· Documentation Β· Engineering Β· Compliance Β· Infrastructure Β· HR
Agent Roles
| Department | Agent ID | Role | Expertise |
|---|---|---|---|
| Crown Prince | taizi | Triage and summarize | Chat detection, intent extraction |
| Planning | zhongshu | Receive, plan, decompose | Requirements, architecture |
| Review | menxia | Audit, gatekeep, veto | Quality, risk, standards |
| Dispatch | shangshu | Assign, coordinate, collect | Scheduling, tracking |
| Finance | hubu | Data, resources, accounting | Data processing, reports |
| Documentation | libu | Documentation, standards, reports | Technical writing, API docs |
| Engineering | bingbu | Code, algorithms, checks | Development, code review |
| Compliance | xingbu | Security, compliance, audit | Security scanning |
| Infrastructure | gongbu | CI/CD, deployment, tooling | Docker, pipelines |
| HR | libu_hr | Agent management and training | Registration, permissions |
| Briefing | zaochao | Daily briefing and news | Scheduled reports, summaries |
State Machine
Emperor β Prince Triage β Planning β Review β Assigned β Executing β Done
β β
βββ Veto βββ
π§ Technical Highlights
- React 18 frontend β TypeScript, Vite, Zustand
- Standard-library backend β
server.pybased on Python'shttp.server - Redis Streams EventBus β decoupled communication between services
- Transactional Outbox Relay β reliable at-least-once event delivery
- State Machine Audit β strict lifecycle transitions and audit logging
- Parallel Dispatch β parallel execution with exponential backoff and resource locking
- DAG Orchestrator β task decomposition and dependency resolution
- Visible Agent Activity β real-time display of agent activity, tool calls, and results
- One-click Installation and Launch β automated setup through
install.shandstart.sh - systemd Production Deployment β daemon management and automatic restart
- 15-second Auto-sync β automatic live data refresh
- Dashboard Authentication β built-in login authentication
πΊοΈ Roadmap
Phase 1 β Core Architecture β
Completed capabilities include the twelve-department architecture, Crown Prince triage, real-time dashboard, task controls, memorial archive, template library, daily news, hot-swappable LLM models, skill management, session monitoring, data sanitization, duplicate task protection, and end-to-end Kanban tests.
Phase 2 β Institutional Depth π§
Implemented capabilities include agent scoring and model recommendation, Redis Streams EventBus, transactional event delivery, state-machine auditing, parallel dispatch, DAG orchestration, dashboard authentication, and production deployment.
Planned capabilities include human-in-the-loop imperial approval, inter-agent message visualization, and an Imperial Archives knowledge base with citations.
Phase 3 β Ecosystem
Planned additions include Docker Compose, Notion and Linear adapters, yearly agent performance reports, mobile/PWA support, and marketplace distribution.
π€ Contributing
Contributions are welcome in areas including:
- UI themes, responsiveness, and animations
- New specialized agents
- Ministry-specific skills
- Integrations with Notion, Jira, Linear, and GitHub Issues
- Internationalization
- Mobile and PWA support
See CONTRIBUTING.md for contribution guidelines.
π License
Built by the OpenClaw community.
β Star History
βοΈ Governing AI with the wisdom of ancient empires
Releases
Release information has not been added yet.
Complete your AI stack
Add a general assistant, research, coding, monitoring, and team productivity to your automations.
Best alternatives
Compare similar tools in the same category.
