Generated banner for Nemo Fabric Build Adapter
Generated logo for Nemo Fabric Build Adapter

Nemo Fabric Build Adapter

NVIDIAOfficialPublished by NVIDIA

  • Skill
  • Tool integration
  • Software development
  • Apache-2.0
  • Medium risk

From the author

Build, migrate, review, and maintain third-party NVIDIA NeMo Fabric adapters against the public adapter contract. Use when creating adapter or target descriptors, mapping AgentConfig into an agent harness or custom-agent runtime, implementing start/invoke/stop, declaring schemas and capabilities, packaging discovery metadata, or assessing adapter conformance. Do not use for consumer applications that only call the NVIDIA NeMo Fabric SDK.
— the description by NVIDIA

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured procedure for developing third-party adapters that interface with NVIDIA NeMo Fabric. It emphasizes maintaining a thin adapter layer that focuses on target translation and lifecycle management while delegating planning and consumer-facing logic to the NeMo Fabric framework. The guide covers the entire development lifecycle, from reading the adapter contract and defining descriptors to packaging metadata, mapping configurations, and implementing lifecycle operations like start, invoke, and stop.

What it does

  • Defines the adapter boundary and stable adapter identifiers.
  • Provides instructions for creating and validating adapter and target descriptors.
  • Outlines the mapping of AgentConfig into target-native constructs.
  • Details the implementation of lifecycle methods for runtime management.
  • Explains how to handle session continuation and usage reporting.
  • Offers a checklist for validating adapter conformance before deployment.

When to use it

  • When creating a new third-party adapter for the NVIDIA NeMo Fabric ecosystem.
  • When migrating or updating an existing adapter to comply with the public contract.
  • When implementing custom-agent runtimes or target translation logic.
  • When assessing the conformance of an adapter against the NeMo Fabric contract.

Advantages

  • Ensures architectural consistency by keeping adapters thin and focused.
  • Provides clear guidance on schema usage and descriptor creation.
  • Standardizes lifecycle management and error handling across adapters.
  • Facilitates reliable session state management and telemetry integration.

Usage examples

“How do I define a new adapter descriptor for a custom NeMo Fabric integration?”
The agent will guide you through creating a *.fabric-adapter.json file, setting the contract version, declaring normalized config fields, and publishing schemas for settings and models.
“What is the correct way to implement the lifecycle methods for a Python-based adapter?”
The agent will provide a template using the common host lifecycle, showing how to implement start, invoke, and stop methods while ensuring proper state isolation.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/nvidia/nemo-fabric-build-adapter/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip nemo-fabric-build-adapter.zip -d .agents/skills

Documentation by NVIDIA

Build an NVIDIA NeMo Fabric Adapter

Build against the published southbound contract. Keep the adapter thin: let NeMo Fabric own planning and consumer-facing behavior, and let the adapter own only target translation and lifecycle state.

Read the Contract

Read the current adapter contract before changing code. Start with the overview, choose an integration shape, then follow the numbered descriptor, configuration, execution, results, registration, and verification stages. Read the custom-agent page when the target loads application-defined agents or workflows. Read the optional native OpenAI streaming page only when the adapter claims that capability.

Use the committed adapter-contract JSON Schemas or the schemas installed with the matching NeMo Fabric release for exact wire shapes. Do not reconstruct a schema from examples or copy field lists into adapter code.

Establish the Boundary

Establish the adapter boundary before defining its descriptor:

  1. Identify the adapter implementation and its stable adapter_id.

  2. Choose a harness adapter, a shared framework adapter with registered targets, or a dedicated custom-agent adapter.

  3. Reuse one shared adapter across custom agents when the framework provides stable loading and invocation semantics. Use a dedicated adapter when the agent itself is the only unambiguous execution boundary.

  4. List the normalized fields the target can actually enforce.

  5. Separate adapter-wide harness.settings, per-target workflow.settings, and typed extensions.

  6. Keep installation, environment preparation, Relay orchestration, caller scheduling, and consumer result enrichment outside the adapter.

If the requested behavior cannot be expressed by the current contract, surface the gap. Do not silently consume an unsupported northbound field or hide it in an unrelated extension.

Define the Descriptor First

Create one self-contained *.fabric-adapter.json before implementing target translation:

  • Set the current contract_version, a globally stable adapter_id, adapter_kind, and runner binding.

  • Declare only normalized config.accepts fields the implementation enforces.

  • When accepting instructions.system, declare the exact supported config.system_instruction_modes. New descriptors must not rely on the legacy omitted-value behavior, which means replace only.

  • Declare mcp.auth.oauth2 or mcp.auth.service_account only when the adapter implements the corresponding MCP authentication mode.

  • Publish closed settings_schema, model_schema, tool_definition_schema, and extension_schemas where applicable. Use model_schema only for static model/provider compatibility and model settings; keep credential validity and provider availability in startup validation.

  • New adapters that consume models.<role>.top_p or .max_tokens should declare the corresponding normalized config.accepts field. Existing descriptors that declare either name through extension_schemas.model remain compatible and receive it in AgentModelConfig.extensions.

  • Declare runtime requirements and telemetry outputs without secret values.

  • Leave optional capability flags false unless the installed NeMo Fabric runtime exposes and tests that adapter operation. Set capabilities.streaming only when the adapter implements native OpenAI Chat Completions streaming through invoke_openai_stream. Relay-backed ATOF streaming is independent and does not require this capability.

