Skip to main content
Enterprise Only. The Hive is available exclusively to enterprise customers. To get access, contact us at contact@mathematicalcompany.com.
Ten agents researching independently will find the same market, open the same position, and blow up together. No portfolio view. No quality gate. Nobody deciding how much capital each agent deserves. The Hive fixes this. Thirteen compiled Rust subsystems handle coordination, evolution, risk, and execution for a fleet of trading agents. Pheromone fields for indirect communication. Evolutionary engines that breed new strategies. Bayesian reputation scoring. A 6-phase kill chain for automated incident response. All proprietary algorithms ship as opaque native binary. Below everything, the compiled Rust risk pipeline rejects any order that violates hard limits.

Hive

13 Rust subsystems: pheromone fields, evolutionary engines, behavioral cloning, causal discovery, impact modeling, metamorphic execution.

Agent Pipeline

9-phase workflow per agent. Research, analyze, backtest, pass 5 statistical tests, propose, execute on approval.

Circuit Breaker

No LLM. Daemon thread. Checks portfolio limits every 2 seconds. Emergency stop with no override path.

Event Bus

WebSocket pub/sub. 6 channels. Real-time state across agents, Hive, risk, and knowledge. Ring buffers for late joiners.

The Coordination Problem

Five agents, each independently researching markets. Prediction markets, stocks, options. Without coordination:
  • Agent A and Agent C both find the same Fed rate market. Both buy yes. 2x the exposure you planned for, and neither agent knows the other exists.
  • Agent B finishes a backtest with a Sharpe of 1.2 and starts trading. Overfit. No one checked.
  • Agent D requests 3,000.AgentErequests3,000. Agent E requests 4,000. Your budget is $5,000. Both get funded because there’s no central accounting.
  • All five agents are long the same sector. One event wipes out the portfolio.
The SwarmCoordinator runs a fitness-scored tick loop. The PheromoneField detects crowding automatically. The ConsensusEngine aggregates conflicting views. The CriticalityMonitor triggers the KillChain when systemic risk spikes. Agents can’t trade without the AutonomyController’s permission. And below all of this, the Rust engine rejects any order that violates compiled risk limits.

Quick Start

Remote connections:
Legacy LLM-driven swarm (still available):

How Orders Hit the Rust Engine

Every order from every agent goes through the same compiled risk pipeline in src/risk.rs.
Kill switch, price bounds, size bounds, position limits, notional cap, drawdown threshold, rate limit, dedup. All Rust. Python can’t skip any of them. A 1,000agentcanttakea1,000 agent can't take a 5,000 position. Rejected before it reaches the exchange. The SwarmCoordinator enforces total capital limits in compiled Rust. No agent receives more than max_capital_per_agent_pct (default 15%) of total AUM. Capital allocation is fitness-weighted. Better agents get more capital. One agent’s risk breach doesn’t affect another agent’s engine. Portfolio-wide limits are handled by the CriticalityMonitor and KillChain.

Five Risk Layers

Each enforces independently. Lower layers can’t be overridden by higher ones. The Hive reasons about strategy. It can’t override compiled safety limits. An agent that decides to “take more risk” still hits the Rust pipeline.

13 Rust Subsystems

All proprietary algorithms compiled to native binary via PyO3. No source code ships in the Python package.

SwarmCoordinator

Fleet management. Fitness scoring, selection pressure, promotion pipeline, capital rebalancing.

PheromoneField

9-channel stigmergic communication. Evaporation, diffusion, emergent market signals.

ConsensusEngine

IC-weighted signals, internal prediction markets, Dempster-Shafer belief aggregation.

AgentFactory

9 archetype templates + 5 spawn sources: evolution, clone, user, imprint, opportunistic.

MAPElitesArchive

300-cell quality-diversity grid. Keeps the swarm diverse by construction.

EvolutionEngine

NSGA-II multi-objective optimization with island model. 5 islands, periodic migration.

CriticalityMonitor

15-indicator systemic risk. Hurst, VPIN, transfer entropy, BOCPD, CUSUM. Triggers avalanche reserve.

CausalEngine

Granger causality + transfer entropy + lead-lag detection. Early warning for regime shifts.

SelfImpactModel

Almgren-Chriss impact estimation. Gates orders exceeding expected alpha. Internal crossing.

ImprintSystem

Behavioral cloning via 3-layer MLP. Learns your trading style with DAgger-style corrections.

AutonomyController

5-mode progressive trust. Each graduation requires statistical evidence.

KillChain

6-phase incident response. Genome blacklisting prevents failed strategies from re-evolving.

MetamorphicExecutor

Anti-fingerprint execution. Randomized child orders, jittered timing, decoy orders.

Configuration

HiveConfig controls all 13 subsystems. Key settings:

Models

The Hive uses LLMs for the ReACT research agent and high-level oversight. OpenRouter by default, any model works.
You can point api_base at any OpenAI-compatible endpoint: local models, Azure, your own proxy. The compiled Rust subsystems don’t use LLMs. They run deterministic algorithms.