Skip to main content
This example demonstrates how to use Agno’s built-in OpenAI moderation guardrail with an Agent. This example shows how to:
  1. Detect and block content that violates OpenAI’s content policy
  2. Handle both text and image content moderation
  3. Configure moderation for specific categories
  4. Use both sync and async moderation checks
  5. Customize moderation models and sensitivity settings
1

Create a Python file

openai_moderation.py
2

Set up your virtual environment

3

Install dependencies

4

Export your OpenAI API key

5

Run Agent