MAGI
A CLI that puts a decision to a vote across three LLMs — Claude, Gemini, and ChatGPT — styled after the MAGI supercomputer system from Neon Genesis Evangelion. Each model is one independent unit (Melchior-1 / Balthasar-2 / Casper-3); a verdict requires a 2-of-3 majority, or the system reports a deadlock.
Install
git clone <your-repo-url>
cd magi
python -m venv .venv && source .venv/bin/activate
pip install -e .
Or, once published to PyPI:
pipx install magi-cli
Configure
Copy .env.example to .env and add your API keys:
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=...
OPENAI_API_KEY=sk-...
Usage
magi decide "Should we migrate the pipeline to Rust?"
magi decide "Rust or Go for the new service?" --options Rust,Go
magi units # show which model is wired to which unit
Running decide boots the system (an ASCII "MAGI" banner + a per-unit ONLINE handshake), then shows a live hexagonal diagram — Balthasar on top, Casper and Melchior below, all converging on a central MAGI hub — with each node pulsing and spinning while its model is actually thinking. Once resolved, it reveals each unit's full vote with reasoning, then a final verdict panel — CONDITION GREEN for a clear 2/3 majority, CONDITION RED for a deadlock. The hex diagram needs at least ~70 terminal columns; narrower terminals automatically fall back to a plain vertical list.
Pass --plain (or set NO_COLOR=1 / MAGI_PLAIN=1) to strip all of that down to plain text — for scripts, CI, or anyone who just wants the answer.
Notes
- Model IDs move fast. The defaults in
src/magi/config.py(claude-sonnet-5,gemini-3.1-pro-preview,gpt-5.6-sol) were current as of August 2026. If a call fails with a "model not found" error, check each provider's current model list and override viaMAGI_CLAUDE_MODEL/MAGI_GEMINI_MODEL/MAGI_OPENAI_MODELenv vars, or editconfig.pydirectly. - Reassign units by editing the
UNITStuple inconfig.py— swap which provider sits behind Melchior/Balthasar/Casper, or add a fourth/fifth unit (the tally logic generalizes; the "2-of-3" framing inrender_verdictis the only MAGI-specific part). - Publishing to PyPI:
pip install build twine && python -m build && twine upload dist/*— see the project's earlier chat thread for the full walkthrough.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file magi_consensus-0.1.0.tar.gz.
File metadata
- Download URL: magi_consensus-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1ed77a1ca21f608f98fe9e336a446473f8640fca0327543a42d683491f340eb
|
|
| MD5 |
df62f9a974be6111c0b6c4314157767f
|
|
| BLAKE2b-256 |
2a6961bad587b5a6febe3fd8bdecf9bddabbe982d97b0e1105da60875f10d548
|
File details
Details for the file magi_consensus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: magi_consensus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b1e71643d23b1a864a9db0832af4713522f4d6e71d013f33ee431c10d17b48a
|
|
| MD5 |
593c688cdd0aef4b18eeaf912728ac57
|
|
| BLAKE2b-256 |
92bc0540b8ce584c764ee5c9d38510dc87ba60ae2b1df026ab7cc8ceb26f097e
|