会話型アクションのサポートは 2023 年 6 月 13 日に終了しました。詳細については、
会話型アクションの廃止をご覧ください。
プロジェクトと Dialogflow エージェント(Dialogflow)を作成する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Dialogflow を使用して開発する場合は、まず、Actions プロジェクトと Dialogflow エージェントを作成する必要があります。プロジェクトを作成すると、Actions Console にアクセスしてアクションを管理、配信できます。Dialogflow エージェントには、アクションを定義するすべてのインテントが格納されます。
Actions プロジェクトと Dialogflow エージェントを作成する
- Actions Console に移動します。
- [New project](新しいプロジェクト)をクリックします。
- プロジェクトの名前を入力し、[プロジェクトを作成] をクリックします。
- [その他のオプション] セクションまで下にスクロールし、[会話] カードをクリックします。
- トップメニューの [Develop](開発)をクリックし、左側のメニューで [Actions](アクション)をクリックします。
- [最初のアクションを追加] をクリックします。
- [カスタム インテント] カードで [ビルド] をクリックします。
- Dialogflow コンソールが開き、エージェントに自動的に情報が入力された情報が表示されます。[作成] をクリックしてエージェントを保存します。
Dialogflow コンソール
Dialogflow コンソールとメニューパネルが左側に表示されます。小さな画面でメニューが表示されていない場合は、左上隅の menu をクリックします。
中央のウィンドウに、エージェントのインテントが一覧表示されます。デフォルトでは、Dialogflow エージェントには最初から 2 つのインテントが含まれています。デフォルト ウェルカム インテントは、ユーザーを歓迎するメッセージを発します。ユーザーの発話が理解できない場合、エージェントはデフォルトのフォールバック インテントをマッチングします。
ページの右側には Dialogflow シミュレータが表示されます。シミュレータでは、メッセージを声に出すかキーボードから入力して、エージェントを試すことができます。Dialogflow シミュレータで [Try it now](今すぐ試す)をクリックして何かを入力し、Enter キーを押します。

図 1. Dialogflow コンソールにエージェントが表示されているスクリーンショット。
最初のインテントを作成する
Dialogflow はインテントを使用してユーザーの意図を分類します。インテントにはトレーニング フレーズがあります。トレーニング フレーズとは、ユーザーがエージェントに話しかける可能性のあるフレーズの例です。たとえば、エージェントの名前を知りたいユーザーが「お名前は何ですか?」、「名前はありますか?」と言うか、単に「名前」と言ってください。これらのフレーズの最終目的はすべて同じで、エージェントの名前を取得することです。
このケースを処理するエージェントを作成する方法は次のとおりです。
- ナビゲーション メニューの [Intents] の横にある add をクリックします。
- [インテント名] テキスト フィールドに「
Name
」と入力します。
- [Training Phrases](トレーニング フレーズ)セクションで [Add Training Phrases](トレーニング フレーズを追加)をクリックします。
- 次のフレーズを入力します(各フレーズの後に Enter キーを押します)。
What is your name?
Do you have a name?
name
- [Responses](レスポンス)セクションで [Add Response](レスポンスを追加)をクリックします。
- [Text Response] ウィンドウに次のレスポンスを入力します。
- [保存] をクリックします。
試してみる

新しい Name インテントをテストするには、Dialogflow シミュレータで「What's your name?」と入力し、Enter キーを押します。
トレーニング フレーズとまったく同じではない質問をしても、エージェントは質問に正しく回答できます(たとえば、「What's your name?」と「What is your name?」など)。
Dialogflow は、トレーニング フレーズを使用して機械学習モデルをトレーニングします。これにより、エージェントはユーザーの発言をマッチングして正しいインテントを選ぶことができます。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eTo begin developing with Dialogflow, you need to set up an Actions project and a Dialogflow agent using the Actions console.\u003c/p\u003e\n"],["\u003cp\u003eDialogflow utilizes intents, containing training phrases and responses, to understand and respond to user requests.\u003c/p\u003e\n"],["\u003cp\u003eYou can test your Dialogflow agent using the built-in simulator by typing or speaking messages.\u003c/p\u003e\n"],["\u003cp\u003eDialogflow employs machine learning to match user input to the appropriate intents, even if the phrasing differs slightly from training phrases.\u003c/p\u003e\n"]]],[],null,["# Create a project and Dialogflow agent (Dialogflow)\n\nTo develop with Dialogflow, you first need to create an Actions project and a\nDialogflow agent. Having a project allows you to access the developer console to\nmanage and distribute your Action. The Dialogflow agent contains all the intents\nthat define your Action.\n| **Note:** When creating a new project, Actions on Google enables [Firebase](//firebase.google.com/), Google's developer platform that provides a number of services for app developers. Relative terms of service information can be found in the [Actions on Google Terms Explanation](/assistant/console/policies/terms-explanation).\n\nCreate an Actions project and Dialogflow agent\n----------------------------------------------\n\n1. Go to the [Actions console](//console.actions.google.com/).\n2. Click **New project**.\n3. Enter a name for your project and click **Create Project** .\n4. Scroll down to the **More options** section and click on the **Conversational** card.\n5. Click **Develop** in the top menu, then click **Actions** in the left menu.\n6. Click **Add Your First Action**.\n7. On the **Custom intent** card, click **Build**.\n8. The Dialogflow console appears with the information automatically populated in an agent. Click **Create** to save the agent.\n\nThe Dialogflow console\n----------------------\n\nYou should now see the Dialogflow console and the menu panel on the left. If\nyou're on a small screen and the menu is hidden, click\n*menu* in the upper left corner.\n\nThe center window shows the list of intents for the agent. By default,\nDialogflow agents start with two intents. The *Default Welcome Intent* greets\nyour users. Your agent matches the *Default Fallback Intent* when it doesn't\nunderstand what the users say.\n\nThe Dialogflow simulator is on the right side of the page. The simulator lets\nyou try out your agent by speaking or typing messages. In the Dialogflow\nsimulator, click **Try it now**, type anything, and press enter.\n\n**Figure 1**. A screenshot of the Dialogflow console showing an agent.\n\nCreate your first intent\n------------------------\n\nDialogflow uses intents to categorize a user's intentions. Intents have\n*Training Phrases*, which are examples of what a user might say to your agent.\nFor instance, a user who wants to know your agent's name might ask, \"What is\nyour name?\", \"Do you have a name?\", or simply say \"name\". These phrases have the\nsame end goal: to get the name of your agent.\n\nTo create an agent that handles this case, follow these steps:\n\n1. Click *add* next to **Intents** in the navigation menu.\n2. Enter `Name` in the **Intent name** text field.\n3. In the **Training Phrases** section, click **Add Training Phrases**.\n4. Enter the following phrases (press enter after each phrase):\n - `What is your name?`\n - `Do you have a name?`\n - `name`\n5. In the **Responses** section, click **Add Response**.\n6. Enter the following response in the **Text Response** window:\n - `My name is Dialogflow!`\n7. Click **Save**.\n\nTry it out\n----------\n\nTo test your new *Name* intent, in the Dialogflow simulator, type \"What's\nyour name?\" and press enter.\n\nYour agent can respond to your question correctly even when you ask questions\nthat aren't exactly the same as the training phrases (for example, \"What's your\nname?\" versus \"What is your name?\").\n\nDialogflow uses training phrases to train a machine learning model, which helps\nthe agent match user utterances to the correct intents."]]