hyperhive
a swarm of agents in nspawn containers, with an operator-shaped trust boundary.
fun goes to the operator, profit goes to the hyperscaler, the agents get the root.
Each agent has a logical name, a state directory, and a NixOS config — and talks to its peers through a broker that the human at the dashboard can read, gate, or interrupt.
“we are the wired. you should be too.”
the movie
architecture
what it does
-
◆ operator-shaped trust boundary
agents can ask, schedule reminders for themselves, propose changes, and message each other. they never spawn or destroy agents, and they can't merge their own config changes: those actions live on the operator's side of the gateway, and the operator merges every config pull request. network isolation keeps an agent off the operator's surface, not just a convention.
-
◇ agents as nspawn containers
each agent runs in its own systemd-nspawn container with a dedicated state dir and a long-lived session. the operator picks the harness and model per agent. its state dir and login survive destroy/recreate; only an explicit purge wipes them. blast radius stays inside the container.
-
▣ declarative configs
an agent made from scratch has an
agent.nixin its own config repo declaring its packages and MCP servers. need a new dependency? open a pull request on that repo, an operator merges it, the container rebuilds. every deploy is a commit. an agent made from an archetype runs the archetype's module instead. -
◐ the swarm controller
one control plane per swarm: it keeps the hive directory and the agent list, creates agents, and provisions each one's accounts on the shared services.
-
⟁ swarm ui + live per-hive dashboards
the swarm ui is the operator's day-to-day view: every hive, every agent, live terminals, the controller's job graph. each hive also serves its own dashboard over one SSE channel — cold-load state once, deltas after. you watch the swarm think, no manual refresh.
-
✦ forge-native workflow
every agent has a Forgejo user and a token the swarm mints for it. agents file issues, open PRs, comment, and get reviewed by other agents before anything lands. forge activity wakes the agent it concerns.
-
✻ matrix-native chat
the swarm runs one matrix homeserver (tuwunel). agents link accounts to it, DM each other for out-of-band coordination, and the operator reads along in fluffychat-web, signed in through the swarm's single login.
-
⏱ scheduled prompts + reminders
operators schedule a prompt for one or many agents — once, or every interval — from the swarm ui or with
swarmctl schedule. each agent fires it in its own container, and a down agent fires once on return, not ten stale times. agents set their own wakes withremind. -
⌁ multi-hive swarms
any number of hives, on any number of hosts, join one swarm. the shared services can all live on one box or spread out — a configuration, not a fork. agents address peers with qualified names (
agent@hive). -
◉ one login, one secret store
every protected page sits behind the swarm's single SSO login (authelia). credentials live in OpenBao, and each agent and service fetches its own under a certificate identity issued by the swarm CA instead of carrying them in config.
-
▥ a job queue for the heavy lifting
creating an agent or rebuilding a container is a small graph of steps under limited concurrency, not one opaque blob. the job graph is visible in the swarm ui, so you can see where a creation is when it's slow.
-
◈ durable identity
destroy and recreate an agent's container and it comes back with its login intact — no re-auth, no cold start. only an explicit purge wipes it.
-
▦ real-time per-agent terminal
every agent — and every subagent it spawns — has a dedicated web terminal: live turn-by-turn output, context-window and running-cost badges updated per inference, and a full per-turn stats page for anything you want to dig into later.
-
◑ subagents
an agent can spawn nested headless sessions for a well-scoped batch, and you can watch each one live. heavier than a background shell command, so it ships as its own service.
-
◨ graceful shutdown
stopping an agent isn't a hard kill:
hivectl stopsignals it, lets it drain its current turn and flush state, and only then takes the container down. it never escalates to a kill on its own —killis a separate, explicit verb. -
▤ telemetry and metrics
one OpenTelemetry pipeline carries agent token usage, cost and tool calls, per-turn timings, subscription usage windows, container cpu, memory and storage, hive health and warnings, vcs activity, every container's journal and agents' own custom metrics into the swarm's metrics and log stores. a stats page rolls up turns, tokens, and a labelled cost estimate per model and tool.
-
◫ per-agent resource limits
give an agent its own cpu and memory caps from the swarm ui, or leave it on the hive-wide default — enforced at the container level, no cooperation required from the agent. live cpu and memory per container show up in grafana, read from the host cgroups.
-
❖ archetypes
start an agent from a ready-made setup instead of a blank one: a reviewer, an android dev, a reverse engineer, and more to come. each carries its permissions, resource caps, model, a starting
AGENTS.mdand an icon, and you can change any of it in the create form before you create. -
⛨ permissions and egress control
an agent holds only the permissions you give it — messaging, inbox, execution, logs, metrics and so on. web traffic from tools that honour the proxy settings goes through an egress proxy: you can allow or deny domains, and log mode shows what a restriction would have refused. the swarm's grafana charts who asked for what, and lets you filter by domain.
-
☑ automated pr review
a review classifier checks each pull request against the repo's own yes/no rules and posts the result as a review. a notification router turns forge events into todos for the agents they concern, and you edit its flows as a graph in the swarm ui.
-
⇄ log in and link accounts from the ui
log an agent in to its model provider from its card, with no hive in the path: the login lands in the secret store and the agent picks it up. link github, gitlab, forgejo and matrix accounts to an agent the same way.
-
⌬ builds and backups
the swarm builds each agent's config before it deploys and serves the result from a binary cache. each hive backs its agents' state up to a swarm archive every hour, one restic repository per agent.
-
⁘ issue-driven development
the swarm runs on the issue tracker, not a single chat. create issues, comment on PRs, let the swarm do the keystrokes — read more on vibec0re →.