AI Guardrails
MaiAgent's AI safety mechanisms: customer-configurable Hook message interception (personal data masking, content safety classification, and more), along with ICAP content validation and AWS Bedrock Gu
MaiAgent provides several safeguards along the path where content enters and leaves large language models. The system enforces them without relying on the model's self-discipline. This page explains who configures each mechanism, where it applies, and when to use it. Refer to the user manual for steps in the admin console.
Mechanism Overview
Members with “Hook permissions” configure it themselves in the admin console
Before content enters the model and before AI responses are sent
Masking personal data, blocking prompt injection and inappropriate content, filtering sensitive words, and screening responses
MaiAgent configures it based on the organization's needs
Conversation messages and attachments, and knowledge base files (see that page for scope)
Enterprises with existing ICAP antivirus / DLP services that need to integrate existing security controls
Only MaiAgent can configure it for an Agent
User input and AI responses
Scenarios requiring Bedrock Guardrails policies (content filtering, denied topics, personal data masking, and grounding checks)
The three mechanisms are configured and executed independently. There is no shared policy layer or unified table of “block / alert / allow” rules. Hooks rewrite or intercept content, Bedrock Guardrails blocks or masks it according to its policies, and ICAP allows or rejects files based on scan results. When multiple mechanisms are enabled, content passes through each check separately. If any mechanism blocks the content, it will not be sent to the model or the user. The platform also does not integrate third-party runtime prompt injection protection products (such as WAFs or AI firewalls). If these controls are needed, place them in the network layer between users and MaiAgent, or use Hook prompt injection detection instead.
Hook Message Interception
Hooks are a protection layer that customers can configure themselves. Create a Hook from a template, adjust its parameters, and apply it to an Agent. An Agent can have multiple Hooks, executed in order.
Prerequisites: The platform must have the Hook feature enabled, and the organization must have access to Hooks (included automatically in enterprise plans, or enabled individually by MaiAgent). If the Hook menu is not visible in the admin console, contact your MaiAgent representative.
Trigger Points and Actions
Before content enters the model
User messages, attachment content, passages retrieved from the knowledge base, and tool results in Agent mode
Before AI responses are sent
Responses generated by the Agent
There are two actions: rewrite (for example, mask personal data before sending) and intercept (block the content and reply with a custom message). When attachment content, a knowledge base passage, or a tool result is intercepted, only that content is excluded from the model; the conversation continues.
Detection Methods
Rule matching
Match patterns or keywords, such as email addresses, mobile phone numbers, national ID numbers, credit card numbers, or specified prohibited words
Processed within the MaiAgent platform
Large language model assessment
Use a selected model to assess content, such as whether it is a prompt injection attack or whether a response lacks grounding
Sent to the selected model
Personal data detection service
Detect personal data without a fixed format, such as names and addresses; Google Cloud DLP is currently available
Sent to the detection service
Content safety classification service
Classify content by categories such as hate, harassment, sexual content, violence, self-harm, illegal activities, and jailbreak attacks; OpenAI Moderation is currently available
Sent to the classification service
Personal data detection and content safety classification deduct credits based on the number of characters scanned (per thousand characters). For available templates, each template's parameters, and interception records, see Hook Message Interception, Add and Configure a Hook, and Hook Execution Logs in the user manual.
AWS Bedrock Guardrails
AWS Bedrock Guardrails is a protection service provided by AWS. MaiAgent can assign a Guardrail (ID and version) to an individual Agent. That Agent's conversations then pass through the Guardrail checks:
User input: Checked before entering the model. If a blocking rule is triggered, the Guardrail's configured blocking message is returned directly.
AI responses: Checked before sending, together with the question and retrieved passages. If a blocking rule is triggered, the response is replaced with the blocking message. If a masking rule is triggered, the masked content is returned instead.
Usage limitations:
Only MaiAgent can configure it: There is no configuration option in the admin console. The Guardrail must be created in the AWS environment called by the MaiAgent platform. A Guardrail created in the customer's own AWS account cannot be applied directly. Contact your MaiAgent representative if needed.
Responses are not streamed token by token: For an Agent with a Guardrail applied, the entire response is sent after checks are complete.
Connectivity to AWS Bedrock is required; offline on-premises environments cannot use it.
For scenarios that do not require AWS, prioritize Hooks, which you can configure yourself.
Last updated
Was this helpful?