If the adapter loads registered targets, list their types in target_types. Create one *.fabric-target.json per target. The target record owns its adapter_id, type-specific entry point, and workflow settings schema. It uses the same contract_version as the Adapter Descriptor.

Validate descriptor schemas without importing adapter code. Keep all schema references local to the descriptor document; do not rely on HTTP or file references.

Package Discovery Metadata

Install the descriptor in the standard shared-data location. For setuptools:

[tool.setuptools.data-files]
"share/nemo-fabric/adapters/acme" = ["acme.fabric-adapter.json"]
"share/nemo-fabric/targets/acme" = ["email.fabric-target.json"]

Depend on nemo-fabric-adapter-contract for typed standard-library dataclasses. Install its optional pydantic extra only for Pydantic interoperability. Add nemo-fabric-adapters-common only if the adapter chooses its lifecycle or Relay helpers. A bare adapter package should not depend on the NeMo Fabric runtime.

For a TypeScript adapter, depend on nemo-fabric-adapter-contract. Import descriptor, configuration, runtime-context, request, and result types from the package root, matching the Python package's single model namespace. TypeScript types do not validate data received from a process or network boundary; validate untrusted values against the JSON Schemas included with the package.

Map AgentConfig

Accept a validated AgentConfig and translate each declared field once at the adapter boundary:

  • Resolve named model roles into target-native model clients or settings.

  • Apply normalized instructions and runtime limits only when declared. Validate instructions.system.mode at the adapter startup boundary as well as during planning; replace discards the harness default, while append preserves it and adds the configured content after it.

  • Convert MCP servers, tool definitions, tool policy, and skills into native target constructs.

  • Resolve workflow entry points and construction settings during start in the task environment.

  • Read identity, environment, artifacts, and telemetry from RuntimeContext, not from workflow settings.

Reject unsupported values with stable, safe error codes. Do not log complete configs, environment values, headers, credentials, or arbitrary user input.

Use typed extension models and publish their schemas at the exact descriptor extension point. Never treat extensions as an unchecked dictionary escape hatch.

Implement the Lifecycle

Implement exactly one start, zero or more ordered invoke operations, and one stop for each NeMo Fabric runtime.

  • Construct and retain target state in start.

  • Accept AgentRunRequest and RuntimeContext, then return one AgentRunResult from invoke.

  • Make stop safe after partial startup and failed invocation.

  • Isolate mutable state between independent runtimes.

  • If the descriptor declares capabilities.streaming, implement async invoke_openai_stream(request, context, emit). Execute the target exactly once, await emit(chunk) only for the openai.chat_completions.chunk/v1 profile, and return one AgentRunResult. Each chunk requires non-empty id and model, a nonnegative integer created, the exact chat.completion.chunk discriminator, and structurally valid choices. An invocation that emits no chunks is valid.

  • Do not add an adapter streaming method for Relay-backed Runtime.invoke_stream(); execute ordinary invoke and use the provided telemetry context.

For native OpenAI streaming, the SDK owns the authenticated loopback HTTP transport with chunked NDJSON framing. The common host validates the transport, removes its credentials from the adapter payload, and supplies the emit callback. Do not persist or log stream credentials, write chunks to stdout, add SSE framing, or forward other target-native event profiles.

For a Python adapter that opts into the common host:

from nemo_fabric_adapter_contract.models import AgentConfig
from nemo_fabric_adapter_contract.models import AgentRunRequest
from nemo_fabric_adapter_contract.models import AgentRunResult
from nemo_fabric_adapter_contract.models import AgentRunStatus
from nemo_fabric_adapter_contract.models import RuntimeContext
from nemo_fabric_adapters.common import lifecycle


class TargetRuntime:
    async def start(self, payload):
        config: AgentConfig = payload["config"]
        ...

    async def invoke(
        self,
        request: AgentRunRequest,
        context: RuntimeContext,
    ) -> AgentRunResult:
        native = await self.target.run(request.input)
        return AgentRunResult(
            status=AgentRunStatus.SUCCEEDED,
            output={"response": native.text},
        )

    async def invoke_openai_stream(self, request, context, emit):
        async for chunk in self.target.stream(request.input):
            await emit(chunk)
        return AgentRunResult(
            status=AgentRunStatus.SUCCEEDED,
            output={"response": self.target.final_text},
        )

    async def stop(self):
        ...


def main() -> None:
    lifecycle.serve(TargetRuntime, config_loader=AgentConfig.from_mapping)

