Add and Configure Hooks
Create a Hook from a standard template, configure its parameters (prohibited terms, evaluation model, detection service, block message, and more), and associate it with an Agent.
This page explains how to create a Hook from a standard template, configure its parameters, and attach it to an Agent so it can start working.
1. Add a Hook
1. Open the Hook List
From the left menu, go to AI Features → Hook. The list displays all Hooks in the current organization, including their name, description, type, interception point, action, associated AI assistants, enabled status, creator, and update time.

2. Select a Template
Click Add Hook in the upper-right corner, then select a standard template in the pop-up window. Each template card shows its interception point and action, making it easy to quickly identify its purpose.

2. Configure Parameters
Each template has different parameters. You can configure them on the Hook settings page after creation. Common parameters include:
Personal Data Masking
PII types to mask
Select the types to detect (Email/mobile phone number/ID number/credit card)
Semantic Personal Data Masking
Personal data detection model and detection types, minimum confidence, masking style
Select a detection service, then choose the personal data types to mask (name, address, phone number, and more); increasing the confidence value can reduce false positives
Sensitive Keyword Blocking
Prohibited terms, minimum term length
Enter one prohibited term per line; the minimum term length filters out terms that are too short and helps prevent false positives
Prompt Injection Protection
Evaluation model, additional evaluation rules
Select an LLM to determine whether content is an attack; you can also add custom rules
Content Safety Classification Blocking
Content safety model and blocked categories, additional score threshold, behavior when the detection service is unavailable
Select a detection service, then choose the categories to block; if none are selected, any category violation will be blocked
Invalid Message Filtering
Greeting list, consecutive repetition limit, evaluation model
Rules filter messages first, then an LLM determines whether a message is invalid
Response Reliability Check
Rewrite model, verification criteria
Select an LLM to determine whether a response is reliable and rewrite it

Evaluation Model (LLM-Based Templates)
Templates that require semantic evaluation—Prompt Injection Protection, Invalid Message Filtering, and Response Reliability Check—include an evaluation model field. The drop-down menu lists the models currently available to your organization. This evaluation runs for every message, so we recommend selecting a fast, lower-cost model (such as Haiku, GPT-5 mini, or Gemini Flash). Leave the field blank to use the platform's default model.
The evaluation model deducts your organization's Credits at that model's rate each time it runs. A “When receiving a user message” Hook also checks attachments, knowledge base passages, and tool responses one by one, so a single message may call the evaluation model several times. Messages that Invalid Message Filtering blocks directly by rule do not call the evaluation model. These charges appear in the Credits consumption records, with the note “This charge was triggered and recorded by a Hook” next to the detail line. To learn how to view them, see View Hook Consumption.

Detection Service (Safety Model-Based Templates)
Content Safety Classification Blocking and Semantic Personal Data Masking do not use a general-purpose LLM for evaluation. Instead, they send content to a dedicated safety model. This model returns structured classifications and scores that support thresholds and auditing, with lower latency and cost than an LLM judge. Both templates use a two-step configuration: first select a detection service, then choose the items to process.
Content Safety Classification Blocking
Under Content Safety Model and Blocked Categories, select a detection service from the first drop-down menu (OpenAI Moderation is currently available).
In the second drop-down menu, select the categories to block, such as harassment, hate, illegal activity, self-harm, sexual content, and violence. Selecting no categories means that any category violation will be blocked (the strictest option and the recommended starting setting).
The default Additional Score Threshold is 0, meaning the model's determination is used directly. If you set a value between 0 and 1, a score must also meet that threshold to be blocked. Raising the threshold can reduce false positives.
When the Detection Service Is Unavailable determines what happens when the service times out or no key is configured:
passallows the message through (availability first; default), whileblockalways blocks it (compliance first; recommended for regulated industries).


Semantic Personal Data Masking
Under Personal Data Detection Model and Detection Types, select a detection service from the first drop-down menu (Google Cloud DLP is currently available).
In the second drop-down menu, select the personal data types to mask. “Standard types” include names, addresses, phone numbers, email addresses, Taiwan ID numbers, and Taiwan passport numbers, while “provider-specific types” include credit card numbers, IBANs, and other detailed types. Selecting more types increases the cost of each call, so we recommend selecting only those that your business actually needs to mask.
The default Minimum Confidence is 0.5. Detection results below this value are ignored. Raising the value can reduce false positives (such as mistaking a company name for a person's name), at the cost of potentially missing some data.
Masking Style:
type_tokenreplaces content with placeholders such as[NAME]and[ADDRESS], so the AI still knows what type of data was originally present (recommended);asteriskreplaces it with an equal number of asterisks, completely concealing the type.


3. Associate Agents
A Hook only takes effect after it is attached to an Agent. There are two ways to do this:
Attach during creation: On the Apply to AI Assistants tab when creating a Hook, select the Agents to which it should apply.
Attach from Agent settings: Open an Agent's settings page, switch to the Hook tab, and select the Hook to apply.

Enable the Hook
After confirming the parameters and associated Agents, set the Hook to Enabled. Once enabled, the Hook runs automatically at the corresponding point whenever a user interacts with that Agent.
Who Can Edit or Delete a Hook
Members whose role has the Hook permission can see all Hooks in the organization, open their settings pages to view parameters, and add new Hooks. However, only the following two kinds of people can edit or delete a Hook, including changing the Agents it applies to on its Apply to AI Assistants tab:
The organization owner
The creator of the Hook (the “Creator” column in the list)

Other members still see the edit and delete icons in the list's action column (hovering shows “Edit” and “Delete”). However, when they click Save or confirm a deletion, an error message about missing permission appears (saving also shows “Failed to save Hook”), and the Hook remains unchanged and is not modified or deleted.
4. Next Steps
After completing the setup, you can view each interception or modification in Hook Execution Logs to confirm that the Hook is working correctly.
Last updated
Was this helpful?