Skip to content

Conversation

ronjer30
Copy link

@ronjer30 ronjer30 commented Aug 2, 2025

Description

This PR attempts to address guardrails implementation/integration in NeMo Agent toolkit. Currently support for NeMo Guardrails is provided in the React agent. There are several examples that demonstrate usage. To get started, a simple config to add guardrails looks like below

guardrails:
  basic_rails:
    _type: nemo_guardrails
    enabled: true
    input_rails_enabled: true
    output_rails_enabled: false
    llm_name: nim_llm
    fallback_on_error: true
    rails:
      input:
         flows:
            - self check input

self check input uses a built-in default prompt to apply rails on user input. The prompt can be customized in the config. Additionally, ability to load NeMo Guardrails configuration folder and flows is provided.

Pending tasks:

  • Support for other agents (ReWoo, etc)
  • Support for NeMo Guardrails server
  • Integration with RAG/Memory/Embedder for applying rails to fact check and detect hallucination

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant