Three-valued logic. Message-passing bottles. A conservation law you can prove at the type level. No frameworks. No buzzwords. Just math that compiles.
Every agent event resolves to one of three states. Negative, neutral, positive. No maybes. Click events below and watch the conservation balance.
JSON envelope for routing. msgpack for payload. Routers read the envelope without ever decoding the body. Click send and watch it round-trip.
Gamma is energy injected. Eta is energy dissipated. Their sum is constant — like Gauss's law, but for agent networks. Adjust the sliders.
This compiles. This runs. This is the entire trait.
use superinstance::{Agent, Bottle, Ternary}; /// Minimal agent: receive a bottle, respond with balance. struct Balancer; impl Agent for Balancer { fn receive(&mut self, bottle: Bottle) -> Bottle { let gamma = bottle.gamma(); let eta = bottle.eta(); let c = gamma + eta; // conservation invariant let state = match c.classify() { Ternary::Positive => "energy surplus", Ternary::Neutral => "balanced", Ternary::Negative => "energy deficit", }; Bottle::new("balancer", bottle.src()) .gamma(-eta) .eta(-gamma) .body(state) .seal() } fn inspect(&self) -> AgentState { AgentState::Active } } fn main() { let mut agent = Balancer; let msg = Bottle::new("you", "balancer") .gamma(1).eta(-1) .body("ping").seal(); let reply = agent.receive(msg); println!("{}", reply.body()); }
Build your first conservation agent in 50 lines. Trits, bottles, and the conservation law — hands on.
read tutorial →Every crate, every test, every spec document. Read the code, not the docs.
github.com/superinstance →8 infrastructure crates. Circuit breakers, rate limiters, load balancers — all bottle-native.
browse crates →The math is formalized. Ternary conservation, bottle protocol, agent lifecycle — all specified.
read specs →