From the Greek τριάρχης — “ruler of three”
Triarch is a human-in-the-loop AI voting system - the last human checkpoint before machines execute decisions. Two independent artificial minds. One accountable human. A closed decision circuit where AIs can analyze, predict, and argue, but can never authorize alone.
This project delivers a real, working implementation of the Triarch governance model with a Python core and Gradio Web Interface, built for governance simulations, security audits, and real operational control using local LLMs.
As AI power surges, accountability must not dissolve into code. Triarch is the kill-switch between machine intelligence and unchecked machine authority - a cybernetic decision grid where AIs may calculate, predict, and argue... but only a human can unlock reality.
Machines can think. Only humans can authorize.
- Human NO = hard kill. The decision is dead.
- Human YES requires at least one AI YES.
- Human ABSTAIN requires both AIs to agree.
- AI alone can never authorize.
- Responsibility always fingerprints back to a human.
Two-Round Mode (Deliberative Assembly)
All entities vote in the dark. Then they see each other’s reasoning, reprocess, and may realign. This mirrors real executive boards - debate, influence, revision, consequence.
Single-Round Mode (Fast Protocol)
One shot. No cross-talk. No persuasion layer. Built for speed, automation, and audit-pure execution.
- A live web interface for real governance sessions
- Side-by-side reasoning from two independent AIs
- Per-AI tuning (model + system prompt)
- Automatic, immutable decision logs
- Offline-first execution
- Zero cloud. Zero API keys.
- Python 3.13 with Gradio and Requests installed
- LM Studio running locally with the API server enabled
Default endpoint:http://localhost:1234/v1
git clone https://github.com/daragontech/Triarch.git
cd Triarch
pip install -r requirements.txt
python triarch_gradio_app.py --config triarch_vote_config.json| Variable | Description | Default |
|---|---|---|
LMSTUDIO_API_URL |
LM Studio API endpoint | http://localhost:1234/v1 |
LMSTUDIO_MODEL |
Default model for AI #1 and fallback for AI #2 | gpt-4o-mini |
LMSTUDIO_MODEL2 |
Optional override for AI #2 | inherits from LMSTUDIO_MODEL |
TRIARCH_LOG_VERBOSE |
Models & systemPrompts only added to output when verbose is set | 0 |
TRIARCH_SINGLE_ROUND |
If set (any value), only Round 1 is executed | unset -> two-round mode |
Example:
export LMSTUDIO_API_URL=http://localhost:1234/v1
export LMSTUDIO_MODEL=lmstudio-community/qwen2.5
python triarch_gradio_app.py --config triarch_vote_config.json© 2025 DaragonTech
Released under the a 3-clause BSD license for research and experimental governance use - see the LICENSE file for details.
Developed by DaragonTech
Based on the TRIARCH architecture and The Twins framework
Project lead: Felipe Daragon
Official Website: https://www.daragon.tech/en/projects-triarch.php
This open-source project is a simplified public implementation of the governance logic used internally at DaragonTech inside the Mechas Platform - an orchestration layer for AI executives with: Long-term memory, Organizational state awareness and Dynamic prompt evolution. This public version uses static prompts for transparency, safety, and reproducibility.

