nemo-relay-instrument-calls

작성자: nvidia

Wrap application tool calls and LLM/provider calls with NeMo Relay scopes and managed execution APIs

npx skills add https://github.com/nvidia/nemo-relay --skill nemo-relay-instrument-calls

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.

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

  • You need traces, ATIF, or export setup -> nemo-relay-setup-observability
  • You are debugging missing events or load failures -> nemo-relay-debug-runtime-integration
  • You need per-request isolation or worker-pool advice -> nemo-relay-use-context-isolation
  • You need reusable config-activated runtime behavior -> nemo-relay-build-plugin

Related Skills

  • nemo-relay-start
  • nemo-relay-typed-wrappers-codecs
  • nemo-relay-setup-observability
  • nemo-relay-build-plugin

nvidia의 다른 스킬

compileiq-debug
nvidia
Use when something is wrong: Search() hangs, all evaluations return INVALID_SCORE, scores aren't improving, every config returns the same number, ptxas errors…
official
create-github-pr
nvidia
gh CLI를 사용하여 GitHub 풀 리퀘스트를 생성합니다. 사용자가 새 PR을 만들거나, 코드 리뷰를 제출하거나, 풀 리퀘스트를 열고자 할 때 사용합니다. 트리거 키워드 -…
official
diagnose-perf
nvidia
First-responder performance triage for Isaac Sim and Isaac Lab. Identifies bottleneck category (GPU-bound, CPU-bound, VRAM, loading) using nvidia-smi and…
official
eagle3-review-logs
nvidia
Review EAGLE3 pipeline experiment logs from the launcher's experiments/ directory. Summarizes pass/fail status for all 4 tasks, diagnoses failures with root…
official
nemoclaw-maintainer-cross-issue-sweep
nvidia
다른 열린 이슈들을 스캔하여 주어진 PR이 함께 수정하거나 실수로 망가뜨릴 수 있는 이슈를 찾습니다. 인접 수정 기회와 모순 위험을 file:line…과 함께 출력합니다.
official
karpathy-guidelines
nvidia
일반적인 LLM 코딩 실수를 줄이기 위한 행동 지침입니다. 코드 작성, 검토 또는 리팩토링 시 과도한 복잡성을 피하고 정밀한 변경을 위해 사용하세요.
official
fhir-basics
nvidia
에이전트에게 FHIR R4 API의 작동 방식, 사용 가능한 리소스, 검색 매개변수를 사용한 쿼리 방법, 모든 응답 형식을 올바르게 파싱하는 방법을 가르칩니다…
official
underdeclared-agent
nvidia
A helpful assistant agent
official