For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • About NVIDIA NeMo Relay
    • Overview
    • Architecture
    • Ecosystem
    • Concepts
    • Release Notes
  • Getting Started
    • Agent Runtime Primer
    • Prerequisites
    • Installation
    • Configuration / Setup
    • Quick Start
  • NVIDIA NeMo Relay CLI
    • About
    • Basic Usage
    • Claude Code
    • Codex
    • Cursor
    • Hermes Agent
  • Supported Integrations
    • About
    • OpenClaw Plugin Guide
    • LangChain Integration Guide
    • LangGraph Integration Guide
    • Deep Agents Integration Guide
  • Instrument Applications
    • About
    • Adding Scopes and Marks
    • Instrument a Tool Call
    • Instrument an LLM Call
    • Add Middleware
    • Code Examples
  • Observability Plugin
    • About
    • Configuration
    • Agent Trajectory Interchange Format (ATIF)
    • Agent Trajectory Observability Format (ATOF)
    • OpenTelemetry
    • OpenInference
  • Adaptive Plugin
    • About
    • Configuration
    • Adaptive Cache Governor (ACG)
    • Adaptive Hints
  • NeMo Guardrails Plugin
    • About
    • Configuration
  • Integrate into Frameworks
    • About
    • Adding Scopes
    • Wrap Tool Calls
    • Wrap LLM Calls
    • Handle Non-Serializable Data
    • Using Codecs
    • Provider Codecs
    • Provider Response Codecs
    • Code Examples
  • Build Plugins
    • About
    • Define a Plugin
    • Validate Plugin Configuration
    • Plugin Configuration Files
    • Register Plugin Behavior
    • Design Plugin Configuration
    • NeMo Guardrails Example Plugin
    • Code Examples
  • Contribute
    • About
    • Development Setup
    • Workflow and Reviews
    • Testing and Documentation
  • Reference
    • APIs
      • Python Library Reference
      • Node.js Library Reference
      • Rust Library Reference
        • nemo-relay
        • nemo-relay-adaptive
        • nemo-relay-ffi
          • api
          • callable
          • convert
          • error
          • types
            • FfiAtifExporter
            • FfiAtofExporter
            • FfiCodecHandle
            • FfiEvent
            • FfiLLMHandle
            • FfiLLMRequest
            • FfiOpenInferenceSubscriber
            • FfiOpenTelemetrySubscriber
            • FfiPluginContext
            • FfiScopeHandle
            • FfiScopeStack
            • FfiThreadScopeStackBinding
            • FfiToolHandle
            • NemoRelayScopeType
            • nemo_relay_atif_exporter_free
            • nemo_relay_atof_exporter_free
            • nemo_relay_codec_free
            • nemo_relay_event_annotated_request
            • nemo_relay_event_annotated_response
            • nemo_relay_event_atof_version
            • nemo_relay_event_attributes
            • nemo_relay_event_attributes_json
            • nemo_relay_event_category
            • nemo_relay_event_category_profile
            • nemo_relay_event_data
            • nemo_relay_event_data_schema
            • nemo_relay_event_free
            • nemo_relay_event_input
            • nemo_relay_event_json
            • nemo_relay_event_kind
            • nemo_relay_event_metadata
            • nemo_relay_event_model_name
            • nemo_relay_event_name
            • nemo_relay_event_output
            • nemo_relay_event_parent_uuid
            • nemo_relay_event_scope_category
            • nemo_relay_event_scope_type
            • nemo_relay_event_timestamp
            • nemo_relay_event_tool_call_id
            • nemo_relay_event_uuid
            • nemo_relay_llm_handle_attributes
            • nemo_relay_llm_handle_free
            • nemo_relay_llm_handle_name
            • nemo_relay_llm_handle_parent_uuid
            • nemo_relay_llm_handle_uuid
            • nemo_relay_llm_request_content
            • nemo_relay_llm_request_free
            • nemo_relay_llm_request_headers
            • nemo_relay_llm_request_new
            • nemo_relay_openinference_subscriber_free
            • nemo_relay_otel_subscriber_free
            • nemo_relay_scope_handle_attributes
            • nemo_relay_scope_handle_data
            • nemo_relay_scope_handle_free
            • nemo_relay_scope_handle_metadata
            • nemo_relay_scope_handle_name
            • nemo_relay_scope_handle_parent_uuid
            • nemo_relay_scope_handle_scope_type
            • nemo_relay_scope_handle_uuid
            • nemo_relay_scope_stack_free
            • nemo_relay_tool_handle_attributes
            • nemo_relay_tool_handle_free
            • nemo_relay_tool_handle_name
            • nemo_relay_tool_handle_parent_uuid
            • nemo_relay_tool_handle_uuid
    • Performance
  • Resources
    • Support and FAQs
    • Glossary
    • Troubleshooting Guide
    • Community
    • Legal
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogo
On this page
  • Structs
  • Enums
  • Functions
ReferenceAPIsRust Library Referencenemo-relay-ffi

Module types

||View as Markdown|
Previous

Function status_from_plugin_error

Next

Struct FfiAtif Exporter

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

C-compatible types exposed through the FFI boundary.

This module defines opaque handle wrappers, enumerations, accessor functions, and free functions for all types that cross the C FFI boundary. Each opaque struct wraps a corresponding core type and is heap-allocated; the C consumer sees only an opaque pointer. All returned C strings must be freed with crate::convert::nemo_relay_string_free, and all handles must be freed with their corresponding nemo_relay_*_free function.

Structs

  • FfiAtifExporter: Opaque ATIF exporter handle.
  • FfiAtofExporter: Opaque ATOF JSONL exporter handle.
  • FfiCodecHandle: Opaque handle carrying both request and response codec trait objects.
  • FfiEvent: Opaque wrapper around a lifecycle event emitted by the runtime.
  • FfiLLMHandle: Opaque handle representing an active LLM call.
  • FfiLLMRequest: Opaque wrapper around an LLM request (headers, content).
  • FfiOpenInferenceSubscriber: Opaque OpenInference subscriber handle.
  • FfiOpenTelemetrySubscriber: Opaque OpenTelemetry subscriber handle.
  • FfiPluginContext: Opaque plugin registration context.
  • FfiScopeHandle: Opaque handle representing an active execution scope.
  • FfiScopeStack: Opaque handle to an isolated scope stack for per-request/per-task isolation.
  • FfiThreadScopeStackBinding: Opaque handle to a captured thread-local scope stack binding.
  • FfiToolHandle: Opaque handle representing an active tool call.

Enums

  • NemoRelayScopeType: The type of scope in the agent execution hierarchy.

