NeMo Relay Types
nemo-relay-types provides the shared serializable data model for NeMo Relay.
Use it when a Rust integration, plugin SDK, or protocol implementation needs
the same event, scope, tool, LLM, runtime-registration, codec, and
plugin-diagnostic types as Relay.
This crate intentionally contains no runtime registries, dynamic loading,
exporters, or process-global state. Applications normally depend on
nemo-relay; this crate is the lower-level contract shared by the runtime and
authoring SDKs.
Why Use It?
- Keep wire shapes consistent: Exchange Relay DTOs without duplicating serializable event, request, response, and diagnostic models.
- Share one JSON representation: Use
Json, an alias forserde_json::Value, across Relay-facing payloads. - Build SDKs without the runtime: Depend on data contracts without pulling in runtime behavior or global state.
What You Get
apimodule: Event, scope, tool, LLM, and runtime-registration DTOs and attributes.codecmodule: Normalized LLM request and response annotations.pluginmodule: Structured plugin configuration diagnostics.- Optional
schemafeature:schemarsimplementations for supported serializable types.
Installation
Add the crate when implementing a Relay-adjacent SDK, protocol, or integration:
Enable JSON Schema support when needed:
Getting Started
Use the shared Json type for a Relay-compatible payload:
use Json;
use json;
let payload: Json = json!;
assert_eq!;