cxcli tool has command that allows you to interactively play with your agent from your terminal!
You can find the dialog functionality within the
cxcli dialog subcommand. You can read the documentation about this command here.
These are the relevant parameters that you can use to interact with your agent interactively from your terminal:
locale: this parameter accepts all of the locales that are available in Dialogflow CX.
Here is a simple example of the
cxcli dialog command:
The above command will give you output similar to the following:
$ cxcli dialog --agent-name test-agent --project-id test-cx-346408 --location-id us-central1
INFO Please press Ctrl+C whenever you want to stop the interaction.
Agent> Hi, this is Information Finder. Which product information do you need?
User> sorry, can you repeat
Agent> I didn't get that.
Agent> Hi, I am a chatbot that can help you find information about CorpX products: Intelligent Customer Insight, Order Fulfillment, Order Handling, Order Management Suite, Sales Engine, or Supercharge.
Agent> Do you want to continue looking up information for one of these products? Say yes or no.
Once the session is finished, you will get the terminal prompt again.