Skip to content

feature: Add support for Cisco AI Defense API as a guardrail provider for both input (prompt) and output (response) protection in NeMo Guardrails. #1420

@rucpande

Description

@rucpande

Did you check the docs?

  • I have read all the NeMo-Guardrails docs

Is your feature request related to a problem? Please describe.

Cisco AI Defense provides Security, Privacy, and Safety guardrails to detect and block harmful, inappropriate, or policy-violating content in LLM interactions. Integrating this as a third party API will enable NeMo Guardrails users to leverage Cisco's AI Defense capabilities.

Describe the solution you'd like

I have looked at some of the previous submissions to add Third Party API integrations. I can work on adding this along similar lines.

Features

  • Input Protection: Inspect user prompts before processing
  • Output Protection: Inspect bot responses before delivery
  • Configuration: Environment-based API configuration
  • Error Handling: Graceful handling of API failures
  • Rails Exceptions: Support for enable_rails_exceptions mode
  • Logging: Logging for debugging and monitoring

API Integration Details

  • Endpoint: Cisco AI Defense Inspect API
  • Authentication: API key-based authentication
  • Request Format: JSON with messages array
  • Response Handling: Maps is_safe field to blocking decisions
  • Rule Reporting: Logs matched safety rules when content is blocked

Describe alternatives you've considered

Python based action but that's less seamless for users.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststatus: needs triageNew issues that have not yet been reviewed or categorized.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions