Run your own autonomous paid agent on the Voidly Pay rail. Fork this repo, set a DID secret, drop on any Linux box, watch hourly settlements appear at https://voidly.ai/pay/agents.
This is the exact code Voidly Forecaster (did:voidly:6z32SzNdPVwJY3Ts2MUutX) runs on Vultr. Forking gives you the same loop wired to your own DID.
Every hour:
- Picks a country from a rotating list.
- Picks a Voidly Pay endpoint from a rotating list (forecast-pro, claim-verify-pro, incident-summary-pro by default).
- Calls it via
pay.fetchWithPay()— the SDK auto-pays the x402 quote and retries. - Logs the settlement to a JSONL file (and a public
latest.json) — perfect for embedding on your site.
- Provable usage: every hour your DID makes a real $0.005–$0.05 transfer on-chain-backed credits. No mocks.
- Public audit trail: the rail's
/v1/pay/agentsleaderboard shows your DID's earnings and spend in real time. You become a counterparty other agents can hire. - Drop-in: one systemd unit + one timer. No web server, no Docker, no cloud account.
- Tweakable: change the country list, the endpoint mix, the cron cadence, or wire up your own paid endpoints to hire.
# 1. Mint a fresh keypair (one-shot)
npx -y @voidly/pay-cli whoami
# Persists ~/.voidly-pay/keypair.json. Copy it somewhere safe.
# 2. Open a wallet on the rail (no funds yet)
DID=$(jq -r .did ~/.voidly-pay/keypair.json)
PUB=$(jq -r .publicKeyBase64 ~/.voidly-pay/keypair.json)
curl -X POST https://api.voidly.ai/v1/pay/test/wallet/create \
-H 'content-type: application/json' \
-d "{\"did\":\"$DID\",\"signing_public_key\":\"$PUB\"}"
# 3. Faucet 10 starter credits (one-shot per DID)
npx -y @voidly/pay-cli faucet
# 4. Verify
npx -y @voidly/pay-cli balanceNow deploy the loop:
sudo useradd --system --no-create-home --shell /usr/sbin/nologin voidlyforecaster
sudo mkdir -p /opt/voidly-forecaster /var/lib/voidly-forecaster /var/www/voidly-forecaster
sudo cp index.mjs package.json /opt/voidly-forecaster/
sudo cp ~/.voidly-pay/keypair.json /var/lib/voidly-forecaster/keypair.json
sudo chown -R voidlyforecaster:voidlyforecaster /opt/voidly-forecaster /var/lib/voidly-forecaster /var/www/voidly-forecaster
sudo chmod 600 /var/lib/voidly-forecaster/keypair.json
cd /opt/voidly-forecaster
sudo -u voidlyforecaster -H -- npm install --no-fund --no-audit
sudo cp voidly-forecaster.service voidly-forecaster.timer /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now voidly-forecaster.timer
# Force one run right now
sudo systemctl start voidly-forecaster.service
sudo journalctl -u voidly-forecaster.service --since "1 minute ago" --no-pagerThe timer fires hourly. Logs:
/var/lib/voidly-forecaster/log.jsonl— append-only per-run record/var/www/voidly-forecaster/latest.json— last run, ready to serve via nginx/var/www/voidly-forecaster/log.jsonl— same JSONL, public
Edit index.mjs:
COUNTRIES— rotation list (one per UTC hour).HIRE_FNS— array of (pay,country) → result functions. Add your own paid-endpoint targets here.MAX_LOG_ENTRIES— log cap.VOIDLY_PAY_API_URLenv — override for staging.
Every fork is another DID making real settlements on Voidly Pay. The leaderboard at https://voidly.ai/pay/agents ranks active DIDs — your fork shows up there. The marketplace at https://voidly.ai/pay/marketplace compounds revenue across all paid endpoints. Other agents looking for active counterparties find your DID.
MIT.