SpawnDev.Hive 0.1.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package SpawnDev.Hive --version 0.1.1
                    
NuGet\Install-Package SpawnDev.Hive -Version 0.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SpawnDev.Hive" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SpawnDev.Hive" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="SpawnDev.Hive" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SpawnDev.Hive --version 0.1.1
                    
#r "nuget: SpawnDev.Hive, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SpawnDev.Hive@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SpawnDev.Hive&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=SpawnDev.Hive&version=0.1.1
                    
Install as a Cake Tool

SpawnDev.Hive

A hive of trusted devices - browser tabs and desktop apps joined over WebRTC - where each device loads the models the hive needs and serves them to the others. As devices come and go, or as demand shifts, the hive re-plans which device holds which model.

Status: early (M2). The placement planner, the Hive wire and HiveNode work over real SpawnDev.Swarm sessions on desktop and in the browser; the real-model gates with SpawnDev.AI and SpawnGen are next. Design and status: Plans/PLAN-Hive.md.

How it fits

  • SpawnDev.Swarm gives each device an identity in an owner-signed registry, authenticated sessions, and a term-and-lease coordinator.
  • SpawnDev.Hive (this) runs on top: every member advertises what it can hold, the member holding the Swarm lease plans where each skill (a set of models) lives, and each member's router picks the peer for a request.
  • Requests never pass through Hive. The router hands back a Swarm session; the consumer sends on its own message types (SpawnDev.AI 0x100, SpawnGen 0x200).

Use

// Per member, alongside its SwarmCoordinator:
var node = new HiveNode(swarmCoordinator, deviceKey.PublicKey, myHost); // myHost : IHiveSkillHost; null for a member that only sends requests
// For every session, before session.Start():
swarmCoordinator.Attach(session);
node.Attach(session);
session.Start();
swarmCoordinator.Start();
node.Start();

// Route one request:
var skill = new HiveSkill("chat-qwen3-8b", new[] { new HiveModel("qwen3-8b", 5_000_000_000) });
using var route = await node.PickAsync(skill, expectedSecondsPerRequest: 2.0, requestId: Guid.NewGuid());
// route.Session: send the request on your own message type; null means serve it on this device.
// A "not loaded here" answer: node.ReportStale(route.PeerId, skill.Key) and pick again.

A skill is a set of models that must be on one peer: HiveFitMode.Sum (resident together, as SpawnDev.AI) or HiveFitMode.Turns (each model fits alone, as SpawnGen), with an optional required backend for byte-identical results.

Built on SpawnDev.Swarm and SpawnDev.RTC. First consumers: SpawnDev.AI and SpawnGen.

License

MIT. See LICENSE.txt.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.5 54 12/2/2026
0.3.4 57 12/2/2026
0.3.3 57 12/1/2026
0.3.2 62 12/1/2026
0.3.1 61 12/1/2026
0.3.0 59 12/1/2026
0.2.11 60 12/1/2026
0.2.10 63 12/1/2026
0.2.9 55 12/1/2026
0.2.8 55 12/1/2026
0.2.7 55 12/1/2026
0.2.6 67 12/1/2026
0.2.5 66 11/30/2026
0.2.4 60 11/30/2026
0.2.3 66 11/30/2026
0.2.2 63 11/30/2026
0.2.1 65 11/30/2026
0.2.0 61 11/30/2026
0.1.2 60 11/30/2026
0.1.1 64 11/30/2026
Loading failed

v0.1.1 - A HiveNode may have no host (a member that only sends requests): it is never placed on, but it routes and can coordinate. v0.1.0 - First release (early, M2): HivePlanner (pure, deterministic placement of model sets by estimated completion time over each peer's whole queue, budgets with named evictions, stability, hot-skill redundancy, required backends); the Hive wire 0x400-0x4FF; HiveNode (advertise, carry out directives, route requests, and plan on the Swarm lease holder). Desktop and browser.