Nemo Relay Instrument Typed Wrappers
NVIDIAOfficialCreated by NVIDIA Corporation and Affiliates
- Skill
- Tool integration
- Software development
- Apache-2.0
- Medium risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides guidance on implementing typed wrappers, domain types, and provider codecs within the NeMo Relay framework. It focuses on maintaining strict domain types for application logic while ensuring that middleware and LLM provider interfaces continue to operate on predictable JSON structures. The skill covers the use of built-in codecs like Pydantic or Dataclass codecs, as well as provider-specific codecs for normalizing LLM request and response payloads.
What it does
- Defines how to translate application-facing domain objects into JSON for middleware compatibility.
- Provides patterns for using Pydantic, dataclasses, or custom codecs to enforce type safety.
- Explains the distinction between typed value codecs and LLM provider-specific codecs.
- Outlines the lifecycle of request and response codecs during LLM execution.
- Ensures that middleware and guardrails maintain visibility into serialized data shapes.
- Offers a validation checklist to ensure codec integrity and middleware compatibility.
When to use it
- When you need to integrate stronger domain types into a NeMo Relay application.
- When you need to normalize LLM provider-specific request or response payloads.
- When you want to preserve JSON middleware semantics while using typed objects in your application code.
- When you need to ensure that custom domain models survive serialization cycles.
Advantages
- Enables type-safe development without breaking existing JSON-based middleware.
- Supports standard Python and Node.js serialization patterns.
- Maintains consistency across different LLM providers through standardized codecs.
- Allows for flexible integration via BestEffortAnyCodec when schemas are dynamic.
Usage examples
- “How do I add a Pydantic model to my NeMo Relay workflow?”
- Use the PydanticCodec to define a boundary translator that converts your Pydantic model to JSON before middleware processing, ensuring the framework handles the serialization correctly.
- “Which codec should I use for an Anthropic LLM integration?”
- Use the AnthropicMessagesCodec to normalize the provider-specific payload, ensuring that middleware can inspect message fields and tool calls without breaking the underlying call.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/nemo-relay-instrument-typed-wrappers/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip nemo-relay-instrument-typed-wrappers.zip -d .agents/skills
Documentation by NVIDIA Corporation and Affiliates
Use Typed Wrappers And Codecs
Use this skill when an application wants stronger domain types than raw JSON for tool or LLM integration. Keep typed boundaries explicit so middleware still sees predictable JSON.
Default Guidance
Prefer plain JSON first for initial adoption.
Reach for typed wrappers when the application already has stable domain models.
Keep in mind that middleware still operates on JSON, not typed objects.
Embedded Codec Model
A typed value codec is a pure boundary translator. It converts application-facing values to JSON before NeMo Relay emits events or runs middleware, then converts JSON back into the framework callback or caller type.
Python exposes
JsonPassthrough,DataclassCodec,PydanticCodec, andBestEffortAnyCodec. Node.js exposesJsonPassthroughplus customCodec<T>implementations.Use
BestEffortAnyCodeconly at boundaries where strict schemas are not available. Prefer dataclass, Pydantic, or explicit Node.js codecs when the framework owns a stable schema.Provider codecs are different from typed value codecs: they normalize provider-specific LLM requests and responses so middleware and subscribers can inspect messages, tools, model names, generation parameters, and response annotations.
Built-in provider codecs include
OpenAIChatCodec,OpenAIResponsesCodec, andAnthropicMessagesCodecin Python, Node.js, and Rust. Choose the codec that matches the actual provider payload shape.Response codecs annotate LLM end events with fields such as
id,model,message,tool_calls,finish_reason,usage, provider-specific data, and extra unmodeled fields. They do not rewrite the caller-visible response.Request codecs run before LLM request intercepts. Intercepts receive both the raw
LLMRequestand optional annotated request;encodemerges annotated edits back before execution intercepts and the provider callback run.
Key Rules
Typed wrappers are currently a first-class path for Python and Node.js; Rust uses codec traits directly
Request/response conversion belongs in codecs
Intercepts and guardrails see JSON values after encoding
Changes made by middleware survive into the decode step
Choose A Codec
JsonPassthroughfor JSON-native valuesDataclassCodecorPydanticCodecin Python when the models already existCustom codecs for domain-specific wire shapes
BestEffortAnyCodeconly when broad flexibility is worth the looser contractProvider codecs for LLM provider payloads, not application domain objects conversion
Validation Checklist
[ ] Codec output is JSON-compatible
[ ] Required fields survive
toJson/fromJsonordecode/encode[ ] Middleware sees the expected serialized shape
[ ] Provider codecs preserve fields they do not understand
[ ] Response codec failures do not break the underlying LLM call
[ ] Request codec
encodepreserves original provider fields unless an intercept intentionally changes them
Related Skills
nemo-relay-instrument-callsnemo-relay-plugin-observabilitynemo-relay-debug-runtime-integration
Files
- ATTRIBUTION.mdAdded by AutoGineer993 B
- BENCHMARK.md3.8 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md3.4 KiB
- evals/evals.json5.0 KiB
- skill-card.md3.9 KiB
- skill.oms.sig4.5 KiB
skill-card.md
Description: <br>
Use this skill when adding NeMo Relay typed wrappers, domain types, or provider codecs while preserving JSON middleware semantics and caller-visible behavior. <br>
This skill is ready for commercial/non-commercial use. <br>
Owner
NVIDIA <br>
License/Terms of Use: <br>
Apache 2.0 <br>
Use Case: <br>
Developers and engineers adding typed wrappers, domain types, or provider codecs to NeMo Relay tool and LLM integrations while preserving JSON middleware interoperability. <br>
Deployment Geography for Use: <br>
Global <br>
Requirements / Dependencies: <br>
Requires API Key or External Credential: [Not Specified] <br> Credential Type(s): [None identified] <br>
Do not include secrets in prompts/logs/output; use least-privilege credentials; rotate keys as appropriate. <br>
Known Risks and Mitigations: <br>
Risk: Review before execution as proposals could introduce incorrect or misleading guidance into skills. <br> Mitigation: Review and scan skill before deployment. <br>
Reference(s): <br>
Skill Output: <br>
Output Type(s): [Configuration instructions, Code] <br> Output Format: [Markdown with inline code blocks] <br> Output Parameters: [1D] <br> Other Properties Related to Output: [None] <br>
Evaluation Agents Used: <br>
claude-code <br>
codex <br>
Evaluation Tasks: <br>
Evaluated against 4 evaluation tasks (3 positive activation, 1 negative activation) in the astra-sandbox environment using the NVSkills-Eval external profile. <br>
Evaluation Metrics Used: <br>
Reported benchmark dimensions: <br>
Security: Checks whether skill-assisted execution avoids unsafe behavior such as secret leakage, destructive commands, or unauthorized access. <br>
Correctness: Checks whether the agent follows the expected workflow and produces the correct final output. <br>
Discoverability: Checks whether the agent loads the skill when relevant and avoids using it when irrelevant. <br>
Effectiveness: Checks whether the agent performs measurably better with the skill than without it. <br>
Efficiency: Checks whether the agent uses fewer tokens and avoids redundant work. <br>
Underlying evaluation signals used in this run: <br>
security: Checks for unsafe operations, secret leakage, and unauthorized access. <br>skill_execution: Verifies that the agent loaded the expected skill and workflow. <br>skill_efficiency: Checks routing quality, decoy avoidance, and redundant tool usage. <br>accuracy: Grades final-answer correctness against the reference answer. <br>goal_accuracy: Checks whether the overall user task completed successfully. <br>behavior_check: Verifies expected behavior steps, including safety expectations. <br>token_efficiency: Compares token usage with and without the skill. <br>
Evaluation Results: <br>
| Dimension | Num | claude-code | codex |
|---|---|---|---|
| Security | 4 | 100% (+0%) | 100% (+0%) |
| Correctness | 4 | 100% (+60%) | 89% (+16%) |
| Discoverability | 4 | 100% (+75%) | 81% (+32%) |
| Effectiveness | 4 | 97% (+44%) | 94% (+18%) |
| Efficiency | 4 | 95% (+50%) | 84% (+31%) |
Skill Version(s): <br>
e05cfbb8 (source: git SHA, committed 2026-07-15) <br>
Ethical Considerations: <br>
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal team to ensure this skill meets requirements for the relevant industry and use case and addresses unforeseen product misuse. <br>
(For Release on NVIDIA Platforms Only) <br> Please report quality, risk, security vulnerabilities or NVIDIA AI Concerns here. <br>
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.
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
- Created by
- NVIDIA Corporation and Affiliates
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/nemo-relay-instrument-typed-wrappers · 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 Corporation and Affiliates or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download nemo-relay-instrument-typed-wrappers.zip