Overview
Safety Engine provides content filtering and policy enforcement for AI agents. It controls what goes into agents (user input) and what comes out (agent responses) by applying policies that detect and handle sensitive content.Key Features
- Input/Output Filtering: Validate user input and agent responses
- Tool Safety Policies: Validate tools at registration and before execution
- Pre-built Policies: Ready-to-use policies for PII, adult content, hate speech, etc.
- Custom Policies: Create your own rules and actions
- Multiple Actions: Block, anonymize, replace, or raise exceptions
- Multi-language Support: Automatically adapts to user’s language
- LLM-Powered Detection: Use LLMs for context-aware content detection
Example
Tool Safety Policies
Tool safety policies provide two validation points:- Pre-execution (
tool_policy_pre): Validates tools during registration before task execution - Post-execution (
tool_policy_post): Validates tool calls before execution when LLM invokes a tool
Navigation
- Pre-built Policies - Ready-to-use policies for PII, adult content, hate speech, and more
- Custom Policy - Create your own safety policies with custom rules and actions
- Creating Rules - Define custom detection rules for content filtering
- Creating Actions - Configure actions for policy violations

