Skip to main content
The Hive is the brain of the Horizon swarm. It takes independent trading strategies and turns them into a self-organizing system that evolves, learns, and improves on its own. No proprietary algorithms are exposed. All 13 core subsystems are compiled to Rust via PyO3. When you install the SDK, you get an opaque .so binary. No source code ships in the Python package.

Architecture

Compiled Core

13 subsystems compiled to native binary via PyO3/maturin. Pheromone fields, evolutionary engines, behavioral cloning, causal discovery. All opaque Rust code.

Python Orchestration

HiveController is a thin Python wrapper that wires the 13 Rust subsystems together. Configuration, persistence (SQLite), WebSocket server, and the oversight loop stay in Python.

Progressive Autonomy

Five trust modes from observe (watch only) to skynet (full self-modification). The system earns autonomy through demonstrated performance. Each graduation requires statistical evidence.

No IPC

Direct PyO3 function calls between Python and Rust. No sockets, no serialization overhead, no process boundaries. A Python call to pheromone.deposit() executes compiled Rust in the same process.

Quick Start

Remote connections:

13 Subsystems

Every subsystem listed below runs as compiled Rust. The Python layer is thin wrappers only.

Coordination

Evolution

Intelligence

Safety

Autonomy Modes

The Hive doesn’t start autonomous. It earns trust through demonstrated performance.

Pheromone Field

Agents communicate indirectly by depositing pheromone on markets. No direct messaging. Emergent coordination through environmental modification. Same mechanism ant colonies use.
Nine channels:

Kill Chain

Automated incident response. Six phases in sequence with Python callbacks at each step.

Configuration

HiveConfig is a Python dataclass with 42 fields. Key settings:

CLI

25 commands under horizon hive:

MCP Server

22 tools for LLM-driven Hive management via horizon.mcp_hive:
Tools include: hive_status, hive_spawn, hive_kill, hive_evolve, hive_dream, hive_pheromone, hive_consensus, hive_criticality, hive_incidents, hive_kill_switch, and more. Full tool definitions are in python/horizon/mcp_hive.py.

What the Hive Cannot Do

Cannot Override Rust Risk

The Rust engine’s 8-point risk pipeline sits below the Hive. Every order goes through compiled checks regardless of what the Hive decides.

Cannot Skip Kill Chain

Once a kill chain triggers, all 6 phases execute. The Hive can’t suppress an incident or skip remediation. Genome blacklisting is permanent.

Cannot Reverse Graduation

Autonomy modes only go forward. The system can’t demote itself from Autonomous back to Supervised without human intervention.

Cannot Exceed Capital Limits

Total allocation across all agents can’t exceed total_capital. The coordinator enforces this in compiled Rust. No Python code can bypass it.

IP Protection

The proprietary algorithms (pheromone fields, evolutionary engines, behavioral cloning, causal discovery, impact modeling, metamorphic execution) are all compiled to native binary. When you publish the SDK:
  • Users get _horizon.cpython-312-darwin.so (or equivalent for their platform)
  • No .py files contain algorithm implementations
  • The Python hive/ directory contains only configuration, persistence, and thin wrappers
  • Decompiling the .so produces assembly, not readable algorithms