Enterprise Only. The Hive is available exclusively to enterprise customers. To get access, contact us at contact@mathematicalcompany.com.
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 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.
Quick Start
How Orders Hit the Rust Engine
Every order from every agent goes through the same compiled risk pipeline insrc/risk.rs.
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.| Layer | Enforcer | What | Override |
|---|---|---|---|
| Engine | Compiled Rust | 8-point pipeline: kill switch, bounds, limits, cap, drawdown, rate, dedup | No |
| Per-Agent | SwarmCoordinator (Rust) | Capital allocation per agent, fitness-weighted rebalancing | No |
| Kill Chain | Compiled Rust + Python callbacks | 6-phase incident response: detect, contain, preserve, diagnose, remediate, learn | No |
| Circuit Breaker | Daemon thread, no LLM | Portfolio drawdown, daily P&L, stuck detection. Emergency stop. | No |
| Hive Autonomy | AutonomyController (Rust) | Progressive trust: Observe, Suggest, Supervised, Autonomous, Skynet | Can’t override layers 1-4 |
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:
| Setting | Default | Purpose |
|---|---|---|
total_capital | 100,000 | Total AUM across all agents |
max_agents | 50 | Maximum concurrent agents |
initial_mode | Observe | Starting autonomy mode |
max_drawdown_pct | 0.20 | Portfolio-wide drawdown limit |
max_capital_per_agent_pct | 0.15 | No single agent gets more than 15% |
pheromone_tick_interval | 1.0s | Pheromone evaporation/diffusion rate |
criticality_check_interval | 60s | How often to run the 15-indicator check |
avalanche_reserve_pct | 0.15 | Capital held in reserve for crises |
dream_enabled | True | Offline accelerated evolution between sessions |
imprint_enabled | True | Learn from operator behavior |
metamorphic_enabled | True | Anti-fingerprint execution |
host / port | 0.0.0.0:8780 | WebSocket server for remote connections |
Models
The Hive uses LLMs for the ReACT research agent and high-level oversight. OpenRouter by default, any model works.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.