> 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/tech/api-integration.md).

# API 串接

- [快速上手](https://docs.maiagent.ai/tech/api-integration/quickstart.md)
- [AI 助理列表](https://docs.maiagent.ai/tech/api-integration/qu-de-ji-qi-ren-lie-biao-bing-dui-hua.md)
- [對話與訊息回覆（串流/同步）](https://docs.maiagent.ai/tech/api-integration/dui-hua-yu-xun-xi-hui-fu-chuan-liu-tong-bu.md): 對話與同步
- [建立對話與訊息](https://docs.maiagent.ai/tech/api-integration/dui-hua-yu-xun-xi.md)
- [Webhook](https://docs.maiagent.ai/tech/api-integration/webhook.md): 對話平台 Webhook：把訪客訊息與 AI／真人回覆即時推送到您的系統，支援 MaiAgent 標準格式、Genesys Cloud 與自訂 Jinja2 範本
- [第三方客服系統串接（含轉真人）](https://docs.maiagent.ai/tech/api-integration/customer-service-system-integration.md): 客服系統或聊天平台以 API 接入 MaiAgent 當 AI 引擎：訊息進出、AI 判定轉真人時交由您的真人客服接手、結束後回到 AI 的端到端規格
- [Presigned 檔案上傳模式](https://docs.maiagent.ai/tech/api-integration/api_knowledge.md): 檔案串接上傳檔案
- [使用知識庫—建立與互動](https://docs.maiagent.ai/tech/api-integration/shi-yong-zhi-shi-ku-jian-li-yu-hu-dong.md): 本指南將說明如何使用公開 REST API 來管理知識庫中的檔案，並說明整合應用例子。
- [Web Chat 嵌入與 SDK](https://docs.maiagent.ai/tech/api-integration/web-chat-sdk.md): 將 MaiAgent Web Chat 嵌入任何網站：嵌入碼、視窗模式、身份識別、完整配置參考與 JavaScript SDK API
- [串接 MaiGPT：選對助理、補齊能力](https://docs.maiagent.ai/tech/api-integration/web-chat-sdk/maigpt-integration.md): 把「像 MaiGPT 一樣」的 AI 助理串進自家系統：釐清 MaiGPT 產品與 MaiGPT 視窗模式的差別、選對要嵌入的助理、補齊生圖等工具能力
- [MaiGPT 模式嵌入](https://docs.maiagent.ai/tech/api-integration/web-chat-sdk/web-chat-maigpt-mode.md): 將類 ChatGPT 的 MaiGPT 完整對話介面嵌入您的網站或產品，支援指定容器與漂浮全屏兩種佈局
- [注入頁面 Context](https://docs.maiagent.ai/tech/api-integration/web-chat-sdk/web-chat-context-data.md): 透過 embed SDK 的 auth.contextData，把頁面 context（如商品 ID、工單編號、使用者識別碼）注入 AI 助理的 LLM System Prompt
- [API 工具工程指南](https://docs.maiagent.ai/tech/api-integration/api-tool-engineering-guide.md): 把你的 REST API 接給 MaiAgent AI 助理當工具：請求怎麼組、認證怎麼帶、逾時與重試、錯誤怎麼回給模型、記錄怎麼查。


---

# 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/tech/api-integration.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.
