> 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/maiagent-user-guide/ja/build/integrate.md).

# 活用例：外部データ連携

外部データ連携

実際の運用シーンでは、Agent が正確かつタイムリーな回答を提供するために、ナレッジベース以外の「リアルタイムデータ」や「外部システムのデータ」へアクセスする必要が生じることがよくあります。MaiAgent のツール（API ツール、MCP ツール）機能を利用すれば、社内システムやサードパーティプラットフォームのデータソースを Agent に連携でき、システムをまたいだ検索やリアルタイム応答が可能なスマートアプリケーションを構築できます。

### 活用シーン <a href="#use-cases" id="use-cases"></a>

* **公開データプラットフォームとの連携**：たとえば政府のオープンデータ（農業、気象、交通、財政）と連携し、Agent が最新の公開データをリアルタイムで取得できるようにします。
* **社内システムの照会**：ERP、CRM、HR、チケットシステムなどの社内 API と連携し、Agent が従業員や顧客の属性に応じてパーソナライズされた情報を提供できるようにします。
* **サードパーティ SaaS との統合**：Slack、Notion、Google Drive、Salesforce などのサービスと連携し、Agent を既存のワークフローに組み込みます。
* **動的な照会とレポート**：データ量が多い、または変動が頻繁でナレッジベースに格納するのが適さない場合は、API によるリアルタイム照会で回答する方式に切り替えられます。

### 連携フロー <a href="#integration-workflow" id="integration-workflow"></a>

1. **データソースの取得**：連携したい API または MCP サービスを確認し、エンドポイント、HTTP メソッド、ヘッダー、パラメータ構造を準備します。
2. **ツールの作成**：MaiAgent プラットフォームの <mark style="color:blue;">ツール</mark> ページで <mark style="color:blue;">API ツールを新規追加</mark> または <mark style="color:blue;">MCP ツールを新規追加</mark> をクリックします。API ツールを新規追加する際は cURL コマンドをそのまま貼り付けることができ、システムが URL、ヘッダー、HTTP メソッドを自動的に解析します。
3. **Agent の設定**：ツールを Agent の利用可能なツール一覧に追加し、ロール指示を通じて適切なタイミングでツールを呼び出すよう Agent を誘導します。
4. **テストと公開**：対話を通じてツール呼び出しのフローをテストし、AgentOps 配下の <mark style="color:blue;">ツール実行履歴</mark> で実行状況やエラーメッセージを確認します。回答が正しいことを確認できたら、公開して利用を開始できます。

### 活用例 <a href="#examples" id="examples"></a>

* [農業データの照会](/maiagent-user-guide/ja/build/integrate/farmingsearch.md)：農業部の公開 API と連携し、農産物の取引相場をリアルタイムで照会できるアシスタントを構築します。
* [Google Workspace コネクタ](/maiagent-user-guide/ja/build/integrate/google-workspace-connector.md)：プラットフォーム標準の Google Workspace コネクタ（MCP）を利用して、Agent が Gmail のメールと添付ファイル、Google カレンダーの予定、Google ドライブのドキュメントを照会できるようにします。

以降の各セクションでは、実際のケースを通じて外部データ連携の手順を示し、ご自身の業務シーンへ素早く応用していただけるようサポートします。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/ja/build/integrate.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