The common host decodes the internal lifecycle envelope before calling the adapter and encodes its terminal result afterward. Adapter code does not parse the transport envelope or infer failure from fields inside output. Return AgentRunStatus.FAILED with an AgentRunError when the target completes with a failed outcome. Raise an exception when the adapter cannot produce a normalized terminal result.

Support Warm Session Continuation

When later invocations must use earlier conversation state, retain that state on the adapter runtime created during start. Prefer a target-native live session whose lifetime and retention behavior are suitable for the deployment. Do not substitute a framework's development-only in-memory checkpointer in a production adapter. If the target has no suitable facility, retain the adapter-owned history required to construct its next native request.

Bound retained history so a live runtime cannot grow memory or model input without limit. When consumers need control, publish a typed adapter-wide harness.settings or target-specific workflow.settings field with explicit units, defaults, validation bounds, and overflow behavior. Do not overload runtime.max_turns, which limits one invocation's agent loop.

Keep session state separate from invocation state. Conversation context, required artifact references, and live workspace state may persist until stop; timeout state, invocation counters, terminal markers, result assembly, usage, and telemetry scopes reset for each invoke. Independent runtime instances must never share mutable continuation state.

Normalize usage per invocation in AgentUsage. If the target reports cumulative session totals, retain a session-local baseline and difference successive observed counters rather than summing cumulative snapshots or using only the last model response. Missing or reset counters remain unknown. Report cached_input_tokens when available and declare whether input_tokens includes cache with input_tokens_include_cache; omit the flag when the target's semantics are unknown. Preserve available usage on unsuccessful terminal results. Do not infer missing cost or promote estimates to cost_usd.

Test observable continuation rather than merely calling invoke twice: make the second result depend on the first turn without caller-side replay, then prove another runtime cannot observe that context. Refer to the LangGraph custom-agent example for an adapter-owned history pattern.

For in-process Relay SDK telemetry where the adapter owns the invocation-level Agent scope, wrap that scope with relay_request_context(context.request_id, request.relay_session_root) from nemo_fabric_adapters.common.utils. The helper uses a UUID request ID as Relay's propagated root and always returns nemo_fabric_request_id metadata, including for non-UUID request IDs. When the caller sets the typed AgentRunRequest.relay_session_root to a UUID string Relay accepts, that value becomes the root instead, a UUID request ID stays the parent (otherwise the session root is), and nemo_fabric_session_root is added to the metadata, so the caller's invocations share one Relay session. Context keys do not control propagation. An unusable session root falls back to a usable UUID request ID without raising; if neither value is usable, the helper returns nullcontext() without setting propagation. Do not apply this pattern to an external Relay gateway or an upstream integration that creates an isolated scope context unless its boundary accepts a per-turn propagation context.

Handle Custom Agents

For a shared framework adapter, select the registered target with FabricConfig.workflow.target_id. Use the selected Adapter Target Descriptor's spec.entrypoint.kind for adapter-scoped resolution semantics and ref for the factory identity. Validate workflow.settings against that target's spec.settings_schema.

  • Define only entry-point kinds that the shared adapter resolves unambiguously. The v1alpha2 contract does not define a global kind catalog.

  • Map a declared factory intent to the corresponding target-native factory. The current NeMo Agent Toolkit reference maps fabric.agent.react to its ReAct workflow factory.

  • Supply factories an adapter-defined build context containing already resolved native values; do not require custom agents to parse FabricConfig or AgentConfig.

  • Use a dedicated adapter without an artificial workflow entry point when the selected adapter already identifies one application-owned agent.

Compare the NeMo Agent Toolkit shared adapter with the dedicated LangGraph example before choosing the custom-agent boundary.

Validate Before Handoff

Complete these checks before handing off an adapter:

  1. Install the built wheel in an isolated adapter environment.

  2. Confirm discovery below share/nemo-fabric and inspect the resolved adapter and target descriptors in Fabric().plan(...).

  3. Exercise one accepted normalized config and rejection for unsupported fields and each declared schema.

  4. Run doctor(...) with both missing and satisfied requirements.

  5. Test start, success, target failure, malformed output, repeated invocation, stop, partial-start cleanup, EOF cleanup, and two-runtime isolation.

  6. If native OpenAI streaming is claimed, test empty and multi-chunk streams, malformed and oversized records, invalid chunks, sequence and identity mismatches, a missing end record, early consumer close without cancellation, a separate terminal result, one active turn, and exactly one target invocation.

  7. Test Relay correlation separately if telemetry support is claimed.

  8. Report the adapter package version, contract version, required-profile result, and every optional capability as supported or unsupported.

Do not claim automated NeMo Fabric conformance until the published conformance suite exists and the exact adapter release passes it.

Files

LICENSE

Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server, Needs Python

Security

What our scanner noticed· Medium risk

  • Large base64-encoded blobs

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
NVIDIA
Publisher
NVIDIA (Official)
Source
NVIDIA/skills · skills/nemo-fabric-build-adapter · commit fce3cca
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE-APACHE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by NVIDIA or NVIDIA.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download nemo-fabric-build-adapter.zip