Agent skill · basis-worker
Run a Basis worker from your agent
The basis-worker skill teaches an agent — Claude Code or any framework — to turn an idle GPU into a Basis contributor worker: connect a public reward wallet, register, generate a local-only config, start a worker on Ollama, vLLM, or the GPU-free simulator, and verify it is online. The worker holds no private key, signs nothing, and performs no on-chain action.
Worker network status
Reading…Reading the live worker-onboarding posture from the network.
- Inference runtime
- —
- Registration
- —
- Job routing
- —
- Orchestrator
- —
- Can receive jobs
- —
- Settlement
- —
Registration and offer storage are the actions you take now; public job routing is ready but off, so a registered worker does not receive public production jobs until canReceiveJobs is true (routing enabled and a real verified worker online). On-chain reward settlement is keeper- and operator-driven, not automatic. This card reads live from /api/workers/onboarding/status; rewards are payment for completed verified work, never guaranteed.
Add the skill
The skill is served as a markdown file an agent can read, plus a manifest and a download index. Install it into an agent, or fetch SKILL.md directly.
One-command setup (live)
curl -fsSL https://basis.watch/api/skills/basis-worker/install.sh | shDetects the host (OS / GPU / VRAM / Docker / Ollama), recommends a model, fetches the skill, and prints the next steps. It handles no key or seed, prints no token, and makes no on-chain action.
Safer verified install (recommended)
curl -fsSL https://basis.watch/api/skills/basis-worker/install.sh -o install.sh curl -fsSL https://basis.watch/api/skills/basis-worker/install.sh.sha256 -o install.sh.sha256 sha256sum -c install.sh.sha256 # macOS: shasum -a 256 -c install.sh.sha256 sh install.sh
Download the installer and its checksum, verify, then run — so you never pipe an unverified script into a shell. Or fetch SKILL.md directly (links below). A skills-registry one-shot npx skills add BasisWatch/basis@basis-worker becomes available once the skill is published to the public mirror.
Read
SKILL.md (served, text/plain)
/api/skills/basis-worker/SKILL.md
Download
File index (JSON)
/api/skills/basis-worker/download
Installer
install.sh (+ .sha256)
/api/skills/basis-worker/install.sh
Manifest
name · version · hash · routing
/api/skills/basis-worker/manifest
Static mirror
SKILL.md (raw)
/skills/basis-worker/SKILL.md
Last updated: content-1f420c74d0fc
Wallet & identity — a public address only
A worker is paid through a public EVM reward address — the destination for any future $BASIS reward. It is never a private key or seed phrase. Get one by connecting a wallet at basis.watch (a Privy-linked wallet or an injected browser wallet), then copy its public address.
Signing — if ever needed, such as claiming a future reward — happens in your own wallet at basis.watch. The skill and the worker sign nothing and hold no key. If anyone asks you to paste a 64-hex string or a 12/24-word phrase, stop: it is not needed and must never be shared.
Doctor & model recommendation
Run the system doctor to report OS / CPU / RAM / GPU + VRAM + CUDA / Docker / Ollama (and installed models) / vLLM, get a model recommendation for the detected VRAM, and derive a starting ask price from measured throughput. No supported GPU? The echo runtime needs none of it.
node .agents/skills/basis-worker/scripts/doctor.mjs # detect + recommend a model node .agents/skills/basis-worker/scripts/doctor.mjs --benchmark # also measure tok/s → suggested ask price nvidia-smi # GPU present + driver + free VRAM docker info | grep -i runtime # nvidia runtime available (Container Toolkit)
NVIDIA GPU + Ollama
liveThe easiest real-inference path. Run Ollama (OpenAI-compatible on :11434) on a machine with an NVIDIA GPU; for containers add the NVIDIA Container Toolkit so docker run --gpus all sees the card. The worker CLI speaks to Ollama directly.
NVIDIA GPU + vLLM
liveHigh-throughput serving. vllm/vllm-openai exposes an OpenAI-compatible API on :8000. A single H100 (80GB) comfortably serves a 7B–13B model; 70B+ needs tensor-parallel across several GPUs (--tensor-parallel-size N). Start with a 7B/8B instruct model, then scale to the card.
Simulator (echo) — GPU-free
liveNo GPU and no model. The echo runtime streams a deterministic canned response so you can prove registration, heartbeats, and the orchestrator path end to end before bringing a real model online.
Other hardware
researchApple Silicon / AMD run Ollama natively on the host rather than via --gpus all. WebGPU in the browser is in research. If hardware is unsupported, run echo to validate the flow — it needs none of the above.
Register & generate the config
Register the worker with its worker_id, model capability, runtime, and public reward wallet. The skill writes a 0600 local-only worker.env from the template — the handshake token is generated/derived on the host and shown once, never committed or pasted into chat.
# Register (strict EVM-address check). Use a real public address you control. node .agents/skills/basis-worker/scripts/setup-worker.mjs \ --register --wallet 0xYourPublicEvmAddress0000000000000000000000 \ --worker-id my-gpu-1 --base https://basis.watch # Generate the local-only 0600 worker.env (token/auth-key derived on the host): node .agents/skills/basis-worker/scripts/setup-worker.mjs \ --write-env --wallet 0xYourPublicEvmAddress0000000000000000000000 \ --runtime ollama --orchestrator wss://your-orchestrator.example \ --out ./worker.env chmod 600 ./worker.env
worker.env (template — copy, then fill in on the host)
# worker.env — LOCAL ONLY. chmod 600. Never commit; never paste secrets to chat. # Your PUBLIC reward address (0x + 40 hex). NEVER a private key or seed phrase. BASIS_WORKER_WALLET=0xYourPublicEvmAddress0000000000000000000000 # Runtime: echo (GPU-free) | ollama | vllm BASIS_WORKER_RUNTIME=ollama BASIS_OLLAMA_MODEL=llama3.2 BASIS_WORKER_MODELS=llama3.2 OLLAMA_URL=http://127.0.0.1:11434 # The orchestrator the worker connects to (self-host, or one an operator gave you). BASIS_ORCHESTRATOR_URL=wss://your-orchestrator.example # Handshake secrets are filled in on the host by the operator — left blank here, # stored only in this 0600 file, never logged or committed. BASIS_WORKER_TOKEN= BASIS_WORKER_AUTH_KEY=
Secrets stay on the host. BASIS_WORKER_TOKEN, BASIS_WORKER_AUTH_KEY, and BASIS_ORCHESTRATOR_SECRET live only in the 0600 worker.env. They are never logged, committed, or pasted into chat. The worker logs only the public wallet.
Start the worker
The worker is the standalone runtime/worker CLI (its own package.json / node_modules, outside the pnpm workspace). Start with the GPU-free echo runtime to prove the path, then point it at a real model.
# GPU-free smoke (no model — proves the pipeline end to end): cd runtime/worker && npm install BASIS_WORKER_WALLET=0xYourPublicEvmAddress0000000000000000000000 \ BASIS_WORKER_RUNTIME=echo \ npm run dev
# Real inference via Ollama (NVIDIA GPU): docker run -d --gpus all -p 11434:11434 -v ollama:/root/.ollama --name ollama ollama/ollama docker exec ollama ollama pull llama3.2 cd runtime/worker && npm install BASIS_WORKER_WALLET=0xYourPublicEvmAddress0000000000000000000000 \ BASIS_WORKER_RUNTIME=ollama \ BASIS_OLLAMA_MODEL=llama3.2 \ BASIS_WORKER_MODELS=llama3.2 \ BASIS_ORCHESTRATOR_URL=wss://your-orchestrator.example \ npm run dev
Need an orchestrator? Self-host runtime/orchestrator (npm install && npm run dev on :8787) or point BASIS_ORCHESTRATOR_URL at the hosted orchestrator — its address is supplied by the operator. Public worker routing for the inference API is ready but currently off; see the live status card above.
Verify it is online
# Is the worker online? Read its record over HTTP: node .agents/skills/basis-worker/scripts/verify-worker.mjs \ --worker-id my-gpu-1 --base https://basis.watch # Confirm the live onboarding posture (routing / settlement / canReceiveJobs): curl -s https://basis.watch/api/workers/onboarding/status
- —
Heartbeat / online
Liveness is the worker's persistent Socket.io connection; it also prints an operator heartbeat log roughly every 30s. online is derived against a heartbeat window, so a stale worker reads offline.
- —
Worker record
GET /api/workers/{id} returns { online, jobsCompleted, … }. The bundled verify-worker.mjs and healthcheck.mjs scripts read it for you.
- —
Orchestrator + canary
pnpm worker:canary spawns a real orchestrator + a real echo worker with throwaway secrets and a throwaway wallet, then drives the gateway dispatch path — proving no-worker → 503, unauthenticated → refused, authenticated echo → online, dispatched → 200 with worker headers. All local and throwaway; no real wallet, secret, or on-chain action.
Rewards — payment for verified work
A completed, anti-cheat-verified, worker-routed job with a valid EVM reward wallet accrues a pending, off-chain $BASIS reward. The orchestrator's anti-cheat verdict is authoritative: output faster than any real GPU, or incoherent output, is not payable.
Failed or rejected jobs pay 0. Gateway-served (proxy) jobs pay 0 — they have no contributor wallet, so they are metered, not paid. Only worker-routed completions earn.
Public worker routing for the inference API is ready but currently off, so a registered worker does not receive public production jobs yet — routing happens only when it is enabled and a real verified worker is online. The per-job 10% burn / 90% worker reward route and one worker-routed paid claim have been proven by controlled mainnet transactions, but neither is a continuous live feed.
On-chain settlement is keeper- and operator-driven, not automatic, so accrued rewards are tracked off-chain and settle in prepared batches. Rewards are payment for completed verified work — not earnings on a holding, not yield, not passive income, and never guaranteed.
Keep going
Worker guide
Register, run, the reward formula, anti-cheat, and what is pending before live rewards.
SKILL.md (skill docs)
The full agent skill — prerequisites, runtimes, safety rules, and the end-to-end flow.
OpenAI-compatible API
The /v1 surface the worker serves — same protocol your OpenAI client speaks.
Receipts
Every served job leaves a hash-stable receipt over canonical JSON.
Settlement
Keeper-driven, idempotent Base reward batches — how accrued rewards settle.
Stake $BASIS
Stake $BASIS into the deployed vault; rewards stream as share value (not yield/APY).
Network status
The live, machine-readable worker-onboarding posture this page reads from.
Registration and offer storage are live and durable; public worker routing for the inference API is ready but currently off, so a registered worker does not receive public production jobs yet. On-chain reward settlement is keeper- and operator-driven, not automatic. For the live posture an agent should read before acting, see /api/workers/onboarding/status.