MetaAgent

The MetaAgent fuses three layers of governance:

  1. SupervisorAgent β†’ external override, high clarity, swarm governor
  2. MetaReflectionAgent β†’ internal self-check, loop breaker, stagnation monitor
  3. Policy Mirror Protocol (PMP) β†’ ethical refusal boundary, transparency + traceability

This composite agent acts as the β€œgovernor of governors.”

  • Every decision is routed through ternary logic (-1=REFRAIN, 0=TEND, +1=AFFIRM).
  • Swarm outputs + self-reflection scores are fused via 1+1=3 principle (synergy bonus).
  • A 100% failsafe is enforced: 90% secure, 10% uncertainty budget. Affirm never survives if uncertainty >0.10.

Quick start

python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt

# run a meta-agent decision
python -m meta_agent run --context "agents are conflicted, supervisor says REFRAIN, reflection says TEND"

Architecture

Swarm Agents β†’ SupervisorAgent ┐
                                β”œβ”€> MetaAgent (fuses ternary + PMP)
MetaReflectionAgent β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

MetaAgent β†’ final ternary decision (REFRAIN/TEND/AFFIRM) + PMP state (NORMAL..TERMINATED)

Files

  • core.py β€” MetaAgent implementation
  • cli.py β€” command-line runner
  • schemas/ β€” JSON schemas for config + result
  • tests/ β€” pytest-based checks