
Inference AIops
io.github.AIops-tools由 GitHub 帳號 AIops-tools 發布v0.13.0更新於 Oct 30, 2026
Governed GPU inference ops (vLLM + Ray Serve): latency RCA, scaling, drain, 39 tools.
概覽
針對 GPU 推論叢集(vLLM、Ray Serve、SGLang、TGI)的受治理 AI 維運 MCP 伺服器,提供延遲根因分析、擴縮容、排空與部署工具,並附稽核日誌。
- 可以做什麼
- 讀取 vLLM 指標並執行排序式延遲根因分析(佇列深度、KV 快取壓力、前綴快取局部性),以及低使用率診斷
- 跨 vLLM、SGLang、TGI 檢視引擎健康、清單、請求指標與佇列深度
- 讀取 Ray Serve 部署、副本清單、自動擴縮設定,以及 Ray 叢集、作業與 GPU 狀態
- 寫入 Ray Serve 控制面:擴容、縮容、縮到零、更新自動擴縮設定、排空副本、重啟副本、取消作業
- 管理模型:列出與檢視模型、載入與卸載 LoRA 適配器、休眠與喚醒模型、部署、取消部署、重新部署與更新路由策略
- 估算每 token 成本,並把每次呼叫連同風險等級與復原描述記錄到本機稽核資料庫
- 適用情境
- 適合自行維運 GPU 推論堆疊的情境:讓助理診斷推論變慢、找出閒置 GPU,並在有稽核紀錄的前提下執行受控的擴縮容或部署變更。主要針對 vLLM 與 Ray Serve,對 SGLang 與 TGI 提供唯讀可觀測能力。
- 執行需求
- 以 PyPI 套件形式透過 stdio 在本機執行(uv tool install 或 pipx),以外掛方式安裝還需 PATH 中有 uvx。需要能連線引擎的 OpenAI API 與 Prometheus /metrics 端點以及 Ray 儀表板;用 init 精靈設定引擎、主機、連接埠與協定。bearer token 為選用,若已儲存則需以 INFERENCE_AIOPS_MASTER_PASSWORD 解鎖。休眠模式工具要求伺服器以 VLLM_SERVER_DEV_MODE=1 啟動。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Inference AIops,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Inference AIops
Audit availability: Real writes require a committed
pendingaudit row and stop before contacting the platform if storage is unavailable. Reads and previews may continue with a warning; new audit rows store outcome summaries rather than full responses.
Disclaimer: Community-maintained open-source project. Not affiliated with, endorsed by, or sponsored by the vLLM or Ray projects or any inference-serving vendor. Product and trademark names belong to their owners. MIT licensed.
Governed AI-ops for GPU inference clusters — vLLM (OpenAI API + Prometheus
/metrics) and Ray Serve / Ray Jobs (Ray dashboard), plus the single-process
serving engines SGLang and TGI (Text Generation Inference) — with a
built-in governance harness: unified audit log, policy engine, token/runaway
budget guard, undo-token recording, and descriptive risk-tier labels on every
audit row. It parses each engine's Prometheus /metrics directly (no Prometheus
server required) and
probes the Ray dashboard independently. A bearer token is optional (many
stacks run open).
Serving engines. vLLM is the flagship (full Ray Serve control plane: scale, drain, autoscale, LoRA, hot-swap). SGLang and TGI are supported for engine-agnostic observability — health, running-model identity, request-latency metrics, queue depth, and latency RCA — read from each engine's own endpoints and metric names. Being single-process servers, they have no Ray-shaped scale/drain API: those writes return a teaching error pointing you at a real horizontal-scale layer (Ray Serve / Kubernetes / a load balancer).
What it does
The flagship value is root-cause analysis, wrapped in guarded reads and writes:
diagnose_latency_spike(flagship RCA) — when TTFT/TPOT/e2e latency climbs, it correlates queue depth (running vs waiting), KV-cache pressure / preemptions, and prefix-cache locality into a ranked cause plus the specific knob to turn (add replicas, raisemax-num-seqs, fix routing, enlarge KV cache). Every flag is a number, not a black-box verdict.diagnose_low_utilization— the inverse: idle GPUs, over-provisioned replicas, or routing that strands a cache-warm replica → what to scale down.- Prometheus-native — reads vLLM's
/metricsendpoint directly; no Prometheus/Grafana deployment needed. - Governance-grade — the first governance-grade entrant in this niche: audit + budget + risk-tier approval + undo-token + prompt-injection sanitize, with dry-run + double-confirm on the fragile prod ops (scale-down, scale-to-zero, drain, redeploy, hot-swap) the community reports as dangerous.
- Laptop self-test — ~80% of the tool self-tests free: vLLM on a single GPU
or CPU-mock + Ray in one local container (
ray start --head).
What this tool does, and does not, decide
It delivers inference-cluster operations — reads and writes — accurately and efficiently, and records every one of them. It does not decide whether a write is allowed to happen. That is the agent's judgement, or the permission of the environment you connect it with: restrict the network path so it can only reach the read/metrics endpoints, or run the Ray dashboard without its job-submission API, and the writes fail at the server — the place that actually owns the permission.
So there is no read-only switch, no policy file, no approval gate to configure.
The one thing the tool guarantees is that nothing is silent: every call, over
MCP and over the CLI alike, lands an audit row in
~/.inference-aiops/audit.db, and destructive writes still capture their
before-state and record an inverse where one exists.
Each tool declares a
risk_level, kept in agreement with its[READ]/[WRITE]documentation tag by a test, and carried into the audit row as a descriptive tier — so a reviewer can see at a glance that a row was a high-risk scale-to-zero. It is a label, not a gate.
Running a smaller / local model? See agent-guardrails.md — it lists the guardrails this tool enforces for you (so you don't spend prompt budget restating them) and gives a ready-made system prompt for what's left.
Capability matrix (39 MCP tools)
The engine-agnostic group works against any supported engine (including vLLM); use it for SGLang/TGI targets or a uniform view across a mixed fleet. The Ray Serve / cluster / deploy write groups are vLLM-only (Ray control plane) — they teach-and-refuse on a SGLang/TGI target.
23 read, 16 write. High-risk writes (scale_replicas_down,
scale_to_zero, drain_replica, lora_unload, model_sleep,
replica_restart, model_undeploy, deployment_redeploy) all support
dry_run + double-confirm; reversible writes record an undo descriptor.
Sleep Mode requires a dev-mode server. vLLM registers
/sleep,/wake_upand/is_sleepingonly when started withVLLM_SERVER_DEV_MODE=1. Against any other server these three tools report that the route is absent and why, rather than failing vaguely. Sleep Mode suspends the same model; it does not swap base models — serving a different base model means restarting vLLM with a different--model.
Install
Quick start
As a Claude Code plugin
One install gives an agent both the skill and the MCP server:
The MCP server is fetched with uv and pinned to the
package version this plugin declares, so an audit row can be traced back to the
code that wrote it. Credentials are still configured with inference-aiops init — see below.
As an OpenClaw plugin
The same bundle is published on ClawHub, where one install delivers the skill and its MCP server together:
Restart the OpenClaw gateway afterwards so it loads the plugin. The MCP server is
fetched with uv, pinned to this exact release, so
uvx has to be on PATH — without it the skill still installs but reports
Visible to model: no. Credentials are configured exactly as below.
As a CLI or standalone MCP server
Run as an MCP server (stdio) for the full 39-tool surface:
Where that password then lives: an exported variable is readable by every process this shell starts and is recorded by shell history. On a shared or long-lived host, prefer the interactive prompt, or inject it from a secret manager for the life of the one command that needs it.
The CLI is a convenience subset (init, overview, serve …, metrics …,
secret …, doctor, mcp); the full 39 tools are exposed via the MCP server.
Governance
Every MCP tool passes through the bundled @governed_tool harness. It does not
decide whether a write is permitted — see What this tool does, and does not,
decide above — but it records every call:
- Audit — every call (params, outcome summary, status, duration, risk tier, and any
approver/rationale annotation) logged to
~/.inference-aiops/audit.db(relocatable viaINFERENCE_AIOPS_HOME). - Budget / runaway guard — a safety backstop, not authorization: token and call budgets trip a circuit breaker on tight poll/retry loops.
- Risk tier — each audit row carries a descriptive tier derived from the
tool's
risk_level; it is a label, not a gate.INFERENCE_AUDIT_APPROVED_BY/INFERENCE_AUDIT_RATIONALEare optional annotations recorded when set, never required. - Undo recording — reversible writes (scale, autoscale-config, routing, hot-swap, LoRA load) record an inverse descriptor.
Supported scope + limitations
Behaviour is exercised by the test suite against mocked vLLM /metrics, vLLM
OpenAI API, and Ray dashboard responses. ~80% of the tool self-tests on a
laptop — vLLM on a single GPU or CPU-mock plus a local one-node Ray head. It
has not been run against a live production cluster; see
docs/VERIFICATION.md for the live-verification
checklist.
Unverified against real hardware / topology:
- multi-GPU tensor-parallel / pipeline-parallel deployments,
- real GPU thermal / throttle telemetry (utilisation is best-effort from
the Ray dashboard's
/api/nodes), - multi-node drain and node-reboot orchestration.
The fastest live check is inference-aiops doctor; the full checklist lives in
docs/VERIFICATION.md.
Missing a capability?
This is the GPU-inference member of the AIops-tools family (governed AI-ops with audit + budget + undo + risk tiers). If a vLLM or Ray capability you need is missing, or your stack speaks a dialect these tools don't yet handle — open an issue or a PR. Contributions welcome.
來源:README.md,提交 d7e0e39
工具
0版本歷史
5- v0.13.0最新Oct 30, 2026
- v0.12.0Oct 15, 2026
- v0.11.0Oct 15, 2026
- v0.10.4Sep 17, 2026
- v0.10.3Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分