Functions

  • nemo_relay_atif_exporter_free: Free an ATIF exporter handle previously returned by nemo_relay_atif_exporter_create.
  • nemo_relay_atof_exporter_free: Free an ATOF JSONL exporter handle previously returned by nemo_relay_atof_exporter_create.
  • nemo_relay_codec_free: Free a codec handle previously returned by one of the codec constructor functions (nemo_relay_openai_chat_codec_new, etc.).
  • nemo_relay_event_annotated_request: Return the annotated request from an LLM start event as a JSON C string, or null if not available (non-LLM events, or no codec was active). Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_annotated_response: Return the annotated response from an LLM end event as a JSON C string, or null if not available (non-LLM events, or no response codec was active). Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_atof_version: Return the ATOF version as a C string.
  • nemo_relay_event_attributes: Return the raw attribute bitfield for an event, or 0 if it has none.
  • nemo_relay_event_attributes_json: Return ATOF attributes as a JSON string array.
  • nemo_relay_event_category: Return the ATOF category as a C string, or null if absent.
  • nemo_relay_event_category_profile: Return the ATOF category profile as a JSON C string, or null if absent.
  • nemo_relay_event_data: Return the event data as a JSON C string, or null if no data is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_data_schema: Return the Agent Trajectory Observability Format (ATOF) data schema as a JSON C string, or null if absent.
  • nemo_relay_event_free: Free an event object.
  • nemo_relay_event_input: Return the event input as a JSON C string, or null if no input is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_json: Return the canonical subscriber event JSON as a C string. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_kind: Return the event discriminator as a C string. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_metadata: Return the event metadata as a JSON C string, or null if no metadata is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_model_name: Return the event model name as a C string, or null if no model name is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_name: Return the name of an event as a C string, or null if unnamed. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_output: Return the event output as a JSON C string, or null if no output is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_parent_uuid: Return the event parent UUID as a C string, or null if no parent UUID is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_scope_category: Return the ATOF scope category as a C string, or null for mark events.
  • nemo_relay_event_scope_type: Return the event scope type as a C string, or null if no scope type is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_timestamp: Return the event timestamp as an RFC 3339 C string. Caller must free the result.
  • nemo_relay_event_tool_call_id: Return the event tool call ID as a C string, or null if no tool call ID is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_event_uuid: Return the UUID of an event as a C string. Caller must free the result.
  • nemo_relay_llm_handle_attributes: Return the bitfield attributes of an LLM handle. Returns 0 if ptr is null.
  • nemo_relay_llm_handle_free: Free an LLM handle previously returned by the runtime.
  • nemo_relay_llm_handle_name: Return the name of an LLM handle as a C string. Caller must free the result.
  • nemo_relay_llm_handle_parent_uuid: Return the parent scope UUID of an LLM handle, or null if none. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_llm_handle_uuid: Return the UUID of an LLM handle as a C string. Caller must free the result.
  • nemo_relay_llm_request_content: Return the content of an LLM request as a JSON C string. Caller must free the result.
  • nemo_relay_llm_request_free: Free an LLM request object.
  • nemo_relay_llm_request_headers: Return the headers of an LLM request as a JSON C string. Caller must free the result.
  • nemo_relay_llm_request_new: Create a new LLM request object. Returns a heap-allocated FfiLLMRequest that must be freed with nemo_relay_llm_request_free. Returns null on invalid input.
  • nemo_relay_openinference_subscriber_free: Free an OpenInference subscriber handle previously returned by nemo_relay_openinference_subscriber_create.
  • nemo_relay_otel_subscriber_free: Free an OpenTelemetry subscriber handle previously returned by nemo_relay_otel_subscriber_create.
  • nemo_relay_scope_handle_attributes: Return the bitfield attributes of a scope handle. Returns 0 if ptr is null.
  • nemo_relay_scope_handle_data: Return the scope data as a JSON C string, or null if no data is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_scope_handle_free: Free a scope handle previously returned by the runtime.
  • nemo_relay_scope_handle_metadata: Return the scope metadata as a JSON C string, or null if no metadata is set. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_scope_handle_name: Return the name of a scope handle as a C string. Caller must free the result. Returns null if ptr is null.
  • nemo_relay_scope_handle_parent_uuid: Return the parent scope UUID as a C string, or null if there is no parent. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_scope_handle_scope_type: Return the scope type of a scope handle. Returns Unknown if ptr is null.
  • nemo_relay_scope_handle_uuid: Return the UUID of a scope handle as a C string. Caller must free the result with nemo_relay_string_free. Returns null if ptr is null.
  • nemo_relay_scope_stack_free: Free a scope stack handle previously returned by nemo_relay_scope_stack_create.
  • nemo_relay_tool_handle_attributes: Return the bitfield attributes of a tool handle. Returns 0 if ptr is null.
  • nemo_relay_tool_handle_free: Free a tool handle previously returned by the runtime.
  • nemo_relay_tool_handle_name: Return the name of a tool handle as a C string. Caller must free the result.
  • nemo_relay_tool_handle_parent_uuid: Return the parent scope UUID of a tool handle, or null if none. Caller must free the result with nemo_relay_string_free.
  • nemo_relay_tool_handle_uuid: Return the UUID of a tool handle as a C string. Caller must free the result.