Skip to content

[Epic] Integrate Switchyard routing into NemoClaw-managed Hermes through native NeMo Relay #7937

Description

@cjagwani

Scope decision — accepted

Canonical NemoClaw scope was accepted in the 2026-08-13 maintainer decision recorded in this issue. The Hermes-first integration may proceed as dependency-aware implementation work. General availability remains gated on stable released upstream artifacts and all compatibility, credential, policy, lifecycle, and E2E criteria below.

Problem

NemoClaw can run Hermes, and the upstream native integration is converging, but NemoClaw does not yet provide an approved, released, secure, and end-to-end validated way to enable Switchyard model routing for a managed Hermes sandbox.

Without that integration, users must choose compatible upstream revisions, build or install experimental plugin code, write Relay and Switchyard configuration, attach multiple provider endpoints and credentials, widen network policy, diagnose silent activation failures, and decide retry/fallback behavior themselves.

V5 goal

A user explicitly enables an approved Switchyard routing configuration for a NemoClaw-managed Hermes agent. Normal Hermes turns then use the released native path:

  • no Relay CLI wrapper;
  • no switchyard-server sidecar;
  • no upstream source checkout or ad hoc build;
  • at least two real target models behind OpenShell-secured provider boundaries;
  • persistent, fail-closed activation;
  • canonical non-secret routing evidence; and
  • restart, rebuild, cleanup, and negative-security qualification.

The first milestone qualifies seeded weighted-random and LLM-classifier routing. Stage routing, response-judging escalation, and other routers require separate qualification before being called supported.

Exact architecture and ownership

NemoClaw-managed OpenShell sandbox
└── normal supervised Hermes process
    └── native NeMo Relay runtime
        └── released nvidia.switchyard plugin
            └── OpenShell-secured providers
                ├── judge/classifier, when required
                ├── weak/efficient target
                └── strong/capable target

Relay intercepts and replaces Hermes downstream LLM execution with the Switchyard plugin async generator. Switchyard produces the RoutingOutcome, rewrites the request, and executes the selected target. Relay owns plugin discovery, activation, correlation, and lifecycle. Switchyard owns the routing algorithm and selected-target execution. Everything runs in the supervised Hermes process with zero Relay or Switchyard sidecars.

Within this accepted scope, NemoClaw owns:

  1. selecting and verifying a released compatible Hermes, Relay, Switchyard, plugin, and OpenShell set;
  2. installing verified artifacts for supported Linux architectures without source builds;
  3. generating the released two-file activation/deployment contract and failing readiness when requested routing is inactive;
  4. provisioning judge, weak, and strong provider identities through OpenShell without exposing raw credentials;
  5. enforcing network, redirect, timeout, retry, fallback, cancellation, and stream-failure policy;
  6. exposing bounded non-secret active-state and per-turn routing evidence; and
  7. managed E2E, security, upgrade, rollback, operations, and support documentation.

NemoClaw does not own Switchyard algorithms, provider HTTP transport, a fork of the Relay plugin, benchmark claims, or a second harness-specific routing implementation.

Executive readiness update — 2026-08-31

The architecture has been proven experimentally and upstream is converging on the same zero-sidecar, in-process design. It is not yet a supported NemoClaw integration: there is still no complete stable Hermes + Relay + Switchyard plugin release tuple.

Dependency Current evidence NemoClaw implication
Hermes loader Hermes Agent 0.20.6 (v2026.8.27) contains the released in-process Relay loader from NousResearch/hermes-agent#77915, but still requires Relay below 0.8 and locks Relay 0.7.2. Hermes #96633 has green required CI at e4123f1a and upgrades the requirement and lock to Relay 0.8.2. The intended loader is released, but #96633 still needs approval, merge, and a Hermes release before NemoClaw can select the compatible runtime.
NeMo Relay Relay 0.8.2 is the latest stable patch, with a verified annotated tag and digest-bearing Linux amd64/arm64 assets. Stable 0.8.1 established the signed, trusted dynamic-plugin default, and Hermes #96633 now requires and locks 0.8.2. The latest source-level runtime tuple aligns, but NemoClaw must preserve the plugin trust policy and wait for an approved, merged, released Hermes lock.
Switchyard native plugin NVIDIA-NeMo/Switchyard#528 is open and review-required at 5e30df40. It requires Relay 0.8.1 and includes fixes for unmanaged-request pass-through, final streaming-token metrics, cross-format requests, MCP tool namespaces, and redaction-safe in-band stream-failure reporting; refreshed CI is green. Source-level compatibility is close, but a green moving PR head is not an installable or supported artifact. Functional and security review must finish.
Switchyard release v0.2.0 remains the latest stable Switchyard release and has no released native nvidia.switchyard plugin bundles. NemoClaw still has nothing immutable to install for the final native plugin path.
Plugin packaging and trust #528 contains bundle materialization, but no signed, provenance-bound Linux amd64/arm64 release bundles exist. #8885 remains the production dependency-selection gate. Archive hashes alone are insufficient under Relay 0.8.1's trusted-plugin default.
Routing evidence #528 defines switchyard.routing.decision as the canonical success event and now carries bounded typed routing metrics. The event contract must be released and then correlated to real Hermes turns in #8889; provider logs are not canonical evidence.
OpenShell provider boundary OpenShell v0.0.116 is stable. NVIDIA/OpenShell#2722 remains open, and PR #2962 remains review-required. Fresh provider provisioning can be developed, but safe identity-bound reuse, mutation, attestation, and credential rotation cannot yet be claimed.

What NemoClaw can do now

Dependency-aware implementation may continue under the accepted scope: generate the two-file Relay/Switchyard configuration, prepare secure judge/weak/strong provider binding, implement fail-closed readiness, verify immutable artifacts, and build E2E/security scaffolding. These paths must remain disabled and must not select PR heads, prereleases, source builds, latest URLs, or unbound artifacts.

What opens the production gate

The production selector and merge gate opens only when #8885 records one stable, immutable, resolver-valid, provenance-bound tuple: a released Hermes version locking one exact compatible stable Relay version; reviewed, signed Switchyard plugin bundles for Linux amd64 and arm64; accepted provider-transport protections; and compatible OpenShell provider evidence. #8886#8889 then qualify activation, credentials, failure behavior, two real targets, canonical events, and lifecycle/security behavior.

V0–V5 evidence ledger

Iteration Architecture Result Meaning
V0 Relay 0.6 sidecar plus separate switchyard-server Superseded Historical compatibility path only
V1 Relay CLI wrapper launches one-off Hermes; Switchyard is statically linked Passed; frozen at d58276a Proved the components could classify, choose semantic targets, and stream inside a managed sandbox
V2 Supervised Hermes loads Relay and the external Switchyard plugin in-process Passed; frozen at 3c6932b Proved the intended zero-sidecar process topology and repeated turns
V3 V2 plus final calls through inference.local Passed; frozen at 28749b8; repaired at 34d1b06 Proved gateway-owned credential substitution while exposing the single-host-model limitation
V4 demo Native in-process path plus three attached OpenShell providers, two real cloud targets, route watcher, and read-only UI label Passed as experimental evidence; frozen to Switchyard #270 commit c69a8b68f7c85e4b610c077690f90db6de9053ed Proved the desired experience and security shape, not a released support contract
V5 Stable released artifacts, accepted scope, canonical configuration, secure providers, failure policy, E2E, and docs Dependency-aware design and draft implementation are underway; the production selector remains blocked Final supported integration after the immutable release tuple and qualification gates pass

Preserve V4 on its qualified immutable commit. Do not replace it with a moving PR head. Remove prototype overlays only after the released V5 replacements pass equivalent and stronger evidence.

Delivery tracker

Work package Deliverable Issue Current state
Product decision Canonical NemoClaw vs Community Solutions; lifecycle, compatibility, security, E2E, and support owners This issue Accepted 2026-08-13
Released compatibility and packaging Stable tuple, exact locks, two architectures, immutable hashes, producer provenance, no source builds #8885 Relay 0.8.2 and Hermes #96633 now align at source level; blocked on a released Hermes lock and signed Switchyard bundles
Activation and readiness Released manifest-backed Relay activation plus Switchyard deployment; exact route identity; fail-closed readiness; zero sidecars #8886 Two-file contract prepared; runtime selector remains blocked on #8885
Secure provider boundary Separately attached judge/weak/strong providers; gateway-authored evidence; no raw credentials #8887 Fresh-only design prepared; reuse/mutation/rotation remain blocked on OpenShell #2722 or an accepted equivalent
Network and failure behavior Destination policy, redirect/body/SSE bounds, deadlines, retries, fallback, cancellation, redaction #8888 Contract prepared; upstream transport gaps remain
Managed qualification Released topology, two real targets, canonical decision events, restart/rebuild, negative security, exact evidence and teardown #8889 Contract prepared; waits on prior gates
Documentation and operations Compatibility matrix, enable/disable, upgrade/rollback, limitations, ownership, troubleshooting Follow-up after #8889 Not started
Additional routers StageRouter and response-judging escalation behavior/evaluation Separate follow-ups Out of first milestone
Other harnesses Reusable Relay-host contract and gaps for OpenClaw/Deep Agents Separate design after Hermes Out of Hermes-first scope

Configuration and provider decisions

The released path uses two explicit files:

  1. a manifest-backed Relay activation file containing plugin identity, native API/ABI compatibility, immutable entrypoint/bundle identity, and deployment path; and
  2. a Switchyard v1 deployment document containing llm_clients, targets, and routes.

NemoClaw must reject the older plugin_id-only form, unknown route IDs, incompatible API/ABI/ranges, missing assets, and requested-but-inactive routing before any provider request.

For the first V5 provider design, use three separately attached OpenShell providers: judge, weak, and strong. Keep inference.local as Hermes's ordinary bootstrap/default route; do not use it for Switchyard targets because it represents one gateway-wide host-selected model.

