> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/relay/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/relay/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# Function register_plugin

> Registers a plugin by kind.

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

<pre />

Registers a plugin by kind.

Registering the same kind twice returns [`PluginError::RegistrationFailed`](/reference/api/rust-library-reference/nemo-relay/plugin/enum-pluginerror). Register a plugin kind with the global plugin registry.

Registered plugins can then participate in validation and initialization of [`PluginConfig`](/reference/api/rust-library-reference/nemo-relay/plugin/struct-pluginconfig) documents.

## Parameters

* `plugin`: Plugin implementation to register.

## Returns

A plugin [`Result`](/reference/api/rust-library-reference/nemo-relay/plugin/type-result) that is `Ok(())` when the plugin kind was added to the registry.

## Errors

Returns an error when a plugin with the same kind is already registered or when the registry lock is poisoned.

## Notes

Registration affects future validation and initialization only.