From 061061ecd653842c15320c9edb9f5c74cc7b7e8c Mon Sep 17 00:00:00 2001 From: Evaline Ju <69598118+evaline-ju@users.noreply.github.com> Date: Tue, 10 Feb 2026 09:00:29 -0700 Subject: [PATCH 1/2] :wrench: Replace nemo plugin example in config Signed-off-by: Evaline Ju <69598118+evaline-ju@users.noreply.github.com> --- plugins/examples/nemo/README.md | 2 +- resources/config/config.yaml | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/plugins/examples/nemo/README.md b/plugins/examples/nemo/README.md index deceffb..6baf096 100644 --- a/plugins/examples/nemo/README.md +++ b/plugins/examples/nemo/README.md @@ -1,4 +1,4 @@ -# Nemo guardrails plugin example +# Nemo guardrails internal plugin example The `NemoWrapperPlugin` in `nemo_wrapper_plugin.py` currently invokes the simple flow in `pii_detect_config` which leverages an ollama model through `host.docker.internal`. The model can be easily replaced in the `config.yml`. diff --git a/resources/config/config.yaml b/resources/config/config.yaml index 812a5e7..ef3be7d 100644 --- a/resources/config/config.yaml +++ b/resources/config/config.yaml @@ -1,8 +1,9 @@ # plugins/config.yaml - Main plugin configuration file plugins: -# Self-contained Search Replace Plugin + # Self-contained Search Replace Plugin - depends on plugin availability - name: "ReplaceBadWordsPlugin" - kind: "plugins.regex_filter.search_replace.SearchReplacePlugin" + # From https://github.com/contextforge-org/contextforge-plugins-python + kind: "contextforge-plugins-python.regex_filter.search_replace.SearchReplacePlugin" description: "A plugin for finding and replacing words." version: "0.1.0" author: "Teryl Taylor" @@ -21,12 +22,25 @@ plugins: replace: crud - search: crud replace: yikes + # Nemo example + - name: "NemoWrapperPlugin" + kind: "plugins.examples.nemo.nemo_wrapper_plugin.NemoWrapperPlugin" + description: "A simple Nemo PII detector" + version: "0.1.0" + author: "Evaline Ju" + hooks: ["tool_pre_invoke", "tool_post_invoke"] + tags: ["plugin", "pre-post"] + mode: "enforce" # enforce | permissive | disabled + priority: 150 + config: + foo: bar # Plugin directories to scan plugin_dirs: - - "plugins/native" # Built-in plugins - - "plugins/custom" # Custom organization plugins + - "plugins/native" # Built-in plugins + - "plugins/custom" # Custom organization plugins - "/etc/mcpgateway/plugins" # System-wide plugins + - "plugins/examples/nemo" # Example Nemo guardrails plugins # Global plugin settings plugin_settings: From 657bb704b54e6b768839062b5c12746005393f6e Mon Sep 17 00:00:00 2001 From: Evaline Ju <69598118+evaline-ju@users.noreply.github.com> Date: Tue, 10 Feb 2026 09:00:49 -0700 Subject: [PATCH 2/2] :memo: Add small examples README Signed-off-by: Evaline Ju <69598118+evaline-ju@users.noreply.github.com> --- plugins/examples/README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 plugins/examples/README.md diff --git a/plugins/examples/README.md b/plugins/examples/README.md new file mode 100644 index 0000000..ddf505a --- /dev/null +++ b/plugins/examples/README.md @@ -0,0 +1,37 @@ +# Plugin Examples + +Example plugins demonstrating integration with the Plugins Adapter + +## Available Examples + +### nemo +Internal plugin that wraps NeMo Guardrails for PII detection using an Ollama model +- **Type**: Internal (same deployment) +- See [nemo/README.md](./nemo/README.md) for details + +### nemocheck +External plugin adapter for NeMo Guardrails check server +- **Type**: External (separate service) +- Requires separate NeMo check server deployment +- See [nemocheck/README.md](./nemocheck/README.md) for details + +## Usage + +Reference plugins in the plugin adapter config (default at `resources/config/config.yaml`): + +**Internal plugin:** +```yaml +plugins: + - name: nemo + kind: "plugins.examples.nemo.nemo_wrapper_plugin.NemoWrapperPlugin" +``` + +**External plugin:** +```yaml +plugins: + - name: nemocheck + kind: external + mcp: + proto: STREAMABLEHTTP + url: http://nemocheck-plugin-service:8000/mcp +```