Each Switchyard llm_client receives an endpoint-scoped raw-key placeholder through api_key_env; Switchyard constructs the provider Authorization header. forward_auth remains false. Caller authorization, cross-provider placeholder use, direct-provider egress, and silent fallback to inference.local must be denied.

Fresh creation of uniquely named providers is the initial boundary. Existing-provider reuse, update, mutation, and credential rotation remain blocked until OpenShell provides identity-bound conditional mutation and secret-free endpoint/profile attestation or an accepted equivalent.

Supported acceptance criteria

  • Maintainers accepted canonical product scope and the documented ownership boundary on 2026-08-13.
  • A fresh sandbox consumes only stable, compatible, immutable, provenance-verified artifacts for every supported architecture.
  • Normal supervised Hermes loads Relay and nvidia.switchyard persistently with zero routing sidecars.
  • Requested routing becomes active and ready before the first provider request.
  • Repeated Hermes turns select at least two distinct real target models.
  • Provider credentials remain outside agent-visible files, environment, argv, logs, errors, telemetry, and artifacts and resolve only at intended endpoints.
  • Unauthorized egress, caller-auth forwarding, cross-endpoint use, and routing bypass fail closed.
  • Invalid activation, missing/corrupt plugin, provider denial, redirect, timeout, retry exhaustion, fallback, cancellation, and post-first-stream failure are qualified.
  • Buffered, streaming, tool, session, restart, rebuild, cleanup, and redaction behavior remain correct.
  • Every routing assertion comes from the canonical switchyard.routing.decision event correlated to the Hermes turn—not reconstructed provider logs.
  • Machine-readable evidence binds expected cases, observed pass status, exact artifacts/digests, architecture, topology, provider identities, route correlation, redaction scan, and teardown.
  • Documentation names supported versions, routers, ownership, enable/disable, limitations, upgrade, rollback, and troubleshooting.

Constraints and non-goals

  • Do not rewrite or vendor Switchyard routing algorithms in NemoClaw.
  • Do not harden the Relay CLI/static-plugin or Decision API sidecar prototypes into the supported default.
  • Do not treat merged source, a prerelease, a green partial CI run, or a working demo as a released compatibility set.
  • Do not put raw provider credentials in the sandbox.
  • Do not broaden the first milestone to every Relay feature, Switchyard router, model recipe, or agent harness.
  • [Epic] Deliver the Hermes Harness Optimization Blueprint with NeMo Platform Insights #8501 owns benchmark-backed Hermes recipes; this Epic owns the routing/security/platform contract.

Other agent harnesses

The platform design can extend beyond Hermes only when another harness provides equivalent Relay lifecycle, downstream model-call interception, configuration, routing metadata/feedback, and credential-bound provider execution. NemoClaw should reuse the secure provider and policy layers where possible, but each harness needs separately accepted adapter/lifecycle scope and E2E evidence. Hermes is first because the native loader exists upstream.

Remaining decisions

  • Who owns compatibility, security review, live E2E, release qualification, and support lifecycle?
  • Which future stable Hermes/Relay/Switchyard/plugin/OpenShell tuple is the first supported record?
  • What released producer publishes the native bundle for both required architectures with immutable provenance?
  • Is fresh-only provider provisioning acceptable for the first milestone, or must OpenShell docs: add Brev troubleshooting guide #2722 land first?
  • Which seeded random/classifier recipe is the first supported preset, and who owns its benchmark evidence?
  • What exact upstream fallback behavior is accepted before and after the first streamed event?

Discovery and coordination

  • Will Curran: confirmed the Hermes-first goal and requested assessment for other harnesses.
  • Sean Lopp: provided Hermes integration and setup/runtime UX context and directed contract questions to Michael Demoret.
  • Michael Demoret: identified Relay as the intended Hermes integration surface.
  • Bryan Bednarski: confirmed the in-process direction and release sequencing.
  • Ryan Lempka: provided Switchyard configuration, benchmarking, metadata, and library-mode context.
  • Apurv Kumaria: Security Observer's Deep Agents weak/strong prototype informed demo clarity and secure provider handling.
  • Aaron Erickson: requested this Epic and the concrete issues/PR plan.
  • Supporting material from Alex Fournier, the NeMo Relay team, the Switchyard team, and the Hermes team was also reviewed.

Related work

Checklist

  • Prototype evidence and limitations are preserved.
  • Current upstream release state and exact remaining gates are documented.
  • NemoClaw, Relay, Switchyard, Hermes, OpenShell, and benchmark ownership are separated.
  • Compatibility, activation, provider, failure-policy, and E2E child issues are concrete.
  • The frozen V4 demo is separated from the released V5 path.
  • Canonical NemoClaw scope accepted on 2026-08-13.

Metadata

Metadata

Assignees

Labels

area: architectureArchitecture, design debt, major refactors, or maintainabilityarea: networkingDNS, proxy, TLS, ports, host aliases, or connectivityarea: providersInference provider integrations and provider behaviorarea: routingRequest routing, policy routing, model selection, or fallback logicarea: sandboxOpenShell sandbox lifecycle, runtime, config, or recoveryintegration: hermesHermes integration behavior

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions