Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add NVIDIA-NeMo/nemo-helix --skill plugin-inference-middlewaregit clone --depth 1 https://github.com/NVIDIA-NeMo/nemo-helixWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/nvidia-nemo/nemo-helix/plugin-inference-middleware)<a href="https://agentmods.dev/skills/nvidia-nemo/nemo-helix/plugin-inference-middleware"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/nemo-helix/plugin-inference-middleware/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/nvidia-nemo/nemo-helix/plugin-inference-middleware"><img src="https://agentmods.dev/badge/skills/nvidia-nemo/nemo-helix/plugin-inference-middleware.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00098 | $0.03157 |
| Opus 5.5 | $0.00039 | $0.01263 |
| Sonnet 5.5 | $0.00020 | $0.00631 |
| Haiku 4.5 | $0.00010 | $0.00316 |
Grade A, and why
plugin-inference-middleware scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 353 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Inference Middleware Plugin
Entry-point registration
# pyproject.toml
[project.entry-points."nemo.inference_middleware"]
"nemo-my-plugin" = "nemo_my_plugin.middleware:MyMiddleware"
The key ("nemo-my-plugin") is the plugin identity — it must match
MiddlewareCall.name in VirtualModel configs.
Minimal implementation
from nemo_helix_plugin.inference_middleware import (
NemoInferenceMiddleware,
InferenceMiddlewareContext,
InferenceRequest,
InferenceResponse,
RequestResult,
ResponseResult,
ImmediateResponse,
InferenceMiddlewareError,
InferenceMiddlewareUnavailableError,
VirtualModel,
)
from nemo_helix_plugin.entities.client import AsyncEntitiesClient
from nemo_helix_plugin.entity_client import NemoEntitiesClient
from pydantic import BaseModel
from typing import Any
class MyConfigData(BaseModel):
"""Lightweight working config — returned from validate_middleware_config."""
threshold: float = 0.8
class MyMiddleware(NemoInferenceMiddleware):
def __init__(self) -> None:
super().__init__()
self._entity_client = None # initialised in on_startup
# ── Lifecycle ──────────────────────────────────────────────────────
async def on_startup(self) -> None:
# IGW injects a typed client authenticated as service:<entry-point name>
# before on_startup(). Derive an entity client from it so
# get_middleware_config can fetch stored config entities.
client = self._get_platform_client("on_startup")
self._entity_client = NemoEntitiesClient(AsyncEntitiesClient.from_client(client))
entities = self.list_model_entities_for_workspace() # cache available here
...
async def on_shutdown(self) -> None: ...
async def on_virtual_model_upserted(self, virtual_model: VirtualModel) -> None: ...
async def on_virtual_model_destroyed(self, virtual_model: VirtualModel) -> None: ...
# ── Config resolution (needed only for config_id support) ──────────
async def get_middleware_config(self, config_type: str, config_id: str) -> Any:
"""Fetch stored config entity from the entity store.
Called at VirtualModel cache-build time and every polling cycle.
Never called per-request.
"""
if config_type != "my_plugin_config":
raise InferenceMiddlewareError(f"Unknown config_type={config_type!r}", status_code=400)
ws, name = config_id.split("/", 1)
return await self._entity_client.get(MyPluginConfig, name=name, workspace=ws)
async def validate_middleware_config(self, config_type: str, config: Any) -> MyConfigData:
"""Validate and normalise config — called at cache-build time, not per-request."""
if config_type != "my_plugin_config":
raise ValueError(f"Unknown config_type={config_type!r}")
if isinstance(config, MyPluginConfig):
return MyConfigData(threshold=config.threshold)
return MyConfigData.model_validate(config) # inline dict path
# ── Request hook ───────────────────────────────────────────────────
async def process_request(
self,
ctx: InferenceMiddlewareContext,
request: InferenceRequest,
middleware_config: MyConfigData,
) -> RequestResult:
# Mutate body["model"] to route to a different entity:
request.body["model"] = "default/strong-model"
return request
# Or short-circuit (skip backend entirely):
# return ImmediateResponse(data={"choices": [{"message": {"content": "cached"}}], ...})
# Or raise a typed error:
# raise InferenceMiddlewareError("Rate limit exceeded", status_code=429)
# ── Response hook ──────────────────────────────────────────────────
async def process_response(
self,
ctx: InferenceMiddlewareContext,
response: InferenceResponse,
middleware_config: MyConfigData,
) -> ResponseResult:
if isinstance(response.result, dict):
# Non-streaming — mutate and return
response.result["choices"][0]["message"]["content"] = redact(...)
return response.result
else:
# Streaming — wrap the async iterator
async def _filtered(stream):
async for chunk in stream:
yield transform(chunk)
return _filtered(response.result)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 353 lines · 98 tokens per session scan A 61d8da10bb29
plugin-inference-middleware is a skill published in the GitHub repository NVIDIA-NeMo/nemo-helix (160 stars, last pushed today), licensed Apache-2.0. It adds 98 tokens to every session and 3,157 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-12-05.
plugin-inference-middleware compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| plugin-inference-middlewareNVIDIA-NeMo/nemo-helix | Skill | 160 | today | Apache-2.0 | A | 98 | Claude Code, Codex |
| trulens-blocking-guardrailstruera/trulens | Skill | 3.7k | yesterday | MIT | A | 19 | Claude Code, Codex |
| rust-gatewayBerriAI/litellm | Skill | 65k | today | none | A | 70 | Claude Code, Codex |
| vercel-composition-patternslangfuse/langfuse | Skill | 38k | today | none | A | 58 | Claude Code, Codex |
| open-sourcebrowser-use/browser-use | Skill | 123k | today | MIT | A | 101 | Claude Code |
| stripe-projectsNousResearch/hermes-agent | Skill | 269k | today | MIT | A | 15 | Claude Code, Codex |
| fastapi-patternsaffaan-m/ECC | Skill | 317k | 4d ago | MIT | A | 35 | Claude Code, Kiro |