# Edict

> Multi-agent orchestration with a dedicated review stage that can reject a plan before work starts

- Category: Agents & Automation / Multi-Agent Systems
- Language: Python
- Licence: MIT
- Repository: https://github.com/cft0808/edict
- Canonical page: https://ai-tldr.dev/tools/edict/

## In short

Edict (三省六部) organises twelve agents — eleven role agents plus one compatibility role — into the Tang dynasty's three-departments-six-ministries structure. It sits in the Multi-Agent Systems category of the Agents & Automation tools and is open-source, written in Python and licensed MIT. To get started: try the dashboard in Docker.

## Overview

Edict (三省六部) organises twelve agents — eleven role agents plus one compatibility role — into the Tang dynasty's three-departments-six-ministries structure. A request enters through a triage agent that answers chat directly or opens a task; a planning department decomposes it; a review department approves or rejects the plan outright; a dispatch department hands the approved subtasks out; and the six ministries plus a personnel role execute them in parallel and report back. The point of the metaphor is the review stage: a plan can be sent back before any work happens, which is a separation of powers rather than a naming theme.

That structure is what the project contrasts itself against in its own comparison table: where the frameworks it lists offer no dedicated review step, optional review, or human-in-the-loop approval, Edict makes review a standing role that can reject. It pairs that with observability — a real-time kanban board and timeline, agent heartbeat and activity monitoring, and a complete archive of every report that passed through the pipeline — and with intervention: a running task can be halted, cancelled or resumed from the board.

It runs on top of OpenClaw and needs Python 3.10 or newer on macOS or Linux. The dashboard is React 18 in front of a standard-library-only Python backend, and the install script provisions each agent's workspace, writes the role definitions, registers the agents and their permission matrix into `openclaw.json`, symlinks shared data, and synchronises API keys across agents. Models can be hot-swapped per agent from the dashboard, skills can be viewed and added there, and a news-briefing job can push digests to Feishu.

## What it does

- A standing review role that can reject a plan before execution, rather than optional or human-only approval
- Twelve specialised agents across triage, planning, review, dispatch and parallel execution
- Real-time kanban board and timeline, with halt, cancel and resume on a running task
- Full archive of every report that moved through the pipeline, so a run can be replayed and audited
- Agent heartbeat and activity monitoring, plus per-agent model hot-swapping from the dashboard
- Skills can be inspected and added from the board; a briefing job can push news digests to Feishu
- React 18 dashboard over a standard-library-only Python backend, with Docker and systemd deployment paths

## Getting started

There are two routes: a Docker image that boots the dashboard with pre-seeded demo data so you can look around, and a full install that wires the agents into an existing OpenClaw setup.

1. Try the dashboard in Docker

   The demo image ships the prebuilt React frontend and mock data — no OpenClaw needed. Open http://localhost:7891 once it starts. On x86/amd64 hosts, add --platform linux/amd64 if you hit an exec format error.

```bash
docker run -p 7891:7891 cft0808/sansheng-demo
```

2. Check the prerequisites for a real install

   Edict drives OpenClaw agents, so OpenClaw must already be installed. Python 3.10 or newer is required, on macOS or Linux.

3. Clone and install

   The install script creates each agent's workspace, writes the role definitions, registers the agents and their permission matrix into openclaw.json, symlinks shared data and scripts, sets inter-agent session visibility, syncs API keys to every agent, builds the React frontend if Node 18+ is present, and restarts the gateway.

```bash
git clone https://github.com/cft0808/edict.git
cd edict
chmod +x install.sh && ./install.sh
```

4. Configure a key on first install

   A first install needs one agent configured with an API key; rerunning the installer then propagates it to the rest.

```bash
openclaw agents add taizi
./install.sh
```

5. Start it

   The launcher starts both the data-refresh loop and the dashboard server. You can also run the two separately.

```bash
chmod +x start.sh && ./start.sh

# or separately:
bash scripts/run_loop.sh &
python3 dashboard/server.py
# then open http://127.0.0.1:7891
```

6. Run it as a service

   A systemd unit is included for always-on deployments, alongside a management script.

```bash
sudo cp edict.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable edict
sudo systemctl start edict

# or: bash edict.sh start|status|restart|stop
```

## When to use it

- Put a mandatory plan-review step in front of a multi-agent run so bad plans are rejected before they consume tokens
- Watch a multi-agent task move between roles on a board, and halt or cancel it while it is still running
- Keep an auditable record of what each agent was asked and what it returned, for work that has to be explainable
- Swap the model behind an individual role from the dashboard to trade cost against capability per step
