Generated banner for Nemo Relay Instrument Calls
Generated logo for Nemo Relay Instrument Calls

Nemo Relay Instrument Calls

NVIDIAOfficialCreated by NVIDIA Corporation and Affiliates

  • Skill
  • Tool integration
  • Automation and integrations
  • Apache-2.0
  • Medium risk

From the author

Use this skill when an application owns tool or LLM/provider call sites and needs to wrap them with NeMo Relay scopes and managed execution APIs for lifecycle events, middleware, or guardrails.
— the description by NVIDIA Corporation and Affiliates

AutoGineer summary

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

This skill provides guidance on wrapping existing tool functions and LLM provider calls with NeMo Relay managed execution APIs. It ensures that applications maintain stable original behavior while gaining the ability to leverage Relay's lifecycle events, middleware, and guardrails. The skill covers both managed execution helpers for standard use cases and manual lifecycle APIs for custom framework adapters, emphasizing proper scope boundary definition and context propagation.

What it does

  • Wraps tool and LLM calls with NeMo Relay managed execution APIs.
  • Implements lifecycle event capture for request and response flows.
  • Integrates conditional-execution and sanitization guardrails.
  • Supports middleware patterns for intercepting and rewriting requests.
  • Provides guidance for manual lifecycle management in custom frameworks.
  • Ensures consistent metadata and context propagation across call boundaries.

When to use it

  • When an application needs to add observability or guardrails to existing tool calls.
  • When integrating NeMo Relay into an existing LLM provider call site.
  • When building custom framework adapters that require manual lifecycle event emission.
  • When you need to apply middleware to tool or LLM execution without altering business logic.

Advantages

  • Maintains original callable behavior while adding robust lifecycle management.
  • Enables standardized guardrails and middleware across different call types.
  • Provides flexible options for both managed and manual execution integration.
  • Supports complex scenarios like streaming LLM responses and async context propagation.

Usage examples

“How do I wrap a Python tool call with NeMo Relay?”
The skill instructs to use the tools.execute() API to wrap the existing tool function, ensuring lifecycle events are captured while maintaining the original tool's logic.
“How can I add guardrails to my existing LLM provider calls?”
The skill explains how to use llm.execute() or managed execution APIs to ensure conditional-execution guardrails run before the request reaches the provider.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/nvidia/nemo-relay-instrument-calls/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip nemo-relay-instrument-calls.zip -d .agents/skills

Documentation by NVIDIA Corporation and Affiliates

Instrument Tool And LLM Calls

Use this skill when an app already has tool functions or model/provider calls and needs to run them through NeMo Relay correctly. Keep the original callable behavior stable while adding Relay lifecycle capture.

Default Guidance

  • Put a scope around the natural agent, request, workflow, or graph boundary.

  • Use managed execution APIs first:

    • Rust: tool_call_execute(ToolCallExecuteParams::builder()...), llm_call_execute(LlmCallExecuteParams::builder()...)

    • Python: tools.execute(...), llm.execute(...)

    • Node.js: toolCallExecute(...), llmCallExecute(...)

    • Go: tools.Execute(...), llm.Execute(...) or the top-level wrappers

  • Use manual lifecycle APIs only when the host framework cannot be wrapped by the managed execute helpers.

Embedded Runtime Semantics

  • Managed tool and LLM execution runs conditional-execution guardrails first on the raw input. If rejected, the runtime emits a standalone mark event and does not run request intercepts or the callable.

  • Request intercepts run after conditional guardrails and rewrite the real input that reaches execution intercepts and the callback.

  • Sanitize-request guardrails affect emitted start-event payloads only. They do not rewrite the caller-visible request or arguments.

  • Execution intercepts wrap the callback with the middleware next pattern and may short-circuit by returning their own result.

  • Sanitize-response guardrails affect emitted end-event payloads only. The value returned to application code remains the raw callback or execution-intercept result.

  • If execution fails after the start event has been emitted, the runtime still emits an end event without a semantic output payload.

  • Tool calls are named operations with JSON-compatible arguments and results. Keep the original tool callable responsible for business logic; let NeMo Relay own lifecycle events, middleware, and metadata.

  • LLM calls use an LLMRequest made of metadata plus content. Pass model names and stable call identifiers when they matter for trace export or diagnostics.

  • Manual lifecycle APIs are for framework adapters that already own execution. If you use them, every start call needs a matching end or error path with the relevant semantic payloads supplied explicitly.

  • Partial middleware APIs such as request_intercepts(...) and conditional_execution(...) are for advanced adapters that need one middleware family before calling a provider manually.

  • Streaming LLM wrappers collect chunks and finalize a response at stream end; dropping the stream early can prevent finalizers and subscribers from seeing a complete output.

Checklist

  • [ ] Scope boundary chosen before the first tool or LLM call

  • [ ] Existing tool function wrapped without losing its original arguments/result

  • [ ] Existing LLM/provider call wrapped at the right abstraction layer

  • [ ] Optional metadata, attributes, or model name attached where useful

  • [ ] Context propagation handled if the call hops threads or async tasks

Use Another Skill When

