> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server. # nemo-relay-types > Shared serializable data model types for NeMo Relay. Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`. Shared serializable data model types for NeMo Relay. This crate contains DTOs and wire-compatible type definitions used by the runtime and native plugin SDK. It intentionally does not contain runtime registries, dynamic loading, codecs, exporters, or process-global state. ## Modules * [api](/reference/api/rust-library-reference/nemo-relay-types/api): Public runtime API data types. Shared API data types. * [codec](/reference/api/rust-library-reference/nemo-relay-types/codec): Normalized LLM request and response data types. Shared normalized LLM request and response data types. * [plugin](/reference/api/rust-library-reference/nemo-relay-types/plugin): Plugin configuration diagnostic data types. Shared plugin diagnostic data types. ## Type Aliases * [Json](/reference/api/rust-library-reference/nemo-relay-types/type-json): Type alias for [`serde_json::Value`](https://docs.rs/serde_json/1.0.149/serde_json/value/enum.Value.html), used as the universal JSON representation throughout NeMo Relay APIs. > Shared serializable data model types for NeMo Relay. ## Docs - [Module api](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api.md): Public runtime API data types. Shared API data types. - [Module event](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event.md): Lifecycle event DTOs. Event types for Agent Trajectory Observability Format (ATOF) runtime events. - [Struct Base Event](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/struct-baseevent.md): Shared event metadata carried by every ATOF event. - [Struct Category Profile](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/struct-categoryprofile.md): Category-specific profile data. - [Struct Data Schema](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/struct-dataschema.md): Identifier for the schema that describes an event's opaque `data` payload. - [Struct Event Category](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/struct-eventcategory.md): Semantic category carried by ATOF `category`. - [Struct Mark Event](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/struct-markevent.md): ATOF point-in-time mark event. - [Struct Pending Mark Spec](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/struct-pendingmarkspec.md): Mark requested by middleware for materialization by a lifecycle owner. - [Struct Scope Event](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/struct-scopeevent.md): ATOF scope lifecycle event. - [Enum Event](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/enum-event.md): Tagged union covering the two ATOF event kinds emitted by the runtime. - [Enum Scope Category](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/enum-scopecategory.md): Agent Trajectory Observability Format (ATOF) lifecycle phase for a scope event. - [Constant ATOF_VERSION](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/constant-atof-version.md): Agent Trajectory Observability Format (ATOF) protocol version emitted by this runtime. - [Function attributes_from_handle](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/fn-attributes-from-handle.md): Convert handle bitflags into ATOF attributes. - [Function llm_attributes_to_strings](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/fn-llm-attributes-to-strings.md): Convert LLM bitflags into ATOF attributes. - [Function scope_attributes_to_strings](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/fn-scope-attributes-to-strings.md): Convert scope bitflags into ATOF attributes. - [Function tool_attributes_to_strings](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/event/fn-tool-attributes-to-strings.md): Convert tool bitflags into ATOF attributes. - [Module llm](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/llm.md): LLM DTOs and attributes. Shared LLM data types. - [Struct LlmAttributes](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/llm/struct-llmattributes.md): Bitflags that modify LLM-call behavior and observability. - [Struct LlmRequest](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/llm/struct-llmrequest.md): JSON-shaped LLM request payload passed through the runtime. - [Struct LlmRequest Intercept Outcome](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/llm/struct-llmrequestinterceptoutcome.md): Result of an LLM request intercept that can schedule lifecycle marks. - [Module scope](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/scope.md): Scope DTOs and attributes. Shared scope data types. - [Struct Scope Attributes](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/scope/struct-scopeattributes.md): Bitflags that modify scope behavior and observability. - [Enum Handle Attributes](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/scope/enum-handleattributes.md): Attribute bitflags attached to a concrete handle kind. - [Enum Scope Type](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/scope/enum-scopetype.md): Semantic category attached to a scope lifecycle span. - [Module tool](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/tool.md): Tool DTOs and attributes. Shared tool data types. - [Struct Tool Attributes](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/tool/struct-toolattributes.md): Bitflags that modify tool-call behavior and observability. - [Struct Tool Execution Intercept Outcome](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/api/tool/struct-toolexecutioninterceptoutcome.md): Canonical result returned by a tool execution intercept. - [Module codec](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec.md): Normalized LLM request and response data types. Shared normalized LLM request and response data types. - [Module request](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request.md): Normalized LLM request data types. LLM request codec types and trait. - [Struct Annotated LlmRequest](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/struct-annotatedllmrequest.md): Structured view of an LLM request, produced by a Codec from opaque `LlmRequest` content. - [Struct Function Call](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/struct-functioncall.md): A function call within a tool call. - [Struct Function Definition](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/struct-functiondefinition.md): A function definition within a tool definition. - [Struct Generation Params](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/struct-generationparams.md): Normalized generation parameters across providers. - [Struct Open AiImage Url](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/struct-openaiimageurl.md): OpenAI image URL payload. - [Struct Tool Call](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/struct-toolcall.md): A tool call requested by the assistant. - [Struct Tool Choice Function](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/struct-toolchoicefunction.md): A specific tool choice that forces a named function. - [Struct Tool Choice Function Name](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/struct-toolchoicefunctionname.md): The name component of a specific tool choice. - [Struct Tool Definition](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/struct-tooldefinition.md): A tool definition (function schema) available to the model. - [Enum Content Part](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/enum-contentpart.md): A single content part within a multimodal message. - [Enum Message](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/enum-message.md): A single message in a conversation, tagged by role. - [Enum Message Content](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/enum-messagecontent.md): Message content: either a plain string or multimodal parts array. - [Enum Tool Choice](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/request/enum-toolchoice.md): Tool choice control: how the model should use available tools. - [Module response](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/response.md): Normalized LLM response data types. Normalized LLM response types produced by response codecs. - [Struct Annotated LlmResponse](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/response/struct-annotatedllmresponse.md): Structured view of an LLM response, produced by a response codec from raw JSON API output. - [Struct Cost Estimate](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/response/struct-costestimate.md): Normalized LLM response cost. - [Struct Response Tool Call](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/response/struct-responsetoolcall.md): A tool call requested by the model in its response. - [Struct Usage](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/response/struct-usage.md): Token usage statistics from an LLM API response. - [Enum ApiSpecific Response](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/response/enum-apispecificresponse.md): API-specific response data that cannot be normalized across providers. - [Enum Cost Source](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/response/enum-costsource.md): Source of a normalized cost value. - [Enum Finish Reason](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/codec/response/enum-finishreason.md): Normalized reason why the model stopped generating. - [Module plugin](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/plugin.md): Plugin configuration diagnostic data types. Shared plugin diagnostic data types. - [Struct Config Diagnostic](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/plugin/struct-configdiagnostic.md): Structured validation diagnostic for plugin validation. - [Enum Diagnostic Level](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/plugin/enum-diagnosticlevel.md): Diagnostic severity returned by plugin validation. - [Type Alias Json](https://docs.nvidia.com/nemo/relay/v0.5.0/reference/api/rust-library-reference/nemo-relay-types/type-json.md): Type alias for `serde_json::Value`, used as the universal JSON representation throughout NeMo Relay APIs.