-
Notifications
You must be signed in to change notification settings - Fork 7
Autopilot CLI Experience
This doc tracks issues and improvements related to the standalone Autopilot CLI and Autopilot Plugin. It also describes the process for migrating existing users of the Autopilot CLI to the Autopilot Plugin.
Autopilot Plugin Issues and improvements
- twilio autopilot:create
- twilio autopilot:list
- twilio autopilot:update
- twilio autopilot:delete
- twilio autopilot:export
- twilio autopilot:simulate
- twilio autopilot:import [TYPE]
New commands
- twilio autopilot:tasks:COMMAND
- twilio autopilot:fields:COMMAND
- twilio autopilot:fieldtypes:COMMAND
- twilio autopilot:queries:COMMAND
- twilio autopilot:webhooks:COMMAND
- twilio autopilot:modelbuilds:COMMAND
Autopilot Plugin vs Twilio CLI’s native Autopilot commands
- Once the Autopilot Plugin is ready, we will promote it over the standalone Autopilot CLI as the preferred way to use Autopilot in the command line interface.
- We will deprecate the standalone Autopilot CLI once all users have moved over to the plugin.
- The standalone Autopilot CLI will be on maintenance mode. We’ll ensure existing commands work as expected but won’t add new commands or enhance existing commands, aside from the improvements listed in this doc.
- We’ll add a message to the output of every command in the Autopilot CLI strongly recommending using the Autopilot Plugin.
- New commands and enhancements to existing commands will only be rolled out to the Autopilot Plugin.
- Autopilot CLI
Issues and improvements
-
ta init --account --token [--credentials ]
-
ta list [--credentials ]
-
ta create [--schema ] [--credentials ]
-
ta update --schema [--credentials ]
-
ta delete --assistant [--credentials ]
-
ta export --assistant [--credentials ]
-
ta import --dfbackup --dfagent [--credentials ]
-
OR
-
ta import dialogflow --dfbackup --dfagent [--credentials ]
-
ta import alexa --model [--redirectURL ] [--credentials ]
-
ta simulate --assistant --text [--credentials ]
-
ta field --assistant --field --csv [--credentials ]
twilio autopilot:create
OPTIONS -l=(debug|info|warn|error|none) [default: info] Level of logging messages.
-o=(columns|json|tsv) [default: columns] Format of command output.
-p, --profile=profile Shorthand identifier for your profile.
-s, --schema=schema (required) [default: templates] schema path twilio autopilot:list
USAGE $ twilio autopilot:list
OPTIONS -l=(debug|info|warn|error|none) [default: info] Level of logging messages.
-o=(columns|json|tsv) [default: columns] Format of command output.
-p, --profile=profile Shorthand identifier for your profile.
--properties=properties [default: sid, uniqueName, friendlyName] The Autopilot Assistant List.
twilio autopilot:update
USAGE $ twilio autopilot:update
OPTIONS -l=(debug|info|warn|error|none) [default: info] Level of logging messages.
-o=(columns|json|tsv) [default: columns] Format of command output.
-p, --profile=profile Shorthand identifier for your profile.
-s, --schema=schema (required) schema path
Improvements
Make either assistantSid or uniqueName an optional argument so that the developer doesn’t have to check the unique name in the schema to make sure they are updating the correct bot.
twilio autopilot:delete
USAGE $ twilio autopilot:delete
OPTIONS -l=(debug|info|warn|error|none) [default: info] Level of logging messages.
-o=(columns|json|tsv) [default: columns] Format of command output.
-p, --profile=profile Shorthand identifier for your profile.
-s, --assistantSid=assistantSid (required) assistant sid
Improvements
Add uniqueName as an optional argument.
twilio autopilot:export
USAGE $ twilio autopilot:export
OPTIONS -l=(debug|info|warn|error|none) [default: info] Level of logging messages.
-o=(columns|json|tsv) [default: columns] Format of command output.
-p, --profile=profile Shorthand identifier for your profile.
Improvements
Add assistantSid and uniqueName as optional arguments. If provided, skip displaying the list of assistants and directly export the assistant.
twilio autopilot:simulate
USAGE $ twilio autopilot:simulate
OPTIONS -l=(debug|info|warn|error|none) [default: info] Level of logging messages.
-o=(columns|json|tsv) [default: columns] Format of command output.
-p, --profile=profile Shorthand identifier for your profile.
-s, --assistantSid=assistantSid (required) assistant sid
-t, --text=text (required) User text input
Improvements
Start using V2 of the custom channel endpoint documented here.
twilio autopilot:import [TYPE]
USAGE $ twilio autopilot:import [TYPE]
ARGUMENTS TYPE (dialogflow|alexa) [default: dialogflow] Type of import DialogFlow/Alexa
OPTIONS -a, --dfagent=dfagent Dialogflow Agent Name
-b, --dfbackup=dfbackup Dialogflow Agent Backup Zip File Local Path
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
-m, --model=model Alexa Interaction Model File Path
-o=(columns|json|tsv) [default: columns] Format of command output.
-p, --profile=profile Shorthand identifier for your profile.
-r, --redirectURL=redirectURL [default: https://inquisitive-stretch-2083.twil.io/generic] Alexa Back-End Hanlder URL to send back the response
DESCRIPTION
- twilio autopilot:import dialogflow --dfbackup --dfagent
- twilio autopilot:import alexa --model [--redirectURL ]
New commands twilio autopilot:tasks:COMMAND
twilio autopilot:tasks:list
OPTIONS
-s, --assistantSid=assistantSid (required) assistant sid
OUTPUT: List all tasks in the assistant with 3 columns - SID, unique name and actions_url
twilio autopilot:tasks:fetch
-s, --assistantSid=assistantSid (required) assistant sid --taskSid=taskSid (required) task sid --uniqueName=uniqueName (required if no task sid) task unique name
OUTPUT: List the task with SID, unique name and actions_url
twilio autopilot:tasks:create
-s, --assistantSid=assistantSid (required) assistant in which to create --uniqueName=uniqueName (required) unique name for task --friendlyName=friendlyName (optional) friendly name
OUTPUT: Ask the user to pick from a list of function templates for the task. Create the task and point the actions_url to the function created using the template. We will need to define new function templates specific to Autopilot tasks.
twilio autopilot:tasks:update
-s, --assistantSid=assistantSid (required) assistant that owns the task --taskSid=taskSid (required) task sid --uniqueName=uniqueName (optional) task unique name to update --friendlyName=friendlyName (optional) task friendly name to update
twilio autopilot:tasks:delete
-s, --assistantSid=assistantSid (required) assistant that owns the task --taskSid=taskSid (required) task sid
twilio autopilot:samples:upload
-s, --assistantSid=assistantSid (required) assistant that owns the task --taskSid=taskSid (required) task sid --fileName=samples.csv (required) a CSV file of samples.
twilio autopilot:fields:COMMAND
twilio autopilot:fields:create
-s, --assistantSid=assistantSid (required) assistant that owns the task --taskSid=taskSid (required) task sid --fieldTypeSid=fieldTypeSid (required) field type SID --uniqueName=uniqueName (required) field unique name
twilio autopilot:fields:list
-s, --assistantSid=assistantSid (required) assistant that owns the task --taskSid=taskSid (required) task sid
OUTPUT: List all fields in the assistant with 3 columns - field SID, uniquename and field type
twilio autopilot:fields:fetch
-s, --assistantSid=assistantSid (required) assistant that owns the task --taskSid=taskSid (required) task sid --fieldTypeSid=fieldTypeSid (required) field type SID
OUTPUT: List the field requested with 3 columns - field SID, uniquename and field type
twilio autopilot:fields:delete
-s, --assistantSid=assistantSid (required) assistant that owns the task --taskSid=taskSid (required) task sid --fieldTypeSid=fieldTypeSid (required) field type SID
twilio autopilot:fieldtypes:COMMAND
twilio autopilot:fieldtypes:create
-s, --assistantSid=assistantSid (required) assistant in which to create --uniqueName=uniqueName (required) unique name for the field type --friendlyName=friendlyName (optional) friendly name for field type
twilio autopilot:fieldtypes:list
-s, --assistantSid=assistantSid (required) assistant sid
OUTPUT: List all field types in the assistant with 2 columns - field type SID and unique name
twilio autopilot:fieldtypes:fetch
-s, --assistantSid=assistantSid (required) assistant sid --fieldTypeSid=fieldTypeSid (required) field type sid
twilio autopilot:fieldtypes:update
-s, --assistantSid=assistantSid (required) assistant sid --fieldTypeSid=fieldTypeSid (required) field type sid --uniqueName=uniqueName (optional) field type unique name to update --friendlyName=friendlyName (optional) field type friendly name to update
twilio autopilot:fieldvalues:upload
-s, --assistantSid=assistantSid (required) assistant that owns the task --fieldTypeSid=fieldTypeSid (required) field type SID --fileName=values.csv (required) a CSV file of field values (one on each row with synonyms in columns)
twilio autopilot:queries:COMMAND
twilio autopilot:queries:export
-s, --assistantSid=assistantSid (required) assistant that owns the task -q --quantity=quantity (required) number of queries to retrieve
OUTPUT: write queries to a .csv file with the following columns: query, status, source channel, date_created, date_updated, task unique name, field name, field value, field type, language and assistant_sid.
These fields can be parsed from the properties on the Query resource.
twilio autopilot:webhooks:COMMAND
twilio autopilot:webhooks:create
-s, --assistantSid=assistantSid (required) assistant that owns the task -w, --webhookUniqueName=webhookUniqueName (required) unique name for webhook -e --events= event1 event2 event3 (required) list of space-separated webhook events -url --webhookURL=webhookURL (required) the URL to send events to -m --method=POST or GET (optional) which HTTP method to use
twilio autopilot:webhooks:list
-s, --assistantSid=assistantSid (required) assistant that owns the task
OUTPUT: List all webhooks configured for the assistant in the terminal in the following columns: SID, unique_name, webhook_url, events, date_created, date_updated, method
twilio autopilot:webhooks:update
-s, --assistantSid=assistantSid (required) assistant that owns the task --webhookSid=webhookSid (required) SID of the webhook to update -w, --webhookUniqueName=webhookUniqueName (optional) unique name for webhook to update -e --events= event1 event2 event3 (optional) list of space-separated webhook events to update -url --webhookURL=webhookURL (optional) the URL to send events to update -m --method=POST or GET (optional) which HTTP method to use to update
twilio autopilot:webhooks:delete
-s, --assistantSid=assistantSid (required) assistant that owns the task --webhookSid=webhookSid (required) SID of the webhook to update
twilio autopilot:modelbuilds:COMMAND
twilio autopilot:modelbuilds:create
-s, --assistantSid=assistantSid (required) assistant that owns the task -url --callbackURL=callbackURL (optional) URL to get notified of model build status
Autopilot Plugin vs Twilio CLI’s native Autopilot commands
Autopilot CLI command Twilio CLI command Notes on functionality twilio autopilot:create twilio api:autopilot:v1:assistants:create Since the underlying endpoint has no required parameters, you can create a ‘null’ assistant twilio autopilot:list twilio api:autopilot:v1:assistants:list Both work the same twilio autopilot:update twilio api:autopilot:v1:assistants:update Twilio CLI only updates attributes of the assistant resource. Autopilot CLI can entirely change assistant behavior with schema file. twilio autopilot:delete twilio api:autopilot:v1:assistants:remove Twilio CLI is not able to delete cause it doesn’t delete assistant child resources first twilio autopilot:export
Exports an assistant as JSON schema twilio autopilot:simulate
Simulate bot behavior in console twilio autopilot:field
Bulk upload field values twilio autopilot:import [TYPE]
Imports an alexa skill or dialogflow agent
-- Outstanding questions:
Which customer role is responsible for creating and maintaining samples for each task? Which customer role is responsible for query annotation?