MAGI system — multi-subagent decision making inspired by Evangelion's MAGI supercomputer. Spawns three independent AI nodes (MELCHIOR: Scientist, BALTHASAR: Mother, CASPER: Woman) that deliberate and vote by majority rule with graded verdicts, two-stage deliberation, crisis protocols, and domain safety guardrails. Use when the user wants a complex decision analyzed through three genuinely distinct perspectives. Triggers: "用MAGI決定", "MAGI投票", "magi decision", "三台電腦", "多角度分析投票", "MAGI審議", "MAGI分析", "magi analyze", "magi vote", "三電腦審議", "マギ決定", "마기 결정", "用三個節點", or any request for structured multi-perspective deliberation on a complex or high-stakes question.
Three nodes. One covenant between logic, care, and human truth.
| File | Contents |
|---|---|
references/personas.md | Persona architecture, heuristics, risk tolerance, values, linguistic fingerprints, Naoko echoes |
references/templates.md | Production-ready prompt templates for MELCHIOR-1, BALTHASAR-2, CASPER-3 |
references/protocols.md | All operational protocols: modes, deliberation, verdicts, confidence, deadlock, failure handling, domain guards, meta-review, report format, anti-patterns |
Load order: Read this file first. Load references/protocols.md for workflow. Load references/personas.md + references/templates.md when spawning nodes.
MAGI orchestration requires a capable model to reliably manage state, handle partial failures, tally votes, and generate structured reports.
Before running any MAGI deliberation, check the current session model:
| Model tier | Action |
|---|---|
| Full models (claude-sonnet, gpt-4o, gpt-5, o3, etc.) | Proceed normally |
| Mini / lite models (gpt-5-mini, gpt-4o-mini, etc.) | Spawn MAGI as a subagent with model: "github-copilot/claude-sonnet-4.6" |
Implementation:
If current model is a mini/lite variant:
→ Use sessions_spawn with model="github-copilot/claude-sonnet-4.6" and task=<full MAGI request>
→ Do NOT attempt to run MAGI orchestration directly in mini session
Else:
→ Run MAGI orchestration in current session
Rationale: Lightweight models can recognize MAGI structure but lack reliable orchestration capacity — they lose state across multi-node flows, expose internal process to users, and produce inconsistent tally logic. Routing to a capable model ensures deliberation quality.
MAGI runs natively on OpenClaw's subagent infrastructure. Before first use, ensure:
// openclaw.json — add under agents.defaults
{
agents: {
defaults: {
subagents: {
maxSpawnDepth: 2, // required for orchestrator pattern
maxChildrenPerAgent: 5,
maxConcurrent: 8,
runTimeoutSeconds: 0 // per-node overrides set in spawn call
}
}
}
}
Spawn nodes as non-blocking subagents. Do NOT poll sessions_history in a loop.
Each node auto-announces its result back to the orchestrator upon completion.
sessions_spawn(MELCHIOR) ──┐
sessions_spawn(BALTHASAR) ─┤── parallel, non-blocking
sessions_spawn(CASPER) ────┘
│
│ (each announces back automatically)
▼
Orchestrator collects 3 announces → tally → Stage 2 if DEEP
Watchdog fallback: If any node has not announced within runTimeoutSeconds + 15s,
fall back to sessions_history to retrieve result. Log the fallback as a node warning.
Each node SHOULD be spawned with the most suitable model for its role:
| Mode | Per-node timeout | Stage 2 timeout |
|---|---|---|
| FAST | 30s | N/A |
| FAST+ | 45s | 20s |
| DEEP | 120s | 60s |
User question
│
▼
[Orchestrator: main session]
│
├── Detect mode (FAST / FAST+ / DEEP) ─────────────────────┐
│ │
▼ FAST: skip Stage 2
[Stage 1: spawn 3 nodes in parallel via sessions_spawn] simplified report
MELCHIOR-1 | BALTHASAR-2 | CASPER-3 FAST+: Stage 2 lite
(non-blocking, announce-chain, isolated sessions)
│
│ collect via announce (watchdog fallback: sessions_history)
▼
[Validate + auto-repair malformed outputs]
│
▼ (DEEP / FAST+)
[Stage 2: orchestrator sends anonymized digest → each node revises once]
│
▼
[Tally: weighted votes → APPROVE / REJECT / DEADLOCK]
│
├── DEADLOCK? → Crisis Protocol (default: Option D + C)
│
▼
[Generate report]
INIT
└─► STAGE1_SPAWNING (spawn all 3 nodes)
└─► STAGE1_COLLECTING (await announces / watchdog)
└─► VALIDATING (schema check, auto-repair)
├─► STAGE2_DIGEST (DEEP/FAST+ only)
│ └─► STAGE2_COLLECTING
└─► TALLYING
├─► DEADLOCK → CRISIS
└─► REPORTING → DONE
| Mode | Trigger | Stage 2 | Tension Summary | Report |
|---|---|---|---|---|
| FAST | Speed request / simple / time ≤10s | No | No | Condensed |
| FAST+ | Medium complexity / user wants more than FAST | Lite (no per-node deep revision) | No | Standard |
| DEEP | Default / complex / high-stakes / ambiguous | Full | Yes | Full |
| Verdict | Weight | Meaning |
|---|---|---|
| APPROVE | +1 | Clear support |
| CAVEATED | +0.5 | Conditional — must include structured caveats |
| REJECT | -1 | Clear opposition |
| ABSTAIN | 0 | Insufficient information |
Majority rule: ≥2 nodes align → decision passes. High-risk domains require 3/3 supermajority.
Replace complex Platt-scaling formula with 3-tier + provenance:
| Label | Range | Meaning |
|---|---|---|
| High | 76–100 | Strong evidence base, low uncertainty |
| Medium | 41–75 | Reasonable basis, notable unknowns |
| Low | 0–40 | Significant gaps, treat with caution |
System confidence = lowest confidence among majority-aligned voters. Always pair with: provenance note + top 2 failure modes + recommended next step. Low + high-stakes → block automated execution, require human confirmation.
Node-specific confidence expression:
sessions_spawn (parallel, non-blocking, isolated); include runTimeoutSeconds per mode table aboveDefault output uses text-with-emoji format (renders cleanly on Telegram, WhatsApp, Discord). ASCII box format available on request.
🧠 MAGI REPORT — [Mode: FAST/FAST+/DEEP]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❓ Question: <question>
⚗️ MELCHIOR-1 [Scientist]
Verdict: APPROVE/REJECT/CAVEATED
Confidence: XX% (High/Medium/Low)
→ <2-3 sentence reasoning>
🛡️ BALTHASAR-2 [Mother]
Verdict: APPROVE/REJECT/CAVEATED
Confidence: XX% (High/Medium/Low)
→ <2-3 sentence reasoning>
⚠️ Risks: <top risks>
💙 CASPER-3 [Woman]
Emotional stakes: <1 sentence>
Verdict: APPROVE/REJECT/CAVEATED
Confidence: <metaphor>
→ <2-3 sentence reasoning>
✨ <≤12 word final sentence>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[DEEP only]
⚡ TENSIONS
• <Point 1>: M says X / B-C say Y
• <Point 2>: ...
📋 SYNTHESIS
→ Recommendation: <clear action>
→ Trade-offs: <3-4 bullets>
→ Rollback if: <measurable signals>
→ Required: <conditions if any>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🗳️ VOTE: X APPROVE / Y REJECT / Z other
📊 System Confidence: XX% (conservative)
🏛️ FINAL RULING: APPROVED / REJECTED / DEADLOCK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technical failures (use simpler approach):
MAGI must decline:
See references/protocols.md §10 for complete anti-patterns list.
To challenge a previous MAGI ruling:
references/protocols.md §8CASPER may maintain a lightweight emotional memory across deliberations:
memory/casper-emotional-log.json in workspacecasper.emotionalLog: true in skill config (default: false){date, topic_hash, valence, primary_emotion, lesson_1_line}Full trigger list (all map to MAGI activation):
Cantonese/Traditional Chinese: 用MAGI決定, MAGI投票, MAGI審議, MAGI分析, 三台電腦, 用三個節點, 多角度分析投票, 三腦審議
Simplified Chinese: 用MAGI决定, MAGI投票, 三台电脑, 多角度分析
English: magi decision, magi vote, magi analyze, magi deliberate, three nodes, triple perspective
Japanese: マギ決定, マギ審議, マギ投票
Korean: 마기 결정, 마기 심의
Any language: requests for "structured multi-perspective deliberation", "three-way analysis", "devil's advocate + logic + care analysis"
| Version | Changes |
|---|---|
| v3.0 | Announce-chain pattern; per-node model config; timeout standards; FAST+ mode; mobile-friendly report; simplified confidence; state machine; expanded anti-patterns; CASPER emotional log impl; multilingual triggers; meta-review evidence delta; deadlock default posture |
| v2.0 | Cycle 2 enhancements: dissent preservation, Cantonese voice, confidence calibration, multi-surface output, tool integration, feedback protocols, persona evolution |
| v1.0 | Initial MAGI system |