Skip to content

0arch-io/magi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAGI

CI Python 3.11+ License: MIT

Three local open-source models convene as a personal decision council and DECIDE.

Named for the Nerv supercomputer in Neon Genesis Evangelion: three perspectives, one verdict. Built for indecisive people who want a council, not another chatbot.

    ███╗   ███╗ █████╗  ██████╗ ██╗
    ████╗ ████║██╔══██╗██╔════╝ ██║
    ██╔████╔██║███████║██║  ███╗██║
    ██║╚██╔╝██║██╔══██║██║   ██║██║
    ██║ ╚═╝ ██║██║  ██║╚██████╔╝██║
    ╚═╝     ╚═╝╚═╝  ╚═╝ ╚═════╝ ╚═╝

    MELCHIOR  ·  BALTHASAR  ·  CASPER
    the council convenes — bring your question

What it does

You bring a question. Three models, each running a distinct lens, debate it across multiple rounds and return a verdict:

  • MELCHIOR (qwen3:14b) — data, logic, second-order effects. Watches for confirmation bias, sunk cost, planning fallacy.
  • BALTHASAR (phi4:latest) — long-term wellbeing, relationships, what gets sacrificed quietly. Asks who gets hurt if it fails, what's irreversible.
  • CASPER (hermes3:8b) — desire, values, identity. Sees through performance, asks what you'd regret NOT doing.

The council always decides. CONDITIONAL verdicts require a concrete blocker: vague hedges are coerced to ACCEPT. If the three disagree, you get DEADLOCK and the call goes back to you, but with three distinct readings to argue with.

Install

One command. Handles Python, Ollama, models, everything:

curl -fsSL https://raw.githubusercontent.com/0arch-io/magi/main/install.sh | bash

Or if you prefer doing it yourself:

pipx install git+https://github.com/0arch-io/magi
ollama pull qwen3:14b && ollama pull phi4 && ollama pull hermes3:8b && ollama pull qwen3:4b

Total model footprint: ~23GB. Verify with magi doctor.

Use

magi                                    # open the REPL
magi "should I take the job offer?"     # one-shot
magi doctor                             # check Ollama + models
magi stats                              # decision patterns
magi --invite banker "should I move?"   # invite a specialist

Inside the REPL:

❯  bring a question
❯❯ argue back — the council reconsiders with new info
/new       drop the thread, start fresh
/help      list commands

How it routes your question

A lightweight intake classifier routes each question into one of three flows:

decision — yes/no

❯ should i deprecate the v1 api now that v2 has 90% of traffic
intake: decision question
... [3 rounds of debate]
RESULT: CONSENSUS — YES  (3A · 0C · 0R)

choice — pick from named options

❯ should i write my new ios app in swift or react native
intake: choice question — Swift vs React Native
... [picks per persona, tally]
RESULT: CONSENSUS — Swift  (Swift:3)

open — open-ended request for direction

❯ i wanna play minecraft but ive been bored of a lot of games
intake: open question
MELCHIOR    RECOMMENDS: Disco Elysium
BALTHASAR   RECOMMENDS: Stardew Valley
CASPER      RECOMMENDS: Stardew Valley
RESULT: PARTIAL OVERLAP — 2/3 agree on one pick  →  your call between 2 options

prediction questions ("will my startup hit profitability?") are interpreted as decisions: should they bet on X happening.

Specialists

The core MAGI is fixed at three. For higher-stakes questions, invite a specialist:

/invite banker      financial reality — cash flow, runway, opportunity cost
/invite therapist   emotional + psychological — what's underneath
/invite lawyer      legal exposure — contracts, liability, downside
/invite coach       career trajectory — what compounds, what's a dead-end
/invite doctor      physical health — body signals, lifestyle impact

Specialists join the council and debate alongside the core three. /dismiss <name> to remove. They can be invited mid-thread.

Journal & Stats

Every deliberation auto-saves to ~/.config/magi/journal.jsonl:

/journal                       show recent deliberations
/stats                         decision patterns and analytics
/outcome <id> <what you did>   record what you actually decided

Memory

MAGI learns from your past decisions. Before each deliberation, it searches your journal for similar questions. If it finds a match, the council sees what happened last time:

╭──────────────── you've asked this before ─────────────────╮
│  ● 2026-05-02  "should I take the job offer?"  → YES     │
│    ↳ you said: "took it, no regrets"                      │
╰───────────────────────────────────────────────────────────╯

After each result, it surfaces patterns: whether you're revisiting a question, which member you tend to follow, and nudges you to record outcomes so the council gets smarter over time. Use /outcome <id> <what you did> to close the loop.

Quiet mode

For scripting, -q suppresses all panels and outputs only the verdict line:

magi -q "should I deploy on Friday?"
# CONSENSUS — YES  (3A · 0C · 0R)

echo "swift or flutter?" | magi -q
# CONSENSUS — Swift  (Swift:3)

Works with pipes too: echo "should I?" | magi -q

Config file

Persistent model overrides and auto-invite specialists:

magi --init-config    # writes ~/.config/magi/config.toml with examples
[models]
melchior = "qwen3:8b"

[specialists]
invite = ["banker"]

CLI flags always override the config file.

Customize

Per-persona model overrides:

magi --melchior qwen3:8b --balthasar hermes3:8b "..."

Or in the REPL:

/melchior qwen3:8b
/balthasar llama3.1:8b

Override the intake classifier model:

MAGI_CLASSIFIER_MODEL=llama3.2:1b magi

Point at a non-local Ollama:

OLLAMA_HOST=http://192.168.1.100:11434 magi

Caveats

  • Math is hallucinated. Small models confidently get arithmetic wrong. For prediction questions involving numbers (runway, breakeven, growth rates), trust the directional verdict, not the specific figures.
  • The council DECIDES. It will not refuse to vote, even on questions where it lacks information. That's a feature: refusing to decide is the worst outcome. The corollary is that vague questions get vague-but-decisive answers.
  • Three is canon. Don't try to add a fourth core member. Route through specialists instead.

Why

Coin-flip 2.0. The value is the experience: three independent reads, watching them debate each other by name, surfacing your real preference by friction. It scales from "should I have coffee at 8pm" to "should I quit my job": invite specialists for the heavy ones.

Built explicitly for people who can't decide on their own. The council won't let you wallow.

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.

About

Three-agent decision system inspired by Evangelion. CLI that consults Melchior, Balthasar, and Casper in parallel on a question and returns their verdicts.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors