| slug | /adapter-contract/examples-and-references |
|---|
{/* SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0 */}
Use the example that matches the integration shape you chose. Review its descriptor, lifecycle implementation, and consumer configuration, in that order. The canonical schemas remain authoritative when an example omits a field.
| Integration Shape | Start With | What It Demonstrates |
|---|---|---|
| Harness adapter | Hermes Agent descriptor and runtime | A complete harness integration with normalized configuration, persistent state, and telemetry. |
| Minimum-surface harness adapter | mini-SWE-agent descriptor and runtime | The required typed config boundary and start/invoke/stop, plus an optional subclass-based Relay integration. |
| Shared framework adapter | NeMo Agent Toolkit adapter descriptor, runtime, and targets | One adapter plus independently registered calculator and email-phishing workflows. |
| Dedicated custom-agent adapter | LangGraph descriptor and runtime | A custom graph with an adjacent adapter and no generic workflow loader. |
Use the Hermes Agent adapter as the primary reference for integrating an opinionated harness. Its descriptor and runtime demonstrate normalized models, MCP, instructions, runtime settings, persistent session state, and Relay telemetry through one harness adapter.
Use mini-SWE-agent as the secondary minimum-surface reference when you want to understand the required boundary at a glance. Its package contains:
- A static Adapter Descriptor that accepts a small normalized config surface
- One runtime class with
start,invoke, andstop - One optional mini-SWE-agent subclass for Relay telemetry
- The optional common Python lifecycle host
- One package README with a complete consumer configuration
The adapter retains the model, environment, agent, and conversation state in one runtime instance. It does not implement MCP, skills, or native streaming. When Relay is enabled, it selects an adapter-owned subclass that emits live invocation, step, LLM, and tool telemetry without changing the default path.
Start with the NeMo Agent Toolkit reference when one adapter must support many custom agents built for a framework. Read these files in order:
nat.fabric-adapter.jsondeclarestarget_types: ["workflow"], normalized configuration, tool definition schema, and native OpenAI streaming.email-phishing-analyzer.fabric-target.jsonselects the shared adapter and supplies the workflow entry point and settings schema.calculator.fabric-target.jsonshows a second target that reuses the same adapter contract.adapter.pytranslatesAgentConfiginto NeMo Agent Toolkit configuration and owns the retained workflow lifecycle.
The consumer selects a target, not an entry point:
FabricConfig(
workflow=WorkflowConfig(
target_id="nvidia.examples.nat.email-phishing-analyzer",
settings={"llm_name": "default"},
),
models={"default": ModelConfig(...)},
)Planning resolves the target's adapter and projects the target-owned entry
point into AgentConfig.workflow. A second target changes the target ID and
settings schema without changing the shared Adapter Descriptor.
Start with the LangGraph email-phishing example when the custom application is the clearest integration boundary. Its directories make ownership explicit:
consumer/ownsFabricConfigand invocation.adapter/receivesAgentConfig, translates dependencies, and owns the lifecycle.agent/contains application behavior without an NVIDIA NeMo Fabric dependency.
The descriptor directly selects this adapter and does not declare
target_types or accept workflow. Its minimum path maps one model and one
system instruction, compiles the graph during start, invokes the retained
graph, and releases its references during stop. Optional MCP and Relay
modules are adjacent additions rather than requirements of the minimum
lifecycle.
Across all examples, keep these ownership boundaries intact:
| Consumer Side | Adapter Side | Current v1alpha2 Behavior |
|---|---|---|
FabricConfig |
AgentConfig |
Planning resolves, validates, and projects config before start. |
RunRequest |
AgentRunRequest |
NeMo Fabric projects caller input, context, and declared request extensions before invocation. Request identity is supplied through RuntimeContext. |
RunResult |
AgentRunResult |
The adapter returns typed status, output, error, usage, artifacts, and declared extensions; NeMo Fabric validates and enriches them for the consumer. |
Use the
schemas/adapter-contract/ directory
for exact southbound wire shapes and
Stage 1: Describe the Adapter to begin
your own descriptor.