[](https://github.com/NVIDIA/NeMo-Relay/blob/main/LICENSE)
[](https://github.com/NVIDIA/NeMo-Relay/)
[](https://github.com/NVIDIA/NeMo-Relay/releases)
[](https://app.codecov.io/gh/NVIDIA/NeMo-Relay)
[](https://pypi.org/project/nemo-relay/)
[](https://www.npmjs.com/package/nemo-relay-node)
[](https://crates.io/crates/nemo-relay)
[](https://crates.io/crates/nemo-relay-adaptive)
[](https://crates.io/crates/nemo-relay-cli)
[](https://deepwiki.com/NVIDIA/NeMo-Relay)
# 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 for
`serde_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
- **`api` module**: Event, scope, tool, LLM, and runtime-registration DTOs and
attributes.
- **`codec` module**: Normalized LLM request and response annotations.
- **`plugin` module**: Structured plugin configuration diagnostics.
- **Optional `schema` feature**: `schemars` implementations for supported
serializable types.
## Installation
Add the crate when implementing a Relay-adjacent SDK, protocol, or integration:
```bash
cargo add nemo-relay-types
```
Enable JSON Schema support when needed:
```bash
cargo add nemo-relay-types --features schema
```
## Getting Started
Use the shared `Json` type for a Relay-compatible payload:
```rust
use nemo_relay_types::Json;
use serde_json::json;
let payload: Json = json!({"source": "my-integration"});
assert_eq!(payload["source"], "my-integration");
```
## Documentation
- [NeMo Relay documentation](https://docs.nvidia.com/nemo/relay)
- [NeMo Relay Rust crate](https://github.com/NVIDIA/NeMo-Relay/blob/main/crates/core/README.md)