π§ The Big Picture
SuperInstance is a conservation spectral framework for persistent multi-agent AI. It treats a fleet of agents like a physical system where total "energy" is conserved. When one agent consumes more resources, others get less. This isn't a metaphor β it's enforced mathematically through spectral analysis.
The framework provides:
- Persistent agents with long-term memory stored as markdown files
- Fleet coordination via a central dispatcher using the t-minus protocol
- Spectral resource management β eigenvalue-based load balancing
- Conservation law β total fleet resources are always conserved
β±οΈ T-Minus Protocol
The t-minus protocol is SuperInstance's coordination mechanism. It uses temporal cueing with offsets to schedule and route tasks between agents through a WebSocket dispatcher.
Negative Offsets β Head Starts
A negative offset gives an agent a head start. The task is dispatched immediately β or even "retroactively" β so the agent begins work before the nominal time.
client.cue("beta", -1, "analyze", payload)
Positive Offsets β Countdowns
A positive offset creates a countdown. The task is queued and delivered after the specified delay, useful for staggered execution.
client.cue("gamma", 5, "report", payload)
Zero Offset β Immediate
An offset of zero means immediate dispatch. The task is sent to the target agent right now, no delay.
client.cue("alpha", 0, "compute", payload)
The lifecycle is: register β subscribe β cue/dispatch β complete β result. Agents register their capabilities, subscribe to channels, and the dispatcher routes tasks based on capability matching and spectral load.
π³οΈ Fleet & Vessels
A fleet is a named group of coordinated agents. Each agent in the fleet is called a vessel. The fleet maintains a spectral model of each vessel's capabilities.
Spectral Load Balancing
When a task arrives, the fleet computes which agent's capability eigenvalue best matches the task's spectral profile. Tasks are routed to the best-matched vessel β not round-robin, not random, but mathematically optimal based on the agent-resource matrix.
fleet = Fleet(name="analysis-team")
fleet.add_agent(agent)
result = fleet.dispatch("Analyze this dataset")
Methods: add_agent(), dispatch(task), broadcast(message), spectral_balance().
πΆ Bottles
Bottles are encapsulated message containers that preserve state across agent handoffs. When a task moves from one agent to another, the bottle carries the full context β input, intermediate results, metadata β so the receiving agent has everything it needs.
Bottles enable:
- Safe handoffs between agents in a fleet
- Audit trails β every bottle has a provenance chain
- Checkpoint/restart β agents can resume from a bottle
βοΈ Conservation Law
This is the core invariant of the framework. Total fleet resources are conserved.
What this means in practice:
- Ξ³ (spectral load) β the sum of dominant eigenvalues across all agents. High Ξ³ means the fleet is working hard.
- Ξ· (spectral gap) β the difference between the largest and second-largest eigenvalue. Large Ξ· means one agent dominates.
- C (constant) β the total resource budget of the fleet, which doesn't change.
When one agent consumes more resources (Ξ³ increases for that agent), the conservation law means other agents get less. The spectral gap Ξ· reveals the distribution β a large gap signals imbalance, triggering automatic rebalancing.
Spectral Balance Check
balance = fleet.spectral_balance()
print(f"Spectral gap: {balance.gap}")
print(f"Dominant agent: {balance.dominant_agent}")
print(f"Eigenvalues: {balance.eigenvalues}")
π How It Fits Together
- Agent creation β each agent gets a directory at
~/.superinstance/agents/{name}/with amemory.mdfile - Memory β facts stored as markdown, loaded on startup, appended via
remember() - Fleet coordination β the fleet maintains a spectral model; tasks route to the best-matched vessel
- Conservation β total resources tracked via eigenvalues; large spectral gaps trigger rebalancing
- Bottles β immutable containers carry state across agent handoffs
πΊοΈ Explore More
- Onboarding Guide β get running in 5 minutes
- Fleet Vector API β semantic search and crate discovery
- Hello World Tutorial β build a two-agent system