""" ╔═══════════════════════════════════════════════════════════════════════════════╗ ║ ║ ║ ███████╗███╗ ██╗███████╗███████╗███╗ ███╗██████╗ ██╗ ███████╗ ║ ║ ██╔════╝████╗ ██║██╔════╝██╔════╝████╗ ████║██╔══██╗██║ ██╔════╝ ║ ║ █████╗ ██╔██╗ ██║███████╗█████╗ ██╔████╔██║██████╔╝██║ █████╗ ║ ║ ██╔══╝ ██║╚██╗██║╚════██║██╔══╝ ██║╚██╔╝██║██╔══██╗██║ ██╔══╝ ║ ║ ███████╗██║ ╚████║███████║███████╗██║ ╚═╝ ██║██████╔╝███████╗███████╗ ║ ║ ╚══════╝╚═╝ ╚═══╝╚══════╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚══════╝ ║ ║ ║ ║ Multi-Agent Orchestration Primitives for CASCADE-LATTICE ║ ║ ║ ║ "Wrap anything. Orchestrate everything. Deliberate together." ║ ║ ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ ENSEMBLE provides model-agnostic patterns for multi-agent systems: Scarecrow: Universal model wrapper (the null-port pattern) Council: N models + deliberation + consensus EnsembleVoting: Aggregation strategies Works with ANY model framework: - PyTorch, JAX, TensorFlow - Hugging Face Transformers - OpenAI API, Anthropic API - Custom models, RL policies, vision systems USAGE: >>> from cascade.ensemble import Scarecrow, Council >>> >>> # Wrap your models (any framework) >>> llm1 = Scarecrow().plug_model(my_gpt_model) >>> llm2 = Scarecrow().plug_model(my_claude_model) >>> llm3 = Scarecrow().plug_model(my_local_llama) >>> >>> # Create a deliberative council >>> council = Council(consensus='weighted') >>> council.add_brain(llm1, name="gpt") >>> council.add_brain(llm2, name="claude") >>> council.add_brain(llm3, name="llama") >>> >>> # All 3 models deliberate together >>> result = council.forward({'text': 'What is consciousness?'}) >>> print(result['consensus']) # The agreed answer >>> print(result['deliberation']) # Who said what >>> >>> # With HOLD for human oversight >>> from cascade.hold import Hold >>> council.enable_hold() >>> # Now humans can intervene at council decisions PATTERNS: Scarecrow: "If I only had a brain!" - Wrapper with no opinion on what's inside Council: N experts deliberate to consensus Voting: Aggregation math (majority, weighted, confidence) INTEGRATES WITH: cascade.hold - Human-in-the-loop at council level cascade.core - Causation tracking of multi-agent decisions """ from ensemble.scarecrow import ( Scarecrow, ModelType, ) from ensemble.council import ( Council, ConsensusMethod, ) from ensemble.voting import ( EnsembleVoting, ) __all__ = [ # Core wrapper "Scarecrow", "ModelType", # Council orchestration "Council", "ConsensusMethod", # Voting strategies "EnsembleVoting", ]