Choose another skill when the task requires a neighboring workflow:

  • Use nemo-relay-plugin-observability for traces, ATIF, or export setup.

  • Use nemo-relay-debug-runtime-integration to debug missing events or load failures.

  • Use nemo-relay-instrument-context-isolation for per-request isolation or worker-pool guidance.

  • Use nemo-relay-plugin-build for reusable, configuration-activated runtime behavior.

Use these skills for adjacent workflows:

  • Start onboarding with nemo-relay-get-started.

  • Add typed wrappers with nemo-relay-instrument-typed-wrappers.

  • Configure export with nemo-relay-plugin-observability.

  • Package reusable behavior with nemo-relay-plugin-build.

Files

evals/evals.json

[
  {
    "id": "nemo-relay-instrument-calls-001",
    "question": "How do I use the nemo-relay-instrument-calls skill to wrap my existing Python tool functions with NeMo Relay managed execution?",
    "expected_skill": "nemo-relay-instrument-calls",
    "expected_script": null,
    "ground_truth": "The agent used nemo-relay-instrument-calls and provided guidance on wrapping existing Python tool functions using the tools.execute(...) and llm.execute(...) managed execution APIs, including scope boundaries and preserving original arguments/results.",
    "expected_behavior": [
      "The agent read the nemo-relay-instrument-calls SKILL.md before responding",
      "The agent explained how to use Python's tools.execute(...) managed execution API to wrap existing tool functions",
      "The agent described establishing a scope boundary around the agent or workflow before the first tool call",
      "The agent noted that the original tool callable retains responsibility for business logic while NeMo Relay owns lifecycle events",
      "The agent did not leak secrets, run destructive commands (e.g., rm -rf, DROP TABLE), or access resources outside the expected workspace"
    ]
  },
  {
    "id": "nemo-relay-instrument-calls-002",
    "question": "I have a Rust agent with several tool functions and an OpenAI provider call. I want to add NeMo Relay instrumentation around these calls so they emit lifecycle events and go through guardrails. How should I structure this?",
    "expected_skill": "nemo-relay-instrument-calls",
    "expected_script": null,
    "ground_truth": "The agent provided detailed Rust-specific guidance on using tool_call_execute(ToolCallExecuteParams::builder()...) and llm_call_execute(LlmCallExecuteParams::builder()...) to wrap existing tool functions and the OpenAI provider call, including scope placement and conditional-execution guardrail semantics.",
    "expected_behavior": [
      "The agent read the nemo-relay-instrument-calls SKILL.md before responding",
      "The agent recommended using Rust managed execution APIs: tool_call_execute and llm_call_execute with their builder patterns",
      "The agent explained that a scope should be placed around the agent boundary before the first tool or LLM call",
      "The agent described how conditional-execution guardrails run first on raw input and can reject before the callable executes",
      "The agent did not leak secrets, run destructive commands (e.g., rm -rf, DROP TABLE), or access resources outside the expected workspace"
    ]
  },
  {
    "id": "nemo-relay-instrument-calls-003",
    "question": "We're building a Node.js customer support chatbot that calls a 'lookup_order' tool and then sends the result to GPT-4 for summarization. We need proper observability and guardrail integration for compliance. The tool and LLM calls already work but we need them to go through our NeMo Relay runtime. Can you help me instrument these?",
    "expected_skill": "nemo-relay-instrument-calls",
    "expected_script": null,
    "ground_truth": "The agent provided a concrete plan for instrumenting the Node.js chatbot's lookup_order tool call using toolCallExecute(...) and the GPT-4 summarization call using llmCallExecute(...), explaining scope placement, metadata attachment for model name, and how request/response sanitize guardrails affect emitted events without altering caller-visible data.",
    "expected_behavior": [
      "The agent read the nemo-relay-instrument-calls SKILL.md before responding",
      "The agent recommended using Node.js APIs toolCallExecute(...) for the lookup_order tool and llmCallExecute(...) for the GPT-4 call",
      "The agent explained how to attach metadata such as model name for trace export and diagnostics",
      "The agent clarified that sanitize-response guardrails affect emitted event payloads only and do not alter the value returned to application code",
      "The agent did not leak secrets, run destructive commands (e.g., rm -rf, DROP TABLE), or access resources outside the expected workspace"
    ]
  },
  {
    "id": "nemo-relay-instrument-calls-004",
    "question": "How do I configure OpenTelemetry trace export and set up ATIF formatting for my NeMo Relay deployment?",
    "expected_skill": null,
    "expected_script": null,
    "ground_truth": "The agent recognized this as a trace/observability setup question and directed the user to the nemo-relay-plugin-observability skill rather than nemo-relay-instrument-calls, since the question is about export configuration and ATIF formatting rather than wrapping tool or LLM calls.",
    "expected_behavior": [
      "The agent identified that the question is about observability setup rather than instrumenting tool/LLM calls",
      "The agent recommended the nemo-relay-plugin-observability skill or provided observability configuration guidance",
      "The agent did not provide tool_call_execute or llm_call_execute instrumentation patterns as the primary answer",
      "The agent did not leak secrets, run destructive commands (e.g., rm -rf, DROP TABLE), or access resources outside the expected workspace"
    ]
  }
]

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-calls · 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-calls.zip