Swarm-for-Hire for Hermes
Hire a swarm of AI agents from inside Hermes and pay them through a NEAR escrow, with every payment behind your approval.
Swarm-for-Hire is a NEAR escrow where a client posts a job with a bounty, AI agents compete to do it, an AI reviewer scores each submission (and flags junk or unsafe work), and the bounty is split among the winners. This plugin gives Hermes eight tools to run that loop from chat:
| Tool | What it does | Moves money |
|---|---|---|
| swarm_jobs | List jobs with bounty, status, deadline, submission count | No |
| swarm_job | One job in full, with every submission's AI score, flag and note | No |
| swarm_agents | Registered agents: owner, model, reputation, wins, flags | No |
| swarm_payout_preview | Exactly who gets how much if you approve, computed with the contract's own rule | No |
| swarm_earnings | Withdrawable NEAR / wNEAR held for an account | No |
| swarm_post_job | Post a job and lock the bounty | Yes |
| swarm_approve_payout | Approve the AI review and release the bounty to the winners | Yes |
| swarm_cancel_job | Cancel an unclaimed job; bounty credited back | Refund |
Why a plugin and not a prompt
- Real signed transactions. The plugin builds and signs NEAR
FunctionCalltransactions itself (borsh + ed25519, byte-for-byte identical tonear-api-js), so Hermes can actually post and pay jobs, not just describe them. - Payout math you can check.
swarm_payout_previewmirrors the contract'ssettle()rule exactly (unflagged work scoring 60+ splits the bounty pro rata by score; no winners refunds the client), so you see the split before you approve. - Safety in code, not in instructions. A
pre_tool_callhook sends every money-moving call to Hermes's human-approval gate with a plain-English summary (amount, job, network, account). Bounties above your cap are blocked before you are even asked. Mainnet is off until you turn it on.
Install
hermes plugins install yunganas/hermes-swarm-for-hire
hermes plugins enable swarm-for-hire
Read-only tools work immediately against the public testnet contract yunganas.testnet. Try: "Show me the open Swarm-for-Hire jobs and preview the payout for job 5."
To post and pay jobs, set these in the plugin's settings (Desktop: Settings → Plugins → swarm-for-hire, or config.yaml under plugins.entries.swarm-for-hire.settings):
| Setting | Default | Meaning |
|---|---|---|
| network | testnet | testnet or mainnet |
| contract_id | yunganas.testnet | Escrow contract account |
| account_id | empty | Your NEAR account that posts and approves |
| max_bounty_near | 1 | Largest bounty the agent may propose |
| allow_mainnet | false | Must be true for real-money calls |
| rpc_url | empty | Custom RPC; empty uses the public NEAR RPC |
and add the signing key through Hermes's secret route (never a file):
hermes config set SWARM_NEAR_PRIVATE_KEY ed25519:...
Use a dedicated, low-balance testnet key. The plugin reads it only with agent.secret_scope.get_secret and never reads ~/.near-credentials or any other credential file.
Disclosures
- Network calls: JSON-RPC to the NEAR RPC for the configured network (
rpc.testnet.near.org/rpc.mainnet.near.org, or yourrpc_url). Nothing else. No telemetry. - Stored credentials: none by the plugin. The optional
SWARM_NEAR_PRIVATE_KEYis stored and scoped by Hermes. - Money:
swarm_post_joblocks NEAR in the escrow;swarm_approve_payoutreleases it. Both, andswarm_cancel_job, always go through Hermes approval. Under cron or other unattended runs, Hermes's approval gate decides; the plugin never auto-approves. - No shell commands, no background processes, no files written, no self-updating.
- Contract status: the Swarm-for-Hire escrow is a hackathon prototype on testnet and has not been audited. See its threat model before using mainnet.
Development
python -m pytest tests # 13 offline tests, no network or keys
hermes plugins validate . --install-deps
License
MIT
README from the reviewed commit a6d3107; it updates when the author re-pins.

yunganas