
jobd
io.github.musharna由 GitHub 帳號 musharna 發布v0.5.54更新於 Nov 8, 2026
Self-hostable GPU-aware job broker: submit, route by VRAM, babysit jobs across machines via MCP.
概覽
供自架 jobd 代理使用的 MCP 伺服器,讓助理在你自己的多台機器上提交、依 VRAM 路由、監控與搶佔 GPU 工作。
- 可以做什麼
- 將工作提交到代理的佇列,包含以 bash 執行的指令字串。
- 檢視佇列與單一工作狀態,並讀取擷取的工作日誌。
- 取消或搶佔執行中的工作,並查看事件歷程。
- 列出各 worker 的健康狀態與可用容量,並將 worker 從機群中移除。
- 適用情境
- 適合擁有幾台自用 GPU 機器、希望由助理代為排入訓練或批次工作、依可用 VRAM 路由到合適的 worker,並持續追蹤工作進度,而不必在終端機長時間執行指令的情境。
- 執行需求
- 本機需 Python 3.11 以上並安裝 jobd 的 MCP 附加元件(jobd-mcp),且能連線到 jobd 代理。需設定 JOBD_URL 為代理基礎位址(預設 JOBD_API_TOKEN 為與代理一致的 Bearer 權杖,除非代理以 JOBD_ALLOW_NO_AUTH=1 執行。需要能連線該代理的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 jobd,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
jobd
jobd is a job broker with an MCP server that lets AI agents submit, route and babysit jobs on a few machines of your own. Like task-spooler or pueue, but across all your machines on Tailscale or a LAN, routing each job to a worker with the VRAM free, with no cloud, Kubernetes or Slurm.
[CI] [PyPI] [Python] [License] [DOI] [Glama]
VRAM routing tracks one GPU per host: the worker reports free memory on GPU index 0 only.
Why it exists
- VRAM-fit routing. Each job goes to a worker whose live free VRAM, RAM, CPUs, capability tags and arch/OS fit it, instead of you guessing which box is free.
- Preemption with a checkpoint window. A higher-priority job can preempt a running one:
SIGTERM, a grace window for the workload to save into itsJOBD_CHECKPOINT_DIR, thenSIGKILL. A preempted job is not re-run; to resume, submit a new job pointed at the checkpoint (docs/preemption.md). - Survives sessions. Jobs live in the broker, not your shell. Submit, close the laptop, check back tomorrow.
- Agent-native. An MCP server lets an AI agent submit, monitor and babysit jobs as tool calls (benchmark).
- Yours. One broker process on a machine you own. No accounts, no telemetry, no per-GPU-hour billing. Only the optional self-update scripts go online (runbook).
Why not just use…?
Install
Requires Python ≥ 3.11. scripts/install-worker.sh sets up a worker under ~/jobd-worker with its own venv and a generated config.
Quickstart (single host)
For a multi-host deployment (Docker broker, systemd workers, Tailscale binding, shared auth token), see docs/security.md and the templates in docker-compose.yml and scripts/. Adding a worker to a running fleet is one command:
Day-2 operations (health, draining a worker, upgrades, token rotation, backups) are in docs/runbook.md.
How it works
The broker (FastAPI + SQLite) holds the queue, runs the matcher and resolves per-project priorities. Workers, one per host, poll it, so nothing connects in to a worker: each heartbeats its live capacity, claims jobs it can run, streams logs back and honors preemption. The argv you submit runs as-is (shell=False); job submit --stdin and the MCP jobd_submit tool are the exceptions and run a command string as bash -c <string>. Design notes: docs/ARCHITECTURE.md.
CLI
Job arrays and sweeps, --explain dry runs, job adopt, and a pueue/task-spooler command map: docs/cli.md.
MCP / agent integration
jobd-mcp exposes the queue as nine tools: jobd_submit, jobd_status, jobd_logs, jobd_list, jobd_cancel, jobd_preempt, jobd_events, jobd_workers, jobd_worker_delete. docs/agent-cookbook.md walks through babysitting, preemption, sweeps, and asking why a job won't schedule.
For Claude Code:
Any other MCP client:
JOBD_API_TOKEN must match the broker's token, or every call returns 401. examples/claude-code-hooks/ has optional hooks that nudge (or hard-block) an agent toward submitting heavy commands through jobd.
What the benchmark shows
Claude with the server was compared with Claude using jobd's own job CLI, on 38 questions about a live broker, 3 runs each. With Claude Haiku 5.5 the server got all 38 right in every run and the CLI 29: a pre-registered win (Holm-adjusted McNemar p = 0.008). With Sonnet 5.5 it was 36 against 30 and with Opus 5.5 38 against 37, neither separated. On all three models the server's answers were cheaper and faster; with Sonnet, 0.20 times the cost and 0.17 times the time.
The chart is the Opus 5.5 run (2026-10-18). There the server's median answer cost 0.20 times as much (95% CI 0.15 to 0.28) and took 0.16 times as long (0.13 to 0.20), and it was cheaper and faster on all 38 questions. These were secondary endpoints, measured on an unreleased commit that adds a finished_at window to jobd_list. On an earlier, easier set both setups got 123 of 123.
We wrote the questions and ran the benchmark ourselves; an outside re-run is welcome. Method, controls and limitations: benchmarks/agent_qa; the Haiku and Sonnet runs: 2026-10-20 re-run.
Supported platforms
CI runs on Ubuntu with no GPU runner (VRAM paths are tested against mocks), and without a systemd user instance the worker still runs jobs but drops its memory caps, process reaping and preemption guarantees.
Configuration
- Config files (
projects.yaml,profiles.yaml,classifier.yaml) are all optional and read fromJOBD_CONFIG_DIR; see docs/projects-yaml.md. - Environment variables: every
JOBD_*variable is in docs/configuration.md. - Concurrency (several jobs per worker): docs/concurrency.md. Retention of logs and job records: docs/runbook.md.
Security
Run the broker on loopback or a Tailscale tailnet, never a public interface. Three stacked controls:
- Bind:
JOBD_HOSTis127.0.0.1by default; set it to a Tailscale address (100.64.0.0/10), never0.0.0.0. The broker does not enforce this. - Source IP: requests from outside loopback and
100.64.0.0/10get403(JOBD_DISABLE_TAILNET_ACL=1turns this off). - Token: every host sets
JOBD_API_TOKEN;JOBD_ALLOW_NO_AUTH=1is for a loopback-only broker, and on any other bind exposes unauthenticated code execution to your tailnet.
/livez, /readyz and /metrics are exempt from both the source-IP check and the token; /metrics shows every worker's hostname and version, so don't port-forward the broker. Threat model and token rotation: docs/security.md.
License
MIT; see LICENSE.
來源:README.md,提交 11e0fdd
工具
0版本歷史
8- v0.5.52Oct 20, 2026
- v0.5.51Sep 26, 2026
- v0.5.50Sep 26, 2026
- v0.5.49Sep 24, 2026
- v0.5.48Sep 23, 2026
- v0.5.47Sep 23, 2026
- v0.5.46Sep 19, 2026
- v0.5.44Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分