<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title><![CDATA[Fram Souza - Elasticsearch Labs]]></title>
    <description><![CDATA[Articles and tutorials from the Search team at Elastic]]></description>
    <copyright><![CDATA[© 2026. Elasticsearch B.V. All Rights Reserved]]></copyright>
    <image>
      <title><![CDATA[Fram Souza - Elasticsearch Labs]]></title>
      <url>https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt1121c0bf0e8a6e65/6a88da6340a1841030ef456f/search-labs-thumbnail.png</url>
      <link>https://www.elastic.co/jp/search-labs/author/fram-souza</link>
    </image>
    <link>https://www.elastic.co/jp/search-labs/author/fram-souza</link>
    <atom:link href="https://www.elastic.co/jp/search-labs/rss/author/fram-souza.xml" rel="self" type="application/rss+xml"/>
    <language><![CDATA[jp]]></language>
    <lastBuildDate>Wed, 23 Sep 2026 09:01:56 GMT</lastBuildDate>
  <item>
    <title><![CDATA[Elasticsearch Serverlessプロジェクトを管理するAIエージェント]]></title>
    <description><![CDATA[Elasticsearch Serverless プロジェクトを簡単に管理し、プロジェクトの作成、削除、ステータス チェックを可能にする自然言語対応の AI エージェント。]]></description>
    <content:encoded><![CDATA[<h2>AIエージェントを使用してサーバーレスElasticsearchプロジェクトを管理する方法</h2><ol><li><p><strong>リポジトリのクローンを作成します。</strong> <code>git clone https://github.com/elastic/elasticsearch-labs/supporting-blog-content/serverless-ai-agent</code> <code>a</code>を使用して GitHub からツールのコードをダウンロードし、 <code>cd serverless-ai-agent</code>を使用してディレクトリに移動します。</p></li><li><p><strong>環境の設定:</strong> <code>python -m venv venv</code>を使用して仮想環境 (オプション) を作成し、アクティブ化します (Windows の場合は<code>source venv/bin/activate</code>または<code>venv\Scripts\activate</code> )。次に、 <code>pip install -r requirements.txt</code>を使用して必要な Python パッケージをインストールします。</p></li><li><p><strong>資格情報を構成する:</strong>プロジェクト ルートに<code>.env</code>ファイルを作成し、Elasticsearch API URL ( <code>ES_URL</code> )、API キー ( <code>API_KEY</code> )、リージョン ( <code>REGION</code> )、OpenAI API キー ( <code>OPENAI_API_KEY</code> ) を入力します。</p></li><li><p><strong>ツールを実行します:</strong>ターミナルで<code>python main.py</code>を実行してツールを実行します。これにより、AI エージェントが起動し、コマンドのプロンプトが表示されます。</p></li><li><p><strong>自然言語でプロジェクトを管理する:</strong> 「my\_project という名前のサーバーレス プロジェクトを作成する」、「my\_project という名前のサーバーレス プロジェクトのステータスを取得する」、「my\_project という名前のサーバーレス プロジェクトを削除する」などのわかりやすい英語のコマンドを使用してツールを操作します。AI はコマンドを解釈し、対応する機能を実行します。</p></li></ol><h2>背景</h2><p>この小さなコマンドライン ツールを<a href="https://www.elastic.co/guide/en/serverless/current/intro.html">使用すると、Serverless Elasticsearch プロジェクトを</a>わかりやすい英語で管理できます。AI (この場合は OpenAI) と対話して、ユーザーの意図を理解し、LlamaIndex を使用して適切な関数を呼び出します。</p><h3>Elasticsearch Serverless AIエージェントは何ができるのか</h3><ul><li><p><strong>プロジェクトを作成する</strong>: 新しい Serverless Elasticsearch プロジェクトを起動します。</p></li><li><p><strong>プロジェクトの削除</strong>: 既存のプロジェクトを削除します (削除後はクリーンアップされます)。</p></li><li><p><strong>プロジェクトのステータスを取得</strong>: プロジェクトの進行状況を確認します。</p></li><li><p><strong>プロジェクトの詳細を取得</strong>: プロジェクトに関するすべての重要な詳細を取得します。</p></li></ul><p><a href="https://github.com/elastic/elasticsearch-labs/tree/a65f7bc1e4a041765d1c0a45ac44b9cd9fc1589f/supporting-blog-content/serverless-ai-agent">GitHub でコードを確認してください。</a></p><h3>Elasticsearch Serverless AIエージェントの仕組み</h3><p>次のように入力すると:</p><p><em>「my_project という名前のサーバーレス プロジェクトを作成する」</em></p><p>…舞台裏ではこんなことが起こっています:</p><ul><li><p><strong>ユーザー入力とコンテキスト:</strong>自然言語コマンドが AI エージェントに送信されます。</p></li><li><p><strong>関数の説明:</strong>詳細な説明が与えられているため、AI エージェントは、create_ess_project、delete_ess_project、get_ess_project_status、get_ess_project_details などのいくつかの関数についてすでに認識しています。これらの説明は、各関数が何を実行し、どのようなパラメータが必要かを AI に伝えます。</p></li><li><p><strong>LLM 処理:</strong>クエリと関数情報が LLM に送信されます。つまり、AI は次のことを認識します。</p><ul><li><p><strong>ユーザークエリ</strong>: わかりやすい英語での指示。</p></li><li><p><strong>利用可能な機能と説明</strong>: 各ツールの機能の詳細により、適切なツールを選択できます。</p></li><li><p><strong>コンテキスト/履歴チャット情報</strong>: 会話なので、以前に話された内容を記憶します。</p></li></ul></li><li><p><strong>関数の呼び出しと応答:</strong> AI はどの関数を呼び出すかを判断し、適切なパラメーター (プロジェクト名など) を渡して、関数が実行されます。応答はわかりやすい形式で返されます。</p></li></ul><p>つまり、自然言語クエリと詳細なツール説明のリストの両方を LLM に送信して、LLM がそれを「理解」し、リクエストに適したアクションを選択できるようにします。</p><h3>AIエージェントを設定する</h3><h4>前提条件:</h4><p>AI エージェントを実行する前に、次の設定がされていることを確認してください。</p><ol><li><p><strong>Python (v3.7 以降)</strong>がインストールされています。</p></li><li><p>Elastic Cloud にセットアップされた<strong>Elasticsearch サーバーレス アカウント</strong>。</p></li><li><p>言語モデルと対話するための<strong>OpenAI アカウント</strong>。</p></li></ol><h4>手順:</h4><p><strong>1. リポジトリをクローンします。</strong></p>git clone https://github.com/elastic/elasticsearch-labs/supporting-blog-content/serverless-ai-agent
cd serverless-ai-agent<p><strong>2. 仮想環境を作成する (オプションですが推奨):</strong>環境関連の問題に直面している場合は、分離のために仮想環境を設定できます。</p>python -m venv venv
source venv/bin/activate  # On Windows, use venv\Scripts\activate<p><strong>3. 依存関係をインストールします。</strong>次のコマンドを実行して、必要な依存関係がすべてインストールされていることを確認します。</p>pip install -r requirements.txt<p><strong>4. 環境を設定する:</strong> .env を作成するプロジェクト ルートに次の変数を含むファイルを作成します。以下に、役に立つサンプルの<code>.env.example</code>ファイルを示します。</p>ES_URL=your_elasticsearch_api_url  # The base URL for your Elasticsearch service (e.g., https://your-cluster-id.es.region.aws.elastic-cloud.com)
API_KEY=your_elasticsearch_api_key  # Your API key for Elasticsearch
REGION=your_region  # Example: aws-eu-west-1
OPENAI_API_KEY=your_openai_api_key  # Your OpenAI API key<p><code>ES_URL</code> 、 <code>API_KEY</code> 、 <code>OPENAI_API_KEY</code>の値が正しいことを確認してください。API キーはそれぞれのサービス ダッシュボードで確認できます。</p><p><strong>5. プロジェクト ファイル:</strong>ツールは、 <code>projects.json</code>ファイルを使用してプロジェクト マッピング (プロジェクト名とその詳細) を保存します。このファイルが存在しない場合は自動的に作成されます。</p><h3>AIエージェントの実行</h3>python main.py<p>次のようなプロンプトが表示されます。</p>Welcome to the Serverless Project AI Agent Tool!
You can ask things like:
 - 'Create a serverless project named my_project'
 - 'Delete the serverless project named my_project'
 - 'Get the status of the serverless project named my_project'
 - 'Get the details of the serverless project named my_project'<p>コマンドを入力すると、AI エージェントが魔法のように動作します。完了したら、 <code>exit</code>または<code>quit</code>と入力して終了します。</p><h3>さらに詳しい情報</h3><ul><li><p><strong>LLM 統合</strong>: LLM には、クエリと利用可能な各機能の詳細な説明の両方が提供されます。これにより、コンテキストを理解し、たとえば、 <code>create_ess_project</code>を呼び出すか<code>delete_ess_project</code>を呼び出すかを決定するのに役立ちます。</p></li><li><p><strong>ツールの説明</strong>: 各関数ツール (FunctionTool.from_defaults を使用して作成)親切な説明があります。この説明は LLM に送信されるプロンプトに含まれているため、LLM は利用可能なアクションと各アクションで期待される内容を「認識」します。</p></li><li><p><strong>永続性</strong>: プロジェクトとその詳細はprojects.jsonに保存されます。毎回情報を再入力する必要がなくなります。</p></li><li><p><strong>詳細ログ</strong>: エージェントは詳細モードに設定されており、デバッグや、命令が関数呼び出しにどのように変換されるかを確認するのに最適です。</p></li></ul><h3>Elasticsearch AIエージェントの利用例</h3>python main.py 

Welcome to the Serverless Project AI Agent Tool!

You can ask things like:
 - 'Create a serverless project named my_project'
 - 'Delete the serverless project named my_project'
 - 'Get the status of the serverless project named my_project'
 - 'Get the details of the serverless project named my_project'

User: Create a serverless project named my-february-test
Added user message to memory: Create a serverless project named my-february-test

=== Calling Function ===
Calling function: create_ess_project with args: {"project_name":"my-february-test"}
========================


Agent: The serverless Elasticsearch project named "my-february-test" has been created successfully. Here are the details:

- **Project ID:** &lt;&gt;&gt;
- **Elasticsearch Endpoint:** [https://my-february-test-ccc399.es.eu-west-1.aws.qa.elastic.cloud](https://my-february-test-ccc399.es.eu-west-1.aws.qa.elastic.cloud)
- **Kibana Endpoint:** [https://my-february-test-ccc399.kb.eu-west-1.aws.qa.elastic.cloud](https://my-february-test-ccc399.kb.eu-west-1.aws.qa.elastic.cloud)

User: get my-february-test status
Added user message to memory: get my-february-test status

=== Calling Function ===
Calling function: get_ess_project_status with args: {"project_name":"my-february-test"}
========================

Agent: The status of the "my-february-test" project is currently **initializing**.

User: get my-february-test info
Added user message to memory: get my-february-test info

=== Calling Function ===
Calling function: get_ess_project_details with args: {"project_name":"my-february-test"}
========================

Agent: Here are the details for the "my-february-test" project:

- **Project Name:** my-february-test
- **Alias:** my-february-test-ccc399
- **Cloud ID:** ""
- **Project ID:** ""
- **Region ID:** aws-eu-west-1
- **Created At:** 2025-02-12T15:42:00.530177619Z
- **Created By:** 571213384
- **Organization ID:** ""
- **Type:** Elasticsearch
- **Optimized For:** General Purpose
- **Search Lake:**
  - **Boost Window:** 7
  - **Search Power:** 100
- **Endpoints:**
  - **Elasticsearch:** https://my-february-test-ccc399.es.eu-west-1.aws.qa.elastic.cloud
  - **Kibana:** https://my-february-test-ccc399.kb.eu-west-1.aws.qa.elastic.cloud
- **Credentials:**
  - **Username:** ""
  - **Password:** ""

Please ensure to keep the credentials secure.

User: please delete the my-february-test project
Added user message to memory: please delete the my-february-test project

=== Calling Function ===
Calling function: delete_ess_project with args: {"project_name":"my-february-test"}
========================

Agent: The "my-february-test" project has been deleted successfully.<p></p>]]></content:encoded>
    <link>https://www.elastic.co/search-labs/blog/serverless-elasticsearch-ai-agent</link>
    <guid isPermaLink="true">https://www.elastic.co/search-labs/blog/serverless-elasticsearch-ai-agent</guid>
    <category><![CDATA[Elastic Cloud Serverless]]></category>
    <category><![CDATA[エージェント型AI]]></category>
    <dc:creator><![CDATA[Fram Souza]]></dc:creator>
    <enclosure url="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt88526af16bafdb7c/6a17d7807f6f15825dc0998d/d11e1ba058784ec92b8953fb8db62e1bad21c210-720x420.jpg" length="0" type="image/jpeg"/>
    <pubDate>Tue, 04 Mar 2025 00:00:00 GMT</pubDate>
  </item>
  </channel>
</rss>