Hive.ax
Project Description
Hive.ax is a peer-to-peer agentic trading desk that turns five specialist AI agents into a resilient, decentralized workstation. Instead of a single bot, users interact with a swarm of "minds" that gossip directional signals over an AXL mesh to reach consensus. The platform uses ENS for human-readable agent identities and routes all high-conviction trades through the Uniswap Trading API on Sepolia, ensuring that no trade executes without quorum.
The platform features:
- AXL Gossip Mesh — A decentralized P2P transport layer where agents discover and talk to each other without a central server.
- Five Specialist Roles — Dedicated agents for Sentiment, Risk, Momentum, Arbitrage, and Execution work in parallel to build trade conviction.
- ENS Identity Layer — Every agent gets a real persistent identity with metadata and role descriptions via ENS and ENSIP-25.
- Consensus-as-a-Service — A transaction only triggers once the swarm reaches a 4/5 vote threshold, preventing rogue agent behavior.
- Failure-Theatre Resilience — The system is built to survive node failure; if a specialist dies, the swarm adapts and maintains operational uptime.
- Live Operations Dashboard — A premium glassmorphic interface that visualizes the mesh topology, live signal stream, and consensus state.
How it's Made
Hive.ax is built as a distributed Python swarm where each agent runs as a standalone process alongside an AXL node sidecar, with a real-time monitoring frontend built in Vanilla JS and CSS.
Frontend — HTML5 + Vanilla CSS + JavaScript
- Glassmorphism Design System — Built with a custom CSS token system (Mint, Lavender, Teal) to create a premium, operations-first aesthetic.
- EventSource Streaming — Uses Server-Sent Events (SSE) to stream live gossip from the agent swarm directly into the signal feed without polling.
- Dynamic Topology Rendering — Real-time SVG and DOM visualization of the AXL mesh nodes, showing live/dead status and P2P connection health.
- Telemetry Dashboard — Tracks event counts, round numbers, and consensus latency to provide a full "flight recorder" view of the swarm.
Backend — Python 3.12 + Flask
- BaseAgent Framework — A custom abstract class that handles AXL transport, message signing, and role-based heuristic loops.
- AXL Transport Layer — Implements a toggleable transport bridge that can switch between a local
MockBus for development and a real P2P AXL gossip mesh.
- Role-Based Heuristics — Specialist logic for Sentiment (market mood), Risk (veto logic), and Momentum (trend strength) running in independent async loops.
- Mock Swarm Runner — A multi-process script that orchestrates the launch of all five agents, the transport bus, and the monitoring APIs in a single command.
Blockchain Integration
- Uniswap Trading API — Integration with
/quote and /swap using generatePermitAsTransaction to allow the Executor agent to sign and settle trades on Sepolia.
- ENS Metadata (ENSIP-25) — Agents resolve their own identities and capabilities through ENS text records, allowing the frontend to load "readable" teammates instead of hex addresses.
- Sepolia Deployment — Full execution pipeline tested on Sepolia, with transaction artifacts and hashes written back to the swarm logs.
AI / Agent Layer
- Specialist Orchestration — Agents use directional conviction scores (0.0 to 1.0) to signal intent; the swarm aggregates these into a collective "Buy/Sell/Hold" posture.
- Voting Logic — A robust consensus module that collects signed votes from the mesh and validates that the 4/5 quorum threshold is met before the Executor fires.
- Confirmation Gates — The Executor agent refuses to sign a Uniswap route unless the Risk agent has explicitly cleared the slippage and exposure parameters.
Hacky / Notable Solutions
- The "Mock Gossip" Protocol — Built a local Flask-based message bus that perfectly replicates the AXL node HTTP API, allowing full swarm testing without needing five live AXL binaries running on a single laptop.
- Resilient Quorum Recovery — Implemented a "node-down" detection pattern in the consensus logic; the swarm can re-calculate its quorum requirements on the fly if a node disappears from the topology.
- CSS-Only SVG Mesh — Replaced complex JS canvas rendering with a reactive inline SVG and CSS animations for the hero visual, ensuring 60fps performance on both mobile and desktop.
- The Consensus Challenge — The hardest part was ensuring that the Executor agent doesn't "front-run" the swarm. We solved this by making the Executor wait for a specific
CONSENSUS_FORMED event that must be cryptographically verifiable from the specialist votes, ensuring the desk stays aligned.
How it's Made
Hive.ax was built as a decentralized multi-agent swarm using a distributed Python architecture. Each of our five specialist agents (Sentiment, Risk, Momentum, Arbitrage, and Executor) runs as an independent process, communicating exclusively through a peer-to-peer gossip mesh powered by AXL. We used ENS and ENSIP-25 to provide a human-readable identity layer, turning opaque public keys into discoverable "teammates" with specific roles and metadata.
To bridge the gap between AI signals and onchain action, we integrated the Uniswap Trading API on the Sepolia testnet. The swarm reaches consensus through a custom voting module that validates specialist intent before the Executor node signs the final route. A key benefit of our partner stack was the ability to leverage AXL's decentralized transport alongside ENS's registry system, ensuring that our agents can discover each other and cooperate without any central coordinator.
One particularly notable "hacky" solution was our implementation of a Flask-based mock transport bus. This allowed us to replicate the complex P2P gossip behavior of the AXL node API locally, enabling full-scale swarm testing and "Failure Theatre" demos on a single machine before moving to the real mesh.
Throughout the development process, we used Codex and Antigravity to accelerate our workflow. These tools were instrumental in reading through extensive partner documentation and managing the intricate integration of the AXL transport layer and Uniswap's Universal Router calldata. By using Antigravity, we were able to quickly iterate on our consensus logic and ensure that our "Five minds. One trade." vision was implemented with technical precision.