Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Autopilot CLI

The standalone Autopilot CLI used to be the only CLI tool for Autopilot. While we will continue to support it, we will not add more capabilities to it. All future improvements will be made to the Autopilot Plugin described below. We recommend you switch to using the Plugin.

The Autopilot Plugin for the Twilio CLI provides a command line interface for managing your Autopilot bots. It is built using the framework provided by the Twilio CLI, allowing it to use the same core features, like address management and logging for example.

After installing the Plugin, you'll be able to

  • Create an assistant from a template.
  • Export an existing assistant to a JSON schema file.
  • Update an existing assistant with a JSON schema file.
  • Delete an assistant.
  • Simulate an Assistant.
  • Train individual Tasks by uploading samples using a csv file.
  • Train individual Custom Field Types by uploading samples using a csv file.
  • Import a DialogFlow Agent or Alexa Skill into Autopilot.
  • Bulk upload Field values.

The Plugin enables you to:

  • Keep your assistant in a repository with version control.
  • Integrate with your CI environment.
  • Share schema files and collaborate on development.

Installing the Plugin

1. Install the Twilio CLI

Via npm or yarn:

$ npm install -g twilio-cli
$ yarn global add twilio-cli

Via homebrew:

$ brew tap twilio/brew && brew install twilio

2. Install the Plugin

twilio plugins:install @dabblelab/plugin-autopilot

Commands and Usage

Assistants

twilio autopilot:create
twilio autopilot:delete
twilio autopilot:export
twilio autopilot:list
twilio autopilot:update

Fields and Field Types

twilio autopilot:fields:create
twilio autopilot:fields:delete
twilio autopilot:fields:list
twilio autopilot:fieldtypes:create
twilio autopilot:fieldtypes:list
twilio autopilot:fieldtypes:update
twilio autopilot:fieldvalues:upload

Tasks and Samples

twilio autopilot:tasks:create
twilio autopilot:tasks:delete
twilio autopilot:tasks:list
twilio autopilot:tasks:update
twilio autopilot:samples:upload

Import bots from other platforms

twilio autopilot:import [TYPE]

Webhooks

twilio autopilot:webhooks:create
twilio autopilot:webhooks:delete
twilio autopilot:webhooks:list
twilio autopilot:webhooks:update

Other commands

twilio autopilot:modelbuilds:create
twilio autopilot:simulate
twilio autopilot:queries:export
twilio help [COMMAND]

For more information on usage, please visit the Github page.

Schema files

A schema file is a JSON document that defines the behavior of an Autopilot assistant. It contains the Tasks, Samples, Actions, Fields, Field Types, Field Values as well as it's Defaults and Stylesheet. Schema files can be created using the twilio autopilot:create command or by exporting existing Assistants created using the Twilio console or the API with the twilio autopilot:export command. You can directly edit a schema file and use the twilio autopilot:update command to update the Assistant.

You can find a few example schema files in Autopilot Templates repo on GitHub.

Importing Dialogflow Agents

The twilio autopilot:import command lets you create Autopilot Assistants using existing DialogFlow Agents. After you export an Agent into a ZIP file by following the instructions in the Dialogflow documentation, pass the ZIP file to the twilio autopilot:import command to create an Autopilot Assistant.

  • Intents, Training Phrases and Responses in Dialogflow are converted to Tasks, Samples and Say Actions in Autopilot.
  • Developer Entities in Dialogflow are converted to custom Field Types in Autopilot.
  • Certain System Entities in Dialogflow are converted into Built-in Field Types in Autopilot as defined in the CLI documentation.
  • Dialogflow Contexts are not currently imported to Autopilot.
Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.