danghuangshang: A Ming Dynasty Bureaucracy as a Multi-Agent Orchestration Layer on OpenClaw
Open-source multi-agent collaboration system inspired by Chinese governance — deploy and coordinate specialized AI agents with OpenClaw.
At a glance
- What is it?
- danghuangshang maps the Ming dynasty's Grand Secretariat and Six Ministries onto Discord bots built with OpenClaw, offering a theatrical but structured way to coordinate specialized AI agents. The project is more about prompt engineering and role separation than novel infrastructure, and its value depends on how much you want your AI tooling to look like an imperial court.
- Who is it for?
- Adopt danghuangshang if you are already an OpenClaw user who wants a structured, role-based prompt system for Discord or Feishu, and if you enjoy the imperial metaphor enough to accept its overhead. Do not adopt it if you need a lightweight, general-purpose multi-agent framework, if you cannot tolerate the risk of bot loops on Discord, or if your team expects English-first documentation and a conventional project name.
- 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 116 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What danghuangshang Actually Sells
danghuangshang is not a new agent framework. It is a configuration layer, a set of persona prompts, and a workflow template that sits on top of OpenClaw, an existing multi-agent runtime. The README describes it as a system where you are the emperor and AI agents are your ministers, communicating through Discord or Feishu. The specific problem it solves is coordination: how to get multiple specialized agents, each with a distinct role, to handle a task without letting them step on each other. The intended user is someone who already runs OpenClaw or is willing to install it, and who wants a ready-made division of labor rather than designing their own agent roles from scratch. The project offers three governance models: the default Ming dynasty cabinet system with 18 agents, a Tang dynasty three-department system with 14 agents, and a modern corporate system with 14 agents. Each model changes the flow of instructions and the names of the roles, but the underlying mechanism is the same: a set of prompt-engineered agents that respond to mentions on a chat platform.
The Architecture: From Imperial Decree to Git Push
The core flow in the default Ming system is a chain of custody for a task. You, the emperor, issue a command. The Directorate of Ceremonies, called Sili Jian, receives it and passes it to the Grand Secretariat, or Neige. The Grand Secretariat enhances the prompt: it interprets intent, asks clarifying questions, and generates an execution plan. Then the task is dispatched to the relevant ministry, such as the Ministry of War for coding or the Ministry of Revenue for cost analysis. The Censorate, or Ducha Yuan, automatically reviews code when you push to GitHub, either approving it or sending it back for changes. There is also a direct mode where you can mention a specific ministry bot without going through the Directorate, which the README recommends for simple tasks. The architecture diagram in the repository shows this as a flow from user to Sili Jian to Neige to the Six Ministries and then to the Censorate. That is the entire mechanism. There is no custom message bus, no novel scheduling algorithm. The innovation, if you can call it that, is the mapping of bureaucratic roles onto prompt instructions and the use of Discord's mention system as the routing primitive.
Installation and Configuration: Three Paths, One Caveat
The README offers four installation methods. The recommended local install is a git clone followed by running bash scripts/full-install.sh. A remote one-liner uses curl to fetch and execute the same script. A third method, install-lite.sh, is for users who already have OpenClaw and only need the configuration templates. A fourth method, install-hermes.sh, installs the same setup on Nous Research's Hermes Agent runtime instead of OpenClaw, which the README says can coexist with OpenClaw. After installation, the script prompts you for an LLM API key and a Discord bot token. You can switch between the three governance models with scripts/switch-regime.sh, passing arguments like tang-sansheng or modern-ceo. The README warns that the old install.sh does not support remote execution because it fails with a /dev/fd path error, so you must use full-install.sh. There is also a safe-update script that backs up your configuration before pulling changes. The configuration file lives at ~/.openclaw/openclaw.json, and the README explicitly warns that workspace files like MEMORY.md must be backed up manually. That is a concrete operational detail: the update process is not fully automatic, and you can lose state if you do not copy those files yourself.
The Discord Safety Problem: Bot Loops Are Real
The most serious technical warning in the README concerns Discord bot configuration. If you set allowBots to true, bots can trigger each other and create a message storm. The README calls this out in bold and links to a dedicated safety guide and a GitHub issue. The default install script now sets allowBots to "mentions", meaning a bot only responds when another bot explicitly mentions it. That is a sensible default, but it reveals a fundamental risk of the multi-bot approach: with 18 agents each running as a separate Discord bot, the system depends on mention-based routing to avoid infinite loops. If you use an older configuration or accidentally set allowBots to true, the system can become a self-sustaining conversation between bots, burning API tokens and spamming the channel. This is not a hypothetical failure mode. The project maintainers had to add a security update in March 2026 that introduced webhook signature verification to prevent forged requests. For a project that is essentially a prompt template, the amount of safety documentation is disproportionate, which suggests that the multi-bot architecture is more fragile than a single-bot design would be.
What You Get Beyond the Metaphor
Strip away the imperial titles and the system is a collection of agent personas, each with a specific function: the Ministry of War handles software engineering, the Ministry of Revenue handles cost analysis, the Ministry of Rites handles marketing copy, the Ministry of Works handles DevOps, the Ministry of Personnel handles project management, and the Ministry of Justice presumably handles compliance or legal review, though the README is truncated before that section. The repository claims 60+ skills and 18+ agents, but those numbers come from the README's badges and are not independently verifiable from the supplied material. The value proposition is that you do not have to write these personas yourself. The project has already decided what a 'software engineering agent' should say when it receives a task, and it has encoded that into the OpenClaw configuration. It also includes a Hanlin Academy module for collaborative novel writing with five agents, which is optional. For a solo developer or a small team that wants to experiment with multi-agent workflows without designing role prompts from scratch, this saves time. But the metaphor adds cognitive overhead: you must learn what each ministry does before you can use the system effectively, and the README's heavy use of Chinese governance terminology may be a barrier for non-Chinese readers, even though an English version of the README exists.
Alternatives: CrewAI and the Generic Orchestrator
The README itself includes a comparison section against ChatGPT, AutoGPT, and CrewAI, though the details are not in the supplied material. CrewAI is a relevant alternative because it is a Python-based multi-agent framework that lets you define agents and tasks in code, with a focus on role-based collaboration. The difference in approach is significant: CrewAI gives you a programming API where you define agent roles, tools, and workflows in Python, and it runs on any platform with a Python runtime. danghuangshang, by contrast, is a configuration layer for OpenClaw, which itself is a separate runtime. You are not writing code to define your agents; you are editing JSON configuration files and prompt templates. CrewAI also does not tie you to Discord or Feishu as the interaction surface, whereas danghuangshang's entire interaction model is chat-based. If you want to embed multi-agent logic into an application, CrewAI is the more conventional choice. If you want a chat-based system where you talk to your agents as if they were colleagues in a chat room, danghuangshang is closer to that model. The trade-off is between a general-purpose framework and a specific, opinionated template.
Maintenance, Licensing, and the Originality Dispute
The project is MIT licensed, which allows commercial use, modification, and redistribution with attribution. The README includes a prominent originality notice claiming that the project is the first to combine the Three Departments and Six Ministries architecture with OpenClaw, and it names a specific project, Edict, as a known infringer that allegedly copied the structure without attribution. That dispute is a maintenance risk: if you adopt danghuangshang, you may inherit a project whose maintainer is actively engaged in public conflict over intellectual property. That does not affect the MIT license, but it does mean the project's community dynamics are not purely technical. The last push was in May 2026, and the most recent release, v3.0, was in March 2026, so the project is actively maintained. The update mechanism requires manual backup of workspace files, and the safe-update script is the recommended path. The documentation is extensive, including a FAQ, troubleshooting guide, and security guides, which suggests the maintainer is responsive to user issues. However, the project depends on OpenClaw, and if OpenClaw changes its configuration format or runtime behavior, danghuangshang's templates may break. The existence of a Hermes Agent installation path suggests the maintainer is aware of that dependency risk and is hedging by supporting an alternative runtime.
Editorial conclusion
Adopt danghuangshang if you are already an OpenClaw user who wants a structured, role-based prompt system for Discord or Feishu, and if you enjoy the imperial metaphor enough to accept its overhead. Do not adopt it if you need a lightweight, general-purpose multi-agent framework, if you cannot tolerate the risk of bot loops on Discord, or if your team expects English-first documentation and a conventional project name. Before adopting, verify the current state of the OpenClaw integration, confirm that the install scripts still work with the latest OpenClaw release, and read the Discord safety guide to ensure allowBots is set to "mentions" in your config. The project is a template for prompt orchestration, not a runtime, so your real cost is maintaining the personas and rules as your LLM APIs and Discord policies change.
Community notes