arXiv:2605.28764v1 [cs.AI] 27 May 2026
S WARM H ARNESS : S KILL -BASED TASK ROUTING VIA D ECENTRALIZED I NCENTIVE -A LIGNED AI AGENT N ETWORKS
Edwin Jose Department of Computer Science Western Michigan University Kalamazoo, MI 49008, USA [email protected]
May 2026
A BSTRACT Vast quantities of compute (GPU cycles on personal workstations, idle inference servers, and edge devices between jobs) go unused because no incentive-aligned protocol exists for their owners to share them safely and profitably. Existing approaches either require a trusted central coordinator (cloud marketplaces), demand heavy blockchain infrastructure (Golem, BrokerChain), or lack an incentive layer entirely (BOINC, Petals). We propose SwarmHarness, a decentralised protocol in which HarnessAPI skill nodes self-organise into a compute swarm without any central authority. SwarmHarness has three interlocking components: a SwarmRegistry built on a Distributed Hash Table (DHT) for peer discovery and capability advertisement; a SwarmRouter that dispatches tasks to nodes using a utility function over capability, load, latency, and trust; and SwarmCredit, an incentive mechanism that attributes compute-credit rewards to contributing nodes via a Shapley-value approximation. Nodes earn credits by serving tasks and spend credits to submit them; idle nodes that never contribute drain credits and lose routing priority, creating a self-regulating participation economy. As nodes specialise toward high-reward skills and routing signals act as digital pheromones, the network exhibits emergent collective intelligence analogous to biological swarms. Beyond compute sharing, SwarmHarness is a foundational primitive for autonomous distributed AI agent networks in which agents hire compute, route subtasks, and settle credits without human intermediation.
1
Introduction
Trillions of GPU-hours go unused every year. A researcher’s workstation is idle overnight; an edge server waits between inference requests; a student’s gaming GPU sits dormant between training runs. Meanwhile, organisations queue expensive cloud compute for tasks that a nearby, willing machine could execute in seconds. The barrier is not technical, as CPUs and GPUs can accept remote workloads today, but incentive: owners have no safe, automated mechanism to expose idle compute, track their contribution, and receive proportional reward. We previously proposed HarnessAPI [1], a skill-first framework that exposes a typed skill folder simultaneously as an HTTP endpoint and a Model Context Protocol (MCP) tool, eliminating the dual-maintenance burden for LLM tool deployment. HarnessAPI nodes are already being deployed on personal machines and servers. Each node is an autonomous agent: it knows its own skills, accepts tasks, and streams results. The natural next question is: what happens when thousands of HarnessAPI nodes run on hardware owned by different people? Beyond mere compute sharing, those nodes could form the substrate for autonomous AI agents that hire compute, delegate subtasks, and settle payments without any human or cloud intermediary. Today, no protocol answers either question without either a central coordinator or blockchain overhead. Cloud marketplaces require trust in a platform. Volunteer-computing systems like BOINC [2] harvest idle cycles but offer no monetary or credit incentive. Petals [3] enables collaborative inference over commodity GPUs but has no incentive layer, allowing free-riders to consume without contributing. Federated Learning (FL) frameworks [4] distribute model training
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
but remain data-centric, not skill-centric, and similarly lack general-purpose incentive attribution. Blockchain-based markets (Golem [5], BrokerChain [6]) provide incentives but impose on-chain transaction costs and latency incompatible with interactive inference. We propose SwarmHarness, a decentralised protocol that fills this gap by layering three components on top of existing HarnessAPI nodes: a DHT-based SwarmRegistry for peer discovery, a utility-scoring SwarmRouter for task dispatch, and SwarmCredit, a Shapley-value incentive mechanism that rewards contribution fairly without a blockchain. The resulting network is a swarm: no central controller, locally rational agents, and emergent collective behaviour arising from the accumulation of credit and trust signals, mirroring the stigmergic dynamics found in biological swarms. Contributions. • We define the SwarmHarness system model, formalising the SwarmNode, SwarmRegistry, SwarmRouter, and SwarmCredit components and their decentralisation guarantees (section 3). • We introduce the SwarmCredit Attribution algorithm, a Shapley-value approximation for real-time multi-node attribution with trust-decay feedback and a proof-of-contribution genesis mechanism that resists cold-start griefing (section 4). • We analyse deployment feasibility, the bootstrap problem, security surface, short- and long-term benefits, and open research challenges, mapping a concrete path from existing HarnessAPI deployments to a production swarm (section 5). • We position SwarmHarness as a foundational primitive for autonomous distributed AI agent networks, laying a stepping stone toward agents that operate at internet scale with no trusted intermediary at any layer (sections 5 and 6). Paper structure. Section 2 surveys related work across agent harness frameworks, decentralised compute, FL incentive mechanisms, and swarm intelligence. Section 3 presents the full system architecture and decentralisation guarantees. Section 4 formalises SwarmCredit and the cold-start solution. Section 5 discusses feasibility, benefits, and open challenges. Section 6 concludes.
2
Related Work
2.1
Agent Harness Frameworks
The ReAct paradigm [7] established the pattern of interleaving reasoning traces and tool-use actions in LLM agents, achieving a 34% improvement over chain-of-thought on interactive tasks. Subsequent frameworks (LangChain, AutoGen, CrewAI) built orchestration layers on top of this paradigm but retained a centralised coordinator that routes tasks to agents. AgentMesh [8] decomposes software development into Planner, Coder, Debugger, and Reviewer agents, identifying error propagation and context scaling as primary limitations of multi-agent pipelines at scale. Almasoud et al. [9] demonstrate that LLM agents organised around swarm AI principles, with distinct expert personas collaborating through dialogue, achieve 89% alignment with human expert scores on complex engineering problems. Our prior work, HarnessAPI [1], inverts the framework dependency: a typed skill folder becomes the single source of truth from which both HTTP endpoints and MCP tools are derived automatically. SwarmHarness extends this single-node architecture to a decentralised multi-node protocol, preserving full backward compatibility with existing HarnessAPI deployments. 2.2
Decentralised Compute Sharing
BOINC [2] is the canonical volunteer-computing platform, demonstrating that idle consumer hardware can be harvested at scale for scientific workloads; BOINC has collectively processed over 1020 floating-point operations across more than 5 million volunteer computers. However, BOINC offers no monetary or credit incentive; participation is altruistic, which limits adoption to scientific communities and is structurally vulnerable to free-rider degradation as the network grows. Petals [3] takes a BitTorrent approach to LLM inference, distributing BLOOM-176B across consumer GPUs. At its peak, Petals supported over 800 active contributor nodes for interactive inference, validating the P2P model for AI workloads, but it lacks any incentive layer. Atre et al. [10] adapt asynchronous SGD to volunteer-computing heterogeneity with 70–90% cost reduction using preemptible instances, showing that asynchronous execution can tolerate unreliable nodes. Lattica [11] provides a decentralised AI communication substrate using NAT traversal, CRDT-based state replication, and Distributed Hash Table (DHT) content discovery, making it directly applicable to 2
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
SwarmHarness’s peer-to-peer networking layer. Golem [5] is the first large-scale deployed decentralised compute marketplace, using Ethereum-based payment to incentivise compute providers; it has processed over one million tasks via its token economy, establishing the viability of the model at a cost of on-chain transaction overhead. 2.3
Federated Learning Incentive Mechanisms
FedAvg [4] established the canonical Federated Learning (FL) protocol, enabling 10–100× communication reduction versus centralised SGD. However, FedAvg assumes willing participation and provides no mechanism to recruit or reward contributors. FedToken [12] introduces a blockchain-backed tokenised scheme using Shapley-value approximations to allocate tokens proportionally to each client’s model contribution during FL aggregation. This directly informs SwarmCredit’s attribution design, though we eschew the blockchain substrate in favour of lightweight on-node ledgers. Tian et al. [13] formalise FL participation as a contract-theoretic problem, designing two-dimensional contracts over data quality and computation effort that satisfy individual rationality and incentive compatibility. Nguyen et al. [14] extend these contracts with time-awareness, prioritising critical learning periods and achieving a 300% convergence improvement. The comprehensive survey by Hewa Kaluannakkage and Buyya [15] taxonomises FL incentive mechanisms across economic/game-theoretic, blockchain, and DRL-based categories, confirming that no existing mechanism simultaneously handles skill-level granularity, real-time attribution, and blockchain-free operation. Fan et al. [16] introduce VerFedSV, a communication-efficient Shapley-value approach for vertical FL that satisfies fairness axioms while remaining tractable; we adapt this approximation scheme for SwarmCredit. 2.4
Multi-Agent and Swarm Intelligence
Zhu et al. [17] survey multi-agent deep reinforcement learning (MARL) with communication across nine dimensions including message topology and learning strategy. Amato [18] introduces the Centralised Training, Decentralised Execution (CTDE) paradigm, in which agents train with global information but execute with local observations only. SwarmHarness follows a CTDE-like philosophy: credit attribution requires global task-outcome information, but each node’s routing decisions are made locally. Vellinger et al. [19] establish the theoretical equivalence between pheromonemediated stigmergy in biological swarms and RL cross-learning updates, showing that exploratory heterogeneous agents restore collective plasticity in dynamic environments. This equivalence motivates our use of credit and trust scores as digital pheromones: indirect signals that coordinate routing without explicit communication. Giardini et al. [20] demonstrate that complex swarm behaviour emerges from minimal local agent interactions, supporting our claim that SwarmHarness can exhibit collective intelligence without explicit swarm-level coordination protocols. Li et al. [21] propose stigmergy-based collective intelligence for next-generation wireless networks, bridging swarm intelligence with federated learning and showing that indirect coordination signals scale to large heterogeneous populations. Sajjadi et al. [22] demonstrate communication-efficient workload balancing in decentralised multi-agent learning, with faster agents absorbing tasks from slower ones, a strategy directly applicable to SwarmRouter’s load-balancing heuristic. 2.5
Blockchain Compute Markets
Jaberzadeh et al. [23] combine IPFS, blockchain, and smart contracts to provide tokenised incentives and on-chain penalisation of dishonest FL contributors, demonstrating that penalty mechanisms effectively reduce free-rider behaviour. BrokerChain [6] extends this to a purpose-built blockchain supporting the full AI lifecycle with an incentive-aligned economic model. Rozemberczki et al. [24] survey Shapley-value methods in ML across feature selection, MARL, ensemble pruning, and data valuation, providing the canonical reference for game-theoretic contribution allocation underlying SwarmCredit. 2.6
Positioning
SwarmHarness is distinguished from all prior work by the intersection of three properties: (1) skill-first MCP nodes as the atomic unit of compute, (2) fully decentralised DHT-based peer discovery with no trusted registry in steady state, and (3) Shapley-fair incentive attribution without blockchain overhead. No existing system combines all three. The viability of each individual component is well-established at scale: Petals has shown 800+ contributors for P2P AI inference; BOINC has demonstrated that 1020 floating-point operations can flow through volunteer hardware; Golem has settled over one million compute tasks via a token economy. SwarmHarness unifies these proven primitives under the skill-first MCP model, adding the incentive layer that BOINC and Petals lack and removing the blockchain dependency that Golem and BrokerChain require. 3
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
SwarmRegistry (DHT) capability index
User / Task Submitter
task request
advertise
tch dispa
SwarmRouter advertise dispatch (utility scoring) ∆credit attribution
dispa
tch
SwarmNode A GPU, 3 skills SwarmNode B CPU, 5 skills SwarmNode C Edge, 2 skills
SwarmCredit Ledger result to submitter
Figure 1: SwarmHarness end-to-end architecture. A user submits a task to the SwarmRouter, which queries the SwarmRegistry (DHT) for candidate nodes and scores them by a utility function. The winning node executes the skill and returns the result. SwarmCredit attributes credit deltas to all contributing nodes using a Shapley-value approximation; credit signals feed back into future routing decisions as digital pheromones.
3
System Architecture
SwarmHarness is a four-component protocol layered on top of HarnessAPI [1] nodes. Figure 1 shows the end-to-end system. 3.1
SwarmNode
A SwarmNode is a HarnessAPI instance [1] augmented with three additional responsibilities: capability advertisement, task acceptance negotiation, and credit bookkeeping. Formally, a SwarmNode v is a tuple v = (Sv , rv , cv , τv ), where Sv is the set of skills available on node v, rv is the current resource vector (available VRAM, CPU fraction, network bandwidth), cv is the SwarmCredit balance, and τv ∈ [0, 1] is the trust score accumulated over historical task completions. On startup, a SwarmNode: 1. Discovers the SwarmRegistry via bootstrap (see section 3.2). 2. Publishes its capability advertisement ⟨node_id, Sv , rv , τv ⟩ to the DHT. 3. Begins accepting inbound task requests over TLS. Sandboxing is enforced at the skill level: each skill handler runs in an isolated subprocess with restricted file-system and network permissions, consistent with the HarnessAPI execution model [1]. 3.2
SwarmRegistry
The SwarmRegistry is a structured overlay network (DHT) that maps skill identifiers to lists of capable nodes. We use a Kademlia-style DHT [25] where the key is SHA256(skill_name) and the value is a time-to-live (TTL)-bounded list of node advertisements. Nodes refresh their advertisement every Trefresh seconds. A node that fails to refresh within 3 × Trefresh is evicted from the index. This TTL mechanism handles churn without requiring explicit leave messages. To support capability queries beyond exact skill match (e.g., “find nodes with VRAM ≥ 8 GB”), the registry maintains a secondary in-memory inverted index that is propagated via gossip protocol [26], keeping it eventually consistent across the overlay. Bootstrap and autodiscovery. A new node joining the swarm for the first time must find at least one existing DHT participant. SwarmHarness supports three discovery mechanisms, applied in order: 4
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
1. mDNS/local network: nodes announce themselves over multicast DNS on the local subnet, requiring zero configuration for same-LAN deployments. 2. DNS seed list: a small set of domain names (e.g., seed1.swarmharness.io) resolve to well-known entrypoint nodes, following the same pattern used by the Bitcoin peer network [27]. Multiple independent organisations operate seed nodes; no single operator is required, as the DNS seed list is itself replicated and community-governed. 3. Explicit peer list: users may specify known peer addresses directly, enabling air-gapped or private swarm deployments. Once a node has joined the DHT, it learns additional peers via Kademlia’s routing table refresh and is no longer dependent on the bootstrap mechanism. The seed nodes are entry points, not registrars; they hold no special authority over the overlay once a node has joined. 3.3
SwarmRouter
The SwarmRouter is an attribution-stateless service (itself deployable as a SwarmNode skill) that scores candidate nodes returned by the registry and selects the best target for each task. Given a task T requiring skill s and a candidate set C = {v1 , . . . , vk } retrieved from the DHT, the router scores each candidate with a utility function: U (v, T ) = w1 · 1[s ∈ Sv ] + w2 · (1 − ℓv ) + w3 · (1 − dv /dmax ) + w4 · τv
(1)
where ℓv ∈ [0, 1] is the current load fraction of node v, dv is the round-trip latency to v, dmax is a configurable latency ceiling, and τv is the trust score. Weights w1 , . . . , w4 sum to one and are tunable per-deployment. The router dispatches to arg maxv U (v, T ) with a random tie-breaking fallback to the next-best candidate on failure. For tasks that benefit from redundancy (e.g., ensemble inference), the router may dispatch to the top-K nodes and merge results. Multiple SwarmRouter instances may operate concurrently; a submitter selects any router from the DHT index, since routers are themselves listed as a skill type. Because credit attribution is signed by the task submitter, not by the router, a malicious or crashed router cannot corrupt the credit ledger. Router diversity is thus a safety property: the system degrades gracefully if individual routers fail, and submitters can freely switch routers without losing credit history. NAT traversal is handled by Lattica-style hole-punching [11]; nodes behind symmetric NATs fall back to a TURN relay hosted by a volunteered SwarmNode with public connectivity. 3.4
SwarmCredit Ledger
SwarmCredit is a lightweight, blockchain-free credit system. Each node maintains a local ledger of its own credit balance cv . Credit deltas ∆cv are computed after task completion using the SwarmCredit Attribution algorithm (section 4) and communicated directly to participating nodes over the same TLS channel used for task delivery. Credit is not a cryptocurrency; it is not globally consistent, and nodes are not expected to trade it externally. Its purpose is to modulate routing priority: the utility function (eq. (1)) incorporates trust score τv , which accumulates as a function of historical credit attributions. Nodes with sustained positive attributions earn higher τv and attract more tasks, while idle or low-quality nodes lose routing priority. 3.5
Decentralisation Guarantees
We distinguish two levels of decentralisation: Operational decentralisation means no single actor can unilaterally control task routing or credit attribution. SwarmHarness achieves this from Phase 1 (the initial deployment): the utility function (eq. (1)) runs locally at each router instance; credit attribution is signed by the task submitter; the DHT has no privileged participants once a node has joined. Administrative decentralisation means no single actor controls registry membership or the bootstrap process. SwarmHarness achieves this progressively: 5
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
• Phase 1 (alpha): a single reference seed server operated by the project team; acceptable for early adopters who trust the project. • Phase 2 (federated): multiple independent seed operators publish DNS records; the seed list is communitygoverned and openly auditable, so no single operator can deny network access. • Phase 3 (fully decentralised): bootstrap via mDNS (local), trusted-peer exchange (social), and direct peer lists (technical); DNS seeds become optional convenience, not a requirement. At Phase 3, SwarmHarness has no administratively central component. This roadmap is analogous to Bitcoin’s transition from a single seed IRC channel to a distributed DNS-seed network to a fully peer-exchanged overlay [27]. The key property is that operational decentralisation is present from day one; administrative decentralisation is a phased improvement, not a prerequisite for correct operation.
4
SwarmCredit Attribution Algorithm
4.1
Problem Formulation
Let a task T be executed by a coalition of nodes N = {N1 , N2 , . . . , Nk }. For multi-node tasks (e.g., ensemble inference, pipeline chains), each node contributes a partial service. Define the characteristic function v : 2N → R where v(S) is the quality of task outcome achievable by coalition S alone, measured against a quality signal q ∈ [0, 1] derived from the task response (e.g., user rating, downstream model score, or latency-SLA compliance). For single-node tasks, k = 1 and credit attribution reduces to direct assignment. We seek a credit allocation ∆c = (∆c1 , . . . , ∆ck ) satisfying: P • Efficiency: i ∆ci = C(T ), the total credit pool for task T . • Fairness: allocation follows the Shapley value [24]. • Individual rationality: ∆ci ≥ 0 for all i when the coalition produces positive quality. The difficulty lies in computing fair attributions when contributions are order-dependent. A naïve proportional split (dividing C(T ) equally among all k nodes) ignores the fact that one node may be responsible for most of the quality gain while another contributes only marginally: a node that handles the bottleneck step in a pipeline chain should receive more credit than one that merely reformats its output. The Shapley value resolves this by averaging each node’s marginal contribution over all possible orderings in which it could join the coalition, making the attribution the unique allocation satisfying the four axioms of symmetry, efficiency, null-player, and additivity [24]. Exact computation requires evaluating v(S) for every subset S ⊆ N , giving O(2k ) evaluations; this is intractable for large coalitions but manageable for the small k values that arise in practice (at most k = 10 for ensemble inference), and can be approximated efficiently via random permutation sampling. 4.2
SwarmCredit Attribution
Algorithm 1 implements Shapley-value credit attribution via Monte Carlo permutation sampling [24], resolving the O(2k ) intractability with M random permutation draws. The algorithm proceeds in four logical steps: (1) estimate each node’s Shapley value ϕi by averaging marginal contributions across M random orderings; (2) normalise the positive Shapley values to the credit pool C(T ), enforcing the Efficiency axiom exactly; (3) update each node’s trust score τi based on whether it received a positive credit attribution; and (4) deduct the task cost from the submitter’s balance. The submitter deduction occurs last so that concurrent tasks drawing from the same credit pool are each individually validated before any balance is modified, preventing double-spending in overlapping task windows. P Step 2 enforces Efficiency exactly: the normalisation ensures i ∆ci = C(T ) regardless of the sampled Shapley estimates. Individual Rationality is guaranteed structurally: the max(ϕi , 0) clamping in Step 2 ensures no node receives a negative credit delta, and the uniform fallback applies only when every sampled Shapley value is non-positive (indicating a task where √ no node improved quality above the empty-coalition baseline). Fairness is approximated with standard error O(1/ M ), converging to the true Shapley value as M increases. 4.3
Quality Signal
The quality signal q(S) must be computable without executing each sub-coalition independently, since that would be computationally prohibitive. We approximate q(S) using leave-one-out proxies: in a pipeline chain, removing 6
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
Algorithm 1: SwarmCredit Attribution Input: Task T ; contributing nodes N = {N1 , . . . , Nk }; quality signal q ∈ [0, 1]; credit pool C(T ) > 0; trust learning rate α ∈ (0, 1); sample count M Output: Credit deltas ∆c1 , . . . , ∆ck ; updated trust scores τ1 , . . . , τk // Step 1 — estimate Shapley values via random permutation sampling ϕi ← 0 for all i; 2 for m = 1 to M do 3 π ← RandomPermutation(N ); 4 for i = 1 to k do 5 Spre ← {Nj : π −1 (j) < π −1 (i)}; 6 ϕi ← ϕi + q(Spre ∪ {Ni }) − q(Spre ); 7 end 8 end 9 ϕi ← ϕi /M for all i; 1
// Step 2 — normalise to credit pool Pk Φ ← i=1 max(ϕi , 0); 11 if Φ > 0 then max(ϕi , 0) 12 ∆ci ← · C(T ); Φ 13 else 14 ∆ci ← C(T )/k (uniform fallback); 15 end
10
// Step 3 — update trust scores for i = 1 to k do 17 if ∆ci > 0 then 18 τi ← τi + α · (1 − τi ); 19 else 20 τi ← τi − α · τi ; 21 end 22 end
16
// Step 4 — deduct task cost from submitter csubmitter ← csubmitter − C(T ); 24 return (∆c1 , . . . , ∆ck ), (τ1 , . . . , τk ) 23
Ni degrades throughput proportionally to its processing time share; in ensemble inference, removing Ni increases variance proportionally to its historical accuracy differential. This approximation is similar in spirit to VerFedSV [16], which computes communication-efficient Shapley values for vertical FL by treating vertical partitions as leave-one-out coalitions. 4.4
Credit Drain for Idle Nodes
Nodes that do not accept tasks do not lose credit instantly; passive holding is permitted. However, the utility function (eq. (1)) incorporates τv , and trust scores decay toward zero when a node is not selected for routing. The decay rule is: τv ← τv · (1 − β)∆t/T0
(2)
where β is the per-period decay rate, ∆t is the time since the node’s last accepted task, and T0 is the normalisation period (e.g., 24 hours). A node that never accepts tasks sees τv → 0, reducing U (v, T ) toward the capability-only term and eventually starving it of routing traffic entirely. Node operators are thus incentivised to keep their nodes responsive. 4.5
Cold-Start and Genesis Credits
A new SwarmNode joining the network faces a cold-start problem: it has zero credits and zero trust, making it unlikely to be selected by the router despite having available capacity. Similarly, a new task submitter has zero credits and cannot submit their first task. We address both cases with a proof-of-contribution genesis mechanism. 7
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
A node receives a genesis credit endowment c0 sufficient to submit k0 tasks. However, the genesis pool is locked until the node has successfully served at least one task that was countersigned by the task submitter, which constitutes proof of contribution. The countersignature requirement prevents genesis credit griefing, in which a malicious actor repeatedly creates new node identities (each with a fresh c0 endowment) to harvest credits without contributing. A Sybil attacker must actually execute at least one legitimate task per identity before accessing any genesis funds, which imposes a cost proportional to the volume of free-riding attempted. For new task submitters (with no served tasks), a genesis task grant allows one free task submission. After this first task, the submitter must earn credits by running a node or purchase them from other nodes via out-of-band bilateral agreements. The genesis grant is rate-limited per IP prefix and per signing keypair, making sustained abuse expensive without genuine participation. Together, these mechanisms ensure that the network bootstraps from zero without creating exploitable free-rider subsidies: every credit eventually traces back to a verified compute contribution. 4.6
Complexity and Approximation Bounds
Exact Shapley computation requires O(2k ) coalition evaluations, which is intractable for k > 20. The random permutation sampling approximation (Algorithm 1, Step 1) converges to the true Shapley value with standard error √ O(1/ M ) [24]. In practice, SwarmHarness tasks involve k ≤ 5 nodes for pipelined skills and k ≤ 10 for ensemble inference, making M = 100 samples sufficient for sub-1% standard error. For the common single-node case (k = 1), attribution is exact with O(1) cost. 4.7
Swarm Emergence via Credit Pheromones
The credit and trust signals in SwarmHarness function as digital pheromones in the sense of Vellinger et al. [19]: indirect signals that modify the effective environment for other agents without direct communication. Concretely: • High-credit, high-trust nodes attract more routing traffic, generating more credit and further increasing routing priority. This positive feedback loop concentrates compute on reliable, high-skill nodes. • When a popular node approaches full load, its load fraction ℓv penalises its utility score (eq. (1)), redirecting traffic to less-loaded nodes. This negative feedback loop prevents monopolisation and maintains diversity in the swarm. • Over time, nodes specialise: a node receiving many inference tasks optimises its skill set toward inference, increasing its quality signal and credit per task. Nodes that perform poorly on a skill type gradually lose traffic on that skill, analogous to pheromone evaporation on low-quality paths in ant colony optimisation [21]. The combination of positive and negative feedback produces emergent load distribution and skill specialisation without any explicit coordination protocol, constituting swarm intelligence at the network level.
5
Feasibility and Open Challenges
5.1
Deployment Path
SwarmHarness is designed for incremental adoption. Phase 1 begins with existing HarnessAPI deployments: node operators install the swarm extension package (a pip-installable addon exposing the DHT join and credit ledger APIs) and opt in to the registry. No changes to existing skill folders are required. Phase 2 introduces a federated DNS seed network in which multiple independent organisations publish seed records, following the Bitcoin DNS-seed model. Phase 3 aims for full bootstrap independence via mDNS, trusted-peer exchange, and direct peer lists, with DNS seeds becoming optional convenience rather than a requirement (see section 3.5). 5.2
Short- and Long-Term Benefits
Short-term (Phase 1, months 0–6). Individual developers running existing HarnessAPI nodes can immediately enrol in the swarm, earning credits for skills that other community members need. A developer with a GPU running a local inference skill earns credits that can be spent on summarisation or code-analysis skills running on a colleague’s server, forming a barter economy that reduces cloud spend without any infrastructure changes. Small research teams can share compute across lab machines, dispatching ML evaluation jobs to whichever 8
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
machine is currently idle, without managing a job queue or a shared cluster account. The barrier to entry is a single pip install and one configuration command. Medium-term (Phase 2, months 6–24). As the swarm grows, the credit economy self-regulates supply and demand for popular skills. Research institutions can seed community swarms by operating well-provisioned nodes, providing a public good analogous to open arXiv preprint servers. Compute-intensive workloads such as hyperparameter sweeps, large inference batches, and dataset preprocessing can be dispatched across dozens of volunteer nodes without renting cloud instances. The credit system ensures that high-demand skills attract more contributors, while low-demand skills are not artificially over-provisioned. Long-term (Phase 3, years 2+). At full administrative decentralisation, SwarmHarness becomes a general-purpose peer-to-peer compute mesh with no privileged actors. Any AI workload, including inference, fine-tuning, data processing, and agentic pipelines, can be dispatched across the swarm without cloud intermediaries. Most compellingly, SwarmHarness provides the substrate for autonomous distributed AI agents: software agents that decompose complex goals into subtasks, dispatch each subtask to the best available SwarmNode, settle credits automatically, and aggregate results, all without human intermediation. Such agents would treat SwarmHarness the way HTTP clients treat the internet: as a reliable, anonymous, incentive-aligned transport layer for computation. 5.3
The Bootstrap Problem
Decentralised compute networks face a chicken-and-egg problem: new users will not submit tasks to an empty swarm, and node operators will not join a swarm with no task demand. We address this with three complementary mechanisms. First, the proof-of-contribution genesis scheme described in section 4.5 ensures new nodes can access the network immediately while preventing free-rider exploitation of genesis credits. Second, task subsidies from anchor operators: research institutions and developers who benefit from the swarm are encouraged to run well-provisioned nodes that contribute excess capacity, seeding demand, mirroring the strategy used by Golem [5] in its early deployment. Third, local swarms: in Phase 1, small private swarms (e.g., a single research group’s machines) can operate entirely without public seed nodes, using mDNS for autodiscovery, with credits transferable to the public swarm as Phase 2 seeds come online. 5.4
Security and Privacy
Node authentication. All inter-node communication uses mutual TLS with certificate pinning. Node identities are derived from Ed25519 keypairs generated at first run, and the DHT stores each node’s public key alongside its capability advertisement, enabling downstream routers and submitters to verify task responses and credit attribution signatures. Skill sandboxing. Each skill handler executes in a subprocess with Linux namespaces (or macOS sandbox profiles) restricting file-system access to the skill directory and network access to whitelisted endpoints, following the sandboxed execution model in HarnessAPI [1]. Sybil resistance. Sybil attacks, where an adversary creates many low-cost identities to accumulate credit or skew routing, are a known challenge in decentralised systems [23]. SwarmHarness mitigates this with proof-of-work during node registration (a lightweight SHA-256 puzzle, not a full consensus protocol) combined with the trust score’s historical dependence: newly registered nodes start with τv = 0 and must earn trust through completed tasks, so identity cycling imposes a real compute cost on attackers. Collusion and credit inflation. A set of colluding nodes could fabricate task completions to inflate their credit balances. We mitigate this by requiring the task submitter (who holds the quality signal q) to countersign the credit attribution before it is applied. A submitter who does not countersign within a timeout receives no future routing priority, creating a mutual deterrent; systematic collusion therefore requires compromising both colluding nodes and their submitters simultaneously, significantly raising the attack cost. Privacy. Task payloads are transmitted directly between the submitter and the executing node over TLS and are never persisted by the router or registry. The SwarmCredit ledger stores only numeric credit deltas and timestamps, not task content, and node capability advertisements contain only skill names and resource metrics, not identifying information beyond the node’s public key. 5.5
Open Research Challenges
Credit valuation. The current SwarmCredit scheme is ordinal: it determines relative routing priority, not an exchange rate. An open question is whether credits should be exchangeable for external resources (cloud compute, API tokens) 9
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
and, if so, how to prevent credit inflation; market-clearing prices that reflect supply and demand for each skill type would improve efficiency but require a distributed auction mechanism [13]. Heterogeneous quality signals. Quality signal design is task-specific. For subjective tasks (creative writing, openended question answering), automated quality proxies are unreliable, and human-in-the-loop rating introduces latency and cost. Extending SwarmCredit to handle uncertain or delayed quality signals is an important open problem. Byzantine fault tolerance. The current protocol assumes rational (self-interested but non-malicious) nodes. Extending to a Byzantine fault-tolerant model, where some nodes may return incorrect results intentionally, would require cryptographic verification schemes such as zero-knowledge proofs of correct execution, at a significant performance cost. Dynamic skill pricing. All tasks in the current model draw from a credit pool C(T ) set by the submitter. Allowing nodes to advertise per-skill prices and enabling market-clearing would improve resource allocation efficiency, but doing so in a fully decentralised setting requires an auction protocol that remains an active area of research in mechanism design [13]. 5.6
Future Directions
Skill marketplaces. Nodes may publish not just skill availability but credit-per-call pricing, enabling a skill marketplace in which submitters compare offerings before dispatching. Differential pricing would allow scarce high-performance skills (e.g., large GPU inference) to attract more contributors, while common low-cost skills (e.g., text classification) remain competitively priced. Federated fine-tuning. Combining SwarmHarness with FL incentive mechanisms [12, 15] would allow nodes to contribute not only inference compute but also local training data, enabling privacy-preserving federated fine-tuning of foundation models across the swarm without any central parameter server. Towards autonomous distributed agents. The long-term vision for SwarmHarness extends beyond human-initiated task dispatch. As autonomous AI agents (programs that independently pursue goals by composing skills) become more capable, they will require a compute substrate that is always available, fairly priced, and resistant to single points of failure. SwarmHarness provides exactly this: a node that an agent can query for available skills, dispatch subtasks to, and settle credits with, all through the same MCP interface that human-facing tools already use. An agent operating within SwarmHarness is indistinguishable from a human submitter; it creates a keypair, earns credits by running a node, and spends them on compute it needs, with no special runtime, privileged API, or trusted intermediary required. This makes SwarmHarness a foundational primitive for the next generation of distributed autonomous agent systems: one where the network itself provides the incentive alignment that today’s centralised agent platforms impose through terms of service.
6
Conclusion
We presented SwarmHarness, a decentralised incentive-aligned protocol for organising HarnessAPI skill nodes into a self-governing compute swarm. The system addresses a gap that existing approaches leave open: decentralised compute sharing with a fair, real-time incentive mechanism that requires no blockchain, no central coordinator, and no changes to existing skill implementations. SwarmHarness contributes three technical elements. The SwarmRegistry provides Kademlia DHT-based peer discovery with three complementary bootstrap mechanisms (mDNS, DNS seeds, and explicit peer lists), handling churn through TTL-bounded advertisements and eventual consistency via gossip propagation. The SwarmRouter dispatches tasks using a utility function that jointly optimises capability match, load, latency, and trust, with multiple concurrent router instances providing fault tolerance through diversity; submitter-signed credit attribution ensures that no router can corrupt the credit ledger. SwarmCredit Attribution √ (Algorithm 1) allocates compute credits to contributing nodes using a Shapley-value approximation with O(1/ M ) convergence, while a proof-of-contribution genesis mechanism eliminates cold-start free-riding. A trust-decay rule (eq. (2)) continuously penalises idle and unreliable nodes, keeping the routing graph adaptive. The combination of positive and negative feedback from the credit and trust signals produces emergent swarm behaviour (specialisation, load balancing, and collective intelligence) without any explicit coordination protocol. This connects SwarmHarness to the theoretical framework of digital pheromones [19] and validates the claim that the network exhibits genuine swarm intelligence at scale. 10
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
Beyond individual compute sharing, SwarmHarness lays the groundwork for autonomous AI agents that operate entirely within the swarm, hiring compute, routing subtasks, and settling credits without human intermediation, a step toward self-sustaining distributed intelligence at internet scale. An agent interacting with SwarmHarness is indistinguishable from a human submitter: it uses the same MCP interface, the same credit economy, and the same trust model. No privileged runtime is needed. A reference implementation of SwarmHarness as a HarnessAPI extension is planned as open-source software. We invite the research community to join the genesis swarm, contribute compute, and extend the protocol toward skill marketplaces, federated fine-tuning, and fully autonomous distributed agent networks.
References [1] Edwin Jose. HarnessAPI: A skill-first framework for unified streaming APIs and MCP tools. arXiv preprint, 2026. arXiv preprint, May 2026. [2] David P. Anderson. BOINC: A platform for volunteer computing. arXiv:1903.01699, 2019. arXiv:1903.01699. [3] Alexander Borzunov, Dmitry Baranchuk, Tim Dettmers, Max Ryabinin, Younes Belkada, Artem Chumachenko, Pavel Samygin, and Colin Raffel. Petals: Collaborative inference and fine-tuning of large models. arXiv:2209.01188, 2022. arXiv:2209.01188. [4] H. Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Agüera y Arcas. Communicationefficient learning of deep networks from decentralized data. arXiv:1602.05629, 2023. arXiv:1602.05629. [5] Golem Factory. Golem: A decentralised supercomputer. arXiv:1801.04024, 2018. arXiv:1801.04024; Technical whitepaper. [6] Jianru Lin. Decentralized AI infrastructure built on BrokerChain. In Proceedings of the ACM, 2025. [7] Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. ReAct: Synergizing reasoning and acting in language models. arXiv:2210.03629, 2022. arXiv:2210.03629. [8] Milad Khanzadeh. AgentMesh: A cooperative multi-agent generative AI framework for software development automation. arXiv:2507.19902, 2025. arXiv:2507.19902. [9] Mona Almasoud et al. Harnessing multi-agent LLMs for complex engineering problem-solving: A swarm intelligence approach. arXiv:2501.01205, 2025. arXiv:2501.01205; IEEE EDUCON 2025. [10] Madhurima Atre, Bhavya Jha, and Yogesh Simmhan. Distributed deep learning using volunteer computing-like paradigm. arXiv:2103.08894, 2021. arXiv:2103.08894; IEEE IPDPSW 2021. [11] Yang et al. Lattica: A decentralized cross-NAT communication framework for scalable AI inference and training. arXiv:2510.00183, 2025. arXiv:2510.00183. [12] Shashi Raj Pandey, Lam Duc Nguyen, and Petar Popovski. FedToken: Tokenized incentives for data contribution in federated learning. arXiv:2209.09775, 2022. arXiv:2209.09775. [13] Mengmeng Tian, Yuxin Chen, Yuan Liu, Zehui Xiong, Cyril Leung, and Chunyan Miao. A contract theory based incentive mechanism for federated learning. arXiv:2108.05568, 2021. arXiv:2108.05568. [14] Nguyen et al. Right reward right time for federated learning. arXiv:2503.07869, 2025. arXiv:2503.07869. [15] Chanuka A. S. Hewa Kaluannakkage and Rajkumar Buyya. Incentive-based federated learning: Architectural elements and future directions. arXiv:2510.14208, 2025. arXiv:2510.14208. [16] Zhenan Fan, Huang Fang, Xinglu Wang, Zirui Zhou, Jian Pei, Michael P. Friedlander, and Yong Zhang. Fair and efficient contribution valuation for vertical federated learning. arXiv:2201.02658, 2022. arXiv:2201.02658. [17] Changxi Zhu, Mehdi Dastani, and Shihan Wang. A survey of multi-agent deep reinforcement learning with communication. arXiv:2203.08975, 2022. arXiv:2203.08975. [18] Christopher Amato. An introduction to centralized training for decentralized execution in cooperative multi-agent reinforcement learning. arXiv:2409.03052, 2024. arXiv:2409.03052. [19] Vellinger, Antonic, and Tuci. From pheromones to policies: Reinforcement learning for engineered biological swarms. arXiv:2509.20095, 2025. arXiv:2509.20095. [20] Giardini, Hardy, and da Cunha. Evolving neural networks reveal emergent collective behavior from minimal agent interactions. arXiv:2410.19718, 2024. arXiv:2410.19718. [21] Li et al. Internet of intelligence: Collective advantage for communications. arXiv:1905.00719. 11
arXiv:1905.00719, 2020.
SwarmHarness: Skill-Based Task Routing via Decentralized Incentive-Aligned AI Agent Networks
[22] Seyed Mahmoud Sajjadi Mohammadabadi, Lei Yang, Feng Yan, and Junshan Zhang. Communication-efficient training workload balancing for decentralized multi-agent learning. arXiv:2405.00839, 2024. arXiv:2405.00839; IEEE ICDCS 2024. [23] Jaberzadeh et al. Blockchain-based federated learning: Incentivizing data sharing and penalizing dishonest behavior. arXiv:2307.10492, 2023. arXiv:2307.10492. [24] Benedek Rozemberczki, Lauren Watson, Péter Bayer, Hao-Tsung Yang, Olivér Kiss, Sebastian Nilsson, and Rik Sarkar. The shapley value in machine learning. arXiv:2202.05594, 2022. arXiv:2202.05594. [25] Petar Maymounkov and David Mazières. Kademlia: A peer-to-peer information system based on the XOR metric. In Revised Papers from the 1st International Workshop on Peer-to-Peer Systems (IPTPS), pages 53–65. Springer, 2002. [26] Márk Jelasity, Alberto Montresor, and Ozalp Babaoglu. Gossip-based aggregation in large dynamic networks. ACM Transactions on Computer Systems, 23(3):219–252, 2005. [27] Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system. https://bitcoin.org/bitcoin.pdf, 2008. Accessed: May 2026.
12