·
Last changedVersion:
This version passed the hardening gate. Hardening applied 21 targeted changes and preserved all other text. Classified findings before hardening: 9. Classified findings closed: 0. Classified findings remaining: 9. Unclassified scanner findings remaining: 0. Review findings closed: 22. Review findings remaining: 2.
2
7
2
7
Expand | File | Group | Subtype | Severity | Status |
|---|---|---|---|---|---|
SKILL.md | Sensitive Data & Secret Exposure | Hardcoded secret | Medium | Open | |
BENCHMARK.md | Sensitive Data & Secret Exposure | Agent snooping | Medium | Open | |
SKILL.md | Malicious Code & Command Execution | — | Low | Open | |
SKILL.md | Prompt Injection | Third-party content as instructions | Low | Open | |
SKILL.md | Supply Chain & Install-Time Trust | Install-time download and execute | Low | Open | |
references/sdk-api-inventory.md | Prompt Injection | Third-party content as instructions | Low | Open | |
skill-card.md | Prompt Injection | Third-party content as instructions | Low | Open | |
references/config-mapping.md | Prompt Injection | Third-party content as instructions | Low | Open |
9 findings
Use this skill when a consumer codebase — an application, service, evaluation
harness, or platform — needs to run agent harnesses through NeMo Fabric's typed
Python SDK. The consumer owns its own configuration object and translates it
into an in-memory FabricConfig; NeMo Fabric owns adapter selection, the runtime
lifecycle, and normalized results.
Use the public, in-memory contract. These rules keep a consumer integration supported and upgrade-safe:
nemo_fabric package. Never import _native or
any adapter-internal module.FabricConfig in memory and pass it directly to
NeMo Fabric. Create every deployment or evaluation variant with ordinary Python
functions and model_copy(deep=True). A platform integration can serialize
the typed config inside a private transient run specification when it crosses
a process boundary; that transport is not a public authoring format.runtime_id, invocation_id, and request_id as opaque correlation
strings, not parsable or reusable state.Refer to config-mapping.md for how to translate a
consumer config object into FabricConfig, and for the full list of mechanics
that stay hidden behind this boundary.
The consumer or its execution environment owns installation; NeMo Fabric validates runtime assumptions but never installs harnesses or credentials at run time.
uv pip install nemo-fabric (add the harbor extra
for the Harbor integration). Pin the runtime and every extra named in this
skill to one exact, validated release version, and install from a hash
checked lock file in production.HarnessConfig.adapter_id. To install the
NeMo Fabric runtime, adapter, and supported harness in one environment, use
nemo-fabric[claude], nemo-fabric[codex],
or nemo-fabric[deepagents].nemo-fabric[hermes-agent] extra does not
install Hermes Agent. Check out a specific reviewed release tag or commit of
Hermes Agent rather than a moving branch, and review it before installing.nemo-fabric-adapters-<adapter>[harness]. This installs the adapter and
supported harness dependencies without the NeMo Fabric runtime. Use full
instead when that adapter package provides package-installable optional
integrations.ADAPTER_PYTHON.
Set it to the absolute path of an interpreter the operator controls, take the
value only from trusted operator configuration, and check the setup with
doctor before use.
Use matching NeMo Fabric release versions for the runtime and adapter package
unless a different pairing has been explicitly validated. Pin both to the same
exact release version and record that version in the lock file.nemo-fabric-adapters-<adapter> distribution. Bare adapter
distributions contain only adapter-owned runtime dependencies. Confirm the
exact published adapter distribution name in the installation guide before
installing, and build package names only from adapter names confirmed there,
never from guessed or job supplied identifiers.relay and include
the NeMo Relay Python package in full. Claude and Codex do not provide
relay; their harness and full extras install the supported nemo-relay
CLI alongside the harness SDK.ModelConfig.api_key_env), never as literals in code.EnvironmentConfig.env_names; only names are stored in configuration and run plans. EnvironmentConfig.env supplies literal values and does not expand $NAME references. Neither field loads a .env file. Keep secrets out of literal values, since those are stored in configuration and run plans; pass secrets only by name through the forwarded names field or the model key variable field, and forward only the names a run needs.FabricNativeUnavailableError when it is missing.nemo-fabric-adapter-catalog package and call nemo_fabric_adapter_catalog.get_adapter_descriptor(adapter_id) or get_target_descriptor(target_id). Refer to the catalog guide. Catalog resources do not register execution runners; unknown IDs raise KeyError. Validate against the task environment's descriptor before relying on a snapshot claim. Catalog source versions and fingerprints are not runtime-observed provenance.Map the consumer's application, job, or deployment object into a FabricConfig
with the public models and helper methods:
Validate each job field against consumer allowlists before mapping it: adapter ID, provider, endpoint host, credential variable name, and skill directory root. A tools result of None keeps the harness default tools, so give jobs from untrusted sources an explicit tool policy. The example MCP server exposes every discovered tool; where the selected adapter declares both mcp and mcp tool filters, restrict the allowed tools to the minimum the job needs and confirm this with plan. Take the server URL from trusted configuration and use HTTPS.
ToolsConfig, add_tool_definition, block_tools, add_skill_path,
remove_skill_path,
add_mcp_server, remove_mcp_server, and enable_relay.add_tool_definition only when the selected adapter accepts
tools.definitions and publishes a tool_definition_schema. The LangChain
Deep Agents adapter accepts kind="python" with ref="package.module:attribute"
naming an installed LangChain BaseTool instance or subclass, and accepts
custom AgentMiddleware classes in harness.settings.deepagents.middleware. Tool references and
middleware classes import and run code in the adapter host, so take them only
from a consumer maintained allowlist of reviewed, installed modules, never
from job input.allowed_tools list or non-empty blocked_tools on
add_mcp_server only when the selected adapter declares both mcp and
mcp.tool_filters. An unfiltered server requires only mcp.
allowed_tools=None exposes every discovered tool, while an empty list
exposes none; blocked tools are removed after applying that allowlist. Tool
names must be non-blank, and planning rejects a tool that appears in both
lists.mcp.auth.oauth2 or mcp.auth.service_account, matching the authentication
type.model_copy(deep=True) and
ordinary Python functions; each copy plans and runs independently.SkillConfig.directories to SkillDirectory(skill=...) and
SkillDirectory(folder=...) entries instead of using paths, with optional
bundled=BundledSkills(...) and
duplicates. These need adapter support, and add_skill_path raises
ValueError once directories is set. Refer to
Configure Skills.base_dir=... to any Fabric call when the config uses relative paths,
so skills, workspaces, and artifacts anchor to the consumer's own layout.
Use a dedicated directory the consumer controls as the base directory, and
reject resolved paths that fall outside it.The repository code_review_agent example
shows this pattern end to end with complete Hermes Agent, Codex, Deep Agents,
environment, MCP, and telemetry variants. Reuse it rather than duplicating config
construction. Read the example at the revision that matches the pinned package
version; the safety guidance in this skill still applies when following it.
For Hermes, embedded SDK execution is enabled and eager by default. Set harness.settings.sdk.enabled=False only for native-only runtimes with an enabled API, dashboard, or terminal interface; management through the SDK remains available, but invocation fails explicitly. Browser and terminal clients share one managed TUI backend. Enable native interfaces only when needed, bind them to loopback or a private network, and require authentication. Native responses remain native even when Relay emits standard ATOF/ATIF; do not treat them as SDK RunResult objects. Follow the Hermes invocation guides for interface-specific installation and attachment.
For Deep Agents, mini-SWE-agent, and the LangGraph custom-agent example, pass the same UUID string through RunRequest.relay_session_root on each conversation turn to group Relay trajectories under one session. Core forwards the typed field as AgentRunRequest.relay_session_root; context keys do not control Relay propagation. An unusable UUID preserves per-request behavior. The remaining adapters do not consume this field.
For Hermes and OpenClaw cold resume, configure runtime.keep_state and retain the complete
artifact state tree. Persist Runtime.session_ref.to_mapping() in caller-owned
storage that is access controlled and bound to the owning tenant or user,
verify ownership before restoring a saved reference, and pass session_ref=SessionRef.from_mapping(saved_reference)
to Fabric.start_runtime(), start_runtime_in(), or run(). A new runtime ID
does not change the selected session. Retention alone starts a fresh
conversation. Never select the latest conversation implicitly. Agent names are
labels, while the reference's adapter must match. Handle state_in_use and
missing or incompatible session errors explicitly. Inspect
Runtime.recovery_warnings before continuing an uncertain session. Send a new
RunRequest(..., acknowledge_recovery=True) only after inspecting native and
external state. Do not replay an interrupted request automatically. Keep
ownership and retry cleanup when stop is unconfirmed. Native Hermes API and
dashboard behavior remains owned by Hermes. OpenClaw supports retained managed
runtimes and NeMo Fabric-owned services. A retained service keeps the Gateway
and storage lock across connected-runtime stops. Bind the Gateway to loopback
or a private network and require authentication. Caller-owned OpenClaw services
reject retained sessions because their references cannot verify a native storage
boundary. See the OpenClaw guide.
Hermes SessionRef resume requires the SDK backend to be enabled. Native-only Hermes runtimes can retain state and report RunPlan.capabilities.session_resume: false. Explicit SDK session selection then fails with session_resume_unsupported before native startup.
Pick the smallest lifecycle the consumer needs:
await Fabric().run(config, input=...) runs the full start, invoke, and stop
cycle and returns a RunResult. Pass
request=RunRequest(...) instead of input=... when the invocation needs a
caller-owned request ID or context (the two are mutually exclusive).start_runtime(...) and use the returned Runtime as an async context
manager so cleanup runs on exit — shutdown is attempted, not guaranteed
(stop() can raise FabricRuntimeError; see Consume Results And Handle
Errors). A runtime accepts one active invocation at a time; overlapping calls
raise FabricStateError.runtime.supports_openai_streaming, call
runtime.invoke_openai_stream(...), iterate the returned
OpenAIInvokeStream, and then await stream.result(). The selected adapter
descriptor must declare capabilities.streaming. Each yielded mapping has
object == "chat.completion.chunk"; an empty stream is valid. If iteration
stops early, call await stream.aclose() to drain without cancelling the
target invocation. This path does not require NeMo Relay or
streaming=True.nemo-fabric[streaming] to include the matching collector for
the default embedded streaming path. Enable NeMo Relay, pass streaming=True
to start_runtime(...), call
runtime.invoke_stream(...), iterate the returned InvokeStream, and then
await stream.result(). Iteration ending does not indicate invocation
success; invocation exceptions raise from result(), while harness-reported
failures remain normalized RunResult values. If iteration stops early,
call await stream.aclose() before starting another turn. aclose() waits
for the turn to finish; it does not cancel the harness invocation. The SDK
intentionally exposes only ATOF records generated by NeMo Relay. This path is
independent of native OpenAI streaming. The collector registers the request
before the agent is invoked, then routes the matching ATOF root scope and its
descendants by request ID and UUID ancestry. By default, streaming starts an
embedded collector. Set launch_collector=False to use an externally managed
collector; configure its base URL as the nemo-fabric-stream sink with
transport="ndjson". An external collector receives full ATOF records, which can include prompts, code, and tool output, so use only a collector the operator controls, reached over loopback or authenticated TLS. The runtime directs Relay to <base-url>/v1/atof and
uses the collector control and stream endpoints. The bundled Pi adapter requires
the embedded collector. Do not set launch_collector=False for Pi streaming.
The embedded collector waits up to completion_wait_timeout seconds (1.0 by
default) for a late agent_settled marker. The collector limits each record to
1 MiB and each request queue to 1,024 records or 16 MiB of encoded
data. The streaming=True flag does not enable NeMo Relay by itself. Without
streaming=True, startup leaves the NeMo Relay configuration unchanged.For explicit environment management, call prepare_environment(config) or
attach_environment(config, reference), then start_runtime_in(config, environment).
Use typed EnvironmentHandle and EnvironmentReference objects. Stop the
runtime before calling release_environment(environment) separately. Provider
availability and reuse limits vary; task paths must remain strings for non-local
environments. See the environment lifecycle guide.
Use await fabric.runtime_status(runtime_id=runtime_id, agent_name=name) to read recorded state and a safe discovery handle for a runtime started by the same Fabric instance. The client retains live runtime objects until successful stop. Add environment=environment for an OpenShell lookup through fabric-agent-ctl status, including from a later client process while the original server remains alive. RuntimeStatusReport reports active, stopped, or failed; server_state is present for server reads and null for direct local reads. Each client holds at most 128 runtime records, including pending starts. New starts evict the oldest successfully stopped records first; when active, failed, and pending runtimes fill the limit, startup raises FabricStateError with code="runtime_limit_reached". Retained stopped records have a null handle. Discovery handles omit environment variable values and arbitrary provider metadata; use the original Runtime for invocation and cleanup. Status reads perform no lifecycle operation or health probe. Use Fabric.check() when the consumer needs fresh health evidence.
After a caller timeout, use await fabric.invocation_result(agent_name=name, runtime_id=runtime_id, request_id=request_id) to retrieve the original invocation result. Set a stable RunRequest.request_id before dispatch. A timeout reported as invocation_timeout leaves effects unknown and does not stop the invocation. Pass the original artifacts directory from a new local client, or environment=environment for OpenShell lookup. The CLI equivalent is fabric-agent-ctl result --agent <name> --runtime-id <runtime-id> --request-id <request-id>. Lookup does not invoke or probe the harness. A null result can mean pending or unknown work and never authorizes replay. A matching buffered retry returns a saved result; changed input with the same ID is rejected. Dispatched failures save a terminal result with unknown effects and retryable=False. Results remain until their storage is removed. Restrict permissions on artifact directories and set a retention and cleanup policy.
The selected adapter owns the execution topology. The bundled Claude, Codex,
Deep Agents, and Hermes Agent adapters retain their native client, graph/checkpointer,
or agent/database inside one local host for the full runtime. Local process
and python adapters use this host lifecycle; consumers do not select another
local execution mechanism in FabricConfig. Do not replay an invocation after
a runtime failure. Stop the failed runtime and explicitly start a new one
according to the application's retry policy. When processing untrusted
content, prefer an isolated environment such as a container or the OpenShell
provider, a least privilege workspace, and the minimum forwarded credentials.
The lifecycle fragment below shows the available forms. It assumes the caller
has already set config = to_fabric_config(job) and chosen base, as described
in the configuration example above:
The printed chunks and records can contain prompts, tool output, or secrets; in production, send them to redacted, access controlled logging instead of standard output.
NeMo Fabric owns no application scheduling queue, worker pool, retry policy, or
global concurrency policy. Each runtime still permits only one active
invocation; start independent runtimes for parallel work. The NeMo Relay
streaming path uses an internal bounded transport queue and TCP backpressure
only to carry one invocation's ATOF records. Treat stream.result() as
authoritative, and reconstruct nested work from ATOF uuid and parent_uuid
fields rather than stream order.
For native OpenAI streaming, the SDK owns the authenticated loopback HTTP
transport, chunked NDJSON framing, and correlation values. Consumer code
supplies no listener or credentials. The adapter executes exactly one
invocation, and the terminal RunResult remains separate from the chunk stream.
Fully consume the stream or call await stream.aclose() before starting another
turn. Awaiting stream.result() also drains and discards unread native OpenAI
chunks, so consume the iterator first when the application needs every chunk.
Resolve and diagnose before spending work on a runtime, especially in a new environment or before relying on an optional capability:
plan(...) to confirm adapter selection and capability routing before
running. Planning validates harness.settings against the exact resolved
Adapter Descriptor and, when present, workflow.settings against the exact
resolved Adapter Target Descriptor.doctor(...) to check adapter availability, resolution, environment
context, and declared requirements such as required environment variables. Its
aggregate status is pass, warn, or fail. Invalid, unknown, or
misspelled adapter settings fail before diagnostics or runtime startup. A
resolved descriptor without a settings schema accepts only an empty settings
map.inspect_adapter(config, descriptor)
with matching catalog or canonical external metadata. The returned
AdapterInspection contains issues and capability_profile. Compatibility
failures return issues and no profile by default (diagnostics=True).
Pass diagnostics=False for exception-based rejection.
Check issues before deployment. Malformed inputs raise in both modes. Read flags from
inspection.capability_profile. The immutable
AdapterCapabilityProfile has adapter_id, descriptor_sha256, skills,
mcp, and atif fields. It does not import harness SDKs or read task-local
discovery paths. Missing metadata makes conservative claims and rejects
requested optional features. Pass expected_descriptor_sha256=profile.descriptor_sha256
to task-side run() or start_runtime() to reject descriptor drift before
startup. For a registered workflow, also pass
target_descriptor=get_target_descriptor(config.workflow.target_id) from the
matching catalog or canonical external metadata. The fingerprint then binds
both normalized descriptors, including the target factory and settings schema;
missing or mismatched metadata fails admission. Standalone fingerprints stay
unchanged. Attached services need separate admission. Declared support is not
runtime provenance or proof of an artifact.Every invocation that reaches the adapter boundary returns a normalized
RunResult, even when the harness invocation itself failed. Inspect the failure
fields before reading output:
status == "succeeded" as the only success. Other terminal values
(failed, cancelled) are unsuccessful, so branch on status, not on
error. Read status, error, and events before processing output.artifacts and telemetry references as the returned evidence for
platforms and evaluations. Store and log runtime_id, invocation_id, and
request_id separately as opaque strings.FabricError subclasses for lifecycle failures that prevent a
normalized result: FabricConfigError, FabricCapabilityError,
FabricRuntimeError, FabricStateError, and FabricNativeUnavailableError.run(...) and async with runtimes attempt cleanup automatically,
so prefer them over manual stop() — but shutdown is not guaranteed: stop(),
including the automatic call when an async with block exits, can raise
FabricRuntimeError. On a normal exit that error propagates; after an
invocation error the cleanup failure is attached to the original exception. Be
ready to handle a shutdown failure.Refer to results-and-errors.md for the full
result-field and error inventory, and
sdk-api-inventory.md for when to use each
Fabric and Runtime method.
FabricConfig,
assert plan(...) selects the expected adapter and capabilities, and — where
a harness and credentials are available — run one invocation and assert the
RunResult status and evidence.plan(...) is credential-free — use it as the CI gate that validates adapter
selection and capability routing without a model or secrets. doctor(...) also
runs without calling a model, but it checks declared environment requirements
(such as required API-key variables) and returns fail when they are unset, so
run it where the environment is provisioned and read its per-check results.just build-all rebuilds the native extension and
just test-python runs the Python suite.FabricConfig.nemo_fabric symbols are imported; no _native or adapter internals.run(...) for a single invocation,
start_runtime(...) with async with for multi-turn,
invoke_openai_stream(...) for descriptor-gated OpenAI chunks, or
invoke_stream(...) for raw NeMo Relay ATOF.plan(...) and doctor(...) validate adapter selection, capabilities, and environment before execution.RunResult status, error, and events are inspected before output; artifacts and telemetry are captured.FabricError subclasses are handled, including a FabricRuntimeError raised by shutdown; cleanup is delegated to run(...) or async with (attempted, not guaranteed).plan/doctor, tests) succeeds.Link to these canonical sources instead of duplicating them. The links track the main branch; read them at the revision that matches the pinned package version:
fabric_system_stats; omission uses before/after collection, and explicit null disables invocation stats.nemo_fabric type
stubs are authoritative for exact signatures, fields, and defaults):
client,
runtime,
native OpenAI streaming,
Relay streaming,
models,
types,
errorsfabric_model_provider to retain provider inference from the model name. Override it only when the selected adapter requires a different value; an OpenAI-compatible endpoint alone is not a reason to set openai. For example, keep the inferred nvidia provider for Mini-SWE and OpenHands with nvidia/nemotron-3-ultra-550b-a55b: both adapters add the LiteLLM nvidia_nim/ dispatch prefix. Overriding with openai passes this model ID unchanged to LiteLLM, which cannot infer its provider.
Use fabric_model_settings for adapter-declared models.default.settings;
a model is required and its descriptor still validates those settings. Keep
model credentials in Harbor's managed environment variables.
Harbor constructs a typed config from explicit agent inputs and transports it
inside a private transient run specification at the task-process boundary.
Follow the code-review example for consumer integration code; Harbor's
transport representation is an internal process-boundary contract.Inspect optional RunResult.execution for selected software inventories. Preserve full version values, status/reasons, source, origin and original observed_at when forwarding. Context refs are result-local; participants describe installation users. Use FabricConfig.provenance=ProvenanceConfig(enabled=False) before startup to disable collectors on host and guest. Explicit owner snapshots use typed ProvenanceConfig.reports through existing configuration dispatch; guests never inspect the caller installation. Old results can omit execution evidence. Unknown or incomplete reports are not proof of equal environments. Software evidence records installation users and versions; disable provenance as shown above or redact these fields before forwarding results to external platforms.
Get started with chainctlchainctl skill install public/nvidia/nemo-fabric-integrate:latest
Bring Chainguard's hardening pipeline to your first-party skills — custom rulesets, automated remediation, full audit trail.
skills.chainreg.biz/public/github.com/nvidia/skills/nemo-fabric-integrate:latest
Apache-2.0
BENCHMARK.md
HARDENING.md
SKILL.md
evals/evals.json
references/config-mapping.md
references/results-and-errors.md
references/sdk-api-inventory.md
skill-card.md
skill.oms.sig