> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/hook.md).

# Hook 訊息攔截

- [Hook 訊息攔截](https://docs.maiagent.ai/hook/hook.md): 在使用者訊息進入 AI 前、AI 回覆送出前自動介入，遮罩個資、攔截惡意指令、把關回覆品質——系統層強制執行、不靠 AI 自律，並留下完整稽核紀錄。
- [新增與設定 Hook](https://docs.maiagent.ai/hook/setup.md): 從標準範本建立 Hook、調整參數（禁語清單、判斷模型、封鎖訊息等），並關聯到 AI 助理。
- [Hook 執行紀錄](https://docs.maiagent.ai/hook/execution-logs.md): 查看每一次 Hook 攔截或改寫的紀錄、控制是否記錄原始訊息內容，以及從對話中追查單筆訊息的 Hook 執行詳情。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.maiagent.ai/hook.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
