What is AI Court (Danghuangshang)?
AI Court (Danghuangshang) is a ready-made team of OpenClaw agents organised like an imperial Chinese court — you issue the decree in Discord or Feishu, the ministries do the work. It sits in the Multi-Agent Systems category of the Agents & Automation tools and is open-source, written in TypeScript and licensed MIT.
Overview
AI Court — 当皇上, "be the emperor", in the original Chinese — is a pre-configured multi-agent system built on the OpenClaw agent framework. Rather than a library you program against, it is a set of install scripts, agent personas and OpenClaw configuration that turn one server into a standing team of AI agents. You play the emperor; the agents are your ministers. Mention one in Discord or Feishu (Lark) and it gets to work, and the project also documents Slack, Telegram and a browser-only WebUI path that needs nothing but an API key.

The team is shaped by a choice of three "regimes" picked at install time. The default Ming cabinet system (18 agents) routes a request through a Chief Steward (司礼监) that receives the order, a Cabinet (内阁) that rewrites the prompt and drafts a plan, and six ministries that execute it — War for software engineering, Revenue for cost and budget analysis, Rites for marketing copy, Works for DevOps, Personnel for project management and Justice for legal and compliance — while a Censorate (都察院) automatically reviews code pushed to GitHub. The Tang three-departments system (14 agents) adds a drafting → review → execution chain in which a proposal can be sent back, and a modern-corporate system (14 agents) swaps the court for a CEO, a Board and CTO/CFO/CMO-style roles working in English. In multi-bot Discord mode every department is its own bot, so you can also skip the dispatcher and give an order straight to one ministry.
Each agent has its own workspace and memory directory and can run on its own model — the FAQ suggests strong models for heavy work and fast ones for light tasks, and lists Anthropic, OpenAI, Gemini, DeepSeek and OpenAI-compatible endpoints such as Ollama. Through OpenClaw the agents get more than 60 skills (GitHub, Notion, browser automation, web search, cron, TTS, tmux and shell), optional Docker sandboxing for code execution, and scheduled jobs such as daily reports. An optional Hanlin Academy module adds five agents that collaborate on writing a novel, and a separate installer runs the same court on Nous Research's Hermes Agent runtime instead of OpenClaw. The project is MIT-licensed; a sibling repository, Become CEO, packages the same architecture with corporate roles.
What it does
- Three selectable org structures — Ming cabinet (18 agents), Tang three departments (14) and modern corporate (14) — switchable after install with one script
- Dispatcher → planner → specialist flow: a steward takes the order, a cabinet agent enhances the prompt and writes a plan, ministries execute, and a review agent checks code pushed to GitHub
- One bot per department in Discord, so you can mention a single ministry directly; Feishu, Slack, Telegram and a pure WebUI are also supported
- Per-agent workspace, memory and model choice, plus a backup script for every agent's SQLite memory with daily, weekly and monthly retention
- 60+ OpenClaw skills (GitHub, Notion, browser, web search, cron, TTS, tmux, shell), Docker sandbox isolation and scheduled jobs for reports and health checks
- A built-in React + TypeScript web dashboard with a court overview, chat with departments, session and token statistics, cron management and system health
Getting started
The README recommends installing on a cloud server rather than a personal computer. You need an LLM API key and, for the Discord path, a bot token; the installer asks for both.
Clone and run the full installer
The local install is the recommended path: it lets you read every script, includes the full persona setup, and asks which regime to use (Ming cabinet, Tang three departments or modern corporate). Fill in your LLM API key and Discord bot token when prompted, then mention your bot in Discord.
git clone https://github.com/wanikua/danghuangshang.git
cd danghuangshang
bash scripts/full-install.sh
Already running OpenClaw? Use the lite installer
If OpenClaw is installed, the lite script only lays down the court templates and personas. The README's English quick start then has you add keys to the OpenClaw config and start the gateway.
bash <(curl -fsSL https://raw.githubusercontent.com/wanikua/danghuangshang/main/install-lite.sh)
nano ~/.openclaw/openclaw.json
systemctl --user start openclaw-gatewayKeep the bots from talking in circles
In multi-bot Discord mode each agent's config must let bots answer other bots only when mentioned. The README warns that true makes the bots trigger each other in a message storm, and false stops the steward from reaching the ministries. Newer installers set this by default.
"discord": {
"allowBots": "mentions"
}Switch regimes later
From the cloned repository, one script swaps the whole team's structure.
bash scripts/switch-regime.sh tang-sansheng # Tang three departments
bash scripts/switch-regime.sh modern-ceo # modern corporate
bash scripts/switch-regime.sh ming-neige # Ming cabinetOptional: start the web dashboard
The dashboard in gui/ is built with Vite and served by a small Node backend on port 18795. For production the README suggests putting it behind an Nginx reverse proxy with HTTPS. If something misbehaves, openclaw doctor or the project's doctor.sh checks config, keys, tokens and routing.
cd danghuangshang/gui && npm install && npm run build
cd server && npm install
BOLUO_AUTH_TOKEN=your-password node index.jsCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Run a standing team of specialised agents — coding, cost tracking, marketing copy, DevOps — that you direct from your phone through Discord or Feishu
- Put a planning and review step in front of every task, so a request is clarified and planned before it is executed and code is reviewed when it is pushed to GitHub
- Automate recurring work such as daily and weekly reports to Notion, health checks and code backups with cron-driven agents
- Get a working multi-agent setup from configuration files and an install script instead of writing orchestration code
How AI Court (Danghuangshang) compares
AI Court (Danghuangshang) alongside other open-source multi-agent systems tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Paperclip | ★ 118k | A self-hosted control plane that runs a team of AI agents like a company, with an org chart, tasks, budgets and approvals. |
| Ruflo | ★ 82.7k | Agent meta-harness that wraps Claude Code and Codex with 100+ specialized agents, swarm coordination, vector memory, background workers and cross-machine agent federation. |
| MetaGPT | ★ 71.5k | A multi-agent framework that models a software company, assigning roles like product manager, architect, and engineer to generate code from a single prompt. |
| AutoGen | ★ 62k | Microsoft Research's framework for building applications where multiple agents converse with each other and with tools to solve tasks. |
| CrewAI | ★ 61.4k | A framework for assembling teams ('crews') of role-playing agents that divide tasks and collaborate to complete a goal. |
| AgentScope | ★ 36.9k | A framework for building multi-agent applications with message passing, visual debugging tools, and distributed execution. |
| OpenAI Agents SDK | ★ 30.9k | OpenAI's lightweight Python SDK for building multi-agent workflows using explicit handoffs, tools, and guardrails. |
| AI Court (Danghuangshang) | ★ 2.7k | A ready-made team of OpenClaw agents organised like an imperial Chinese court — you issue the decree in Discord or Feishu, the ministries do the work |


