- Autopilot CLI: Create, edit, export, import and delete Assistants directly from your development environment. Test Assistant behavior directly in the command line and bulk upload new Field Values. Import Dialogflow agents into Autopilot.
- Task Editor: Create and program tasks in the console with built-in templates for Autopilot Actions.
- <Connect><Autopilot>: Directly route live calls to an Assistant using the <Connect><Autopilot> TwiML verb.
- Field validation for Collect Actions: Validate fields collected by your Assistant during the conversation using webhooks.
We’ve been focusing a lot on the Autopilot developer experience since we launched at SIGNAL in October 2018. Since creating great conversational experiences requires continuous iteration and experimentation, we’ve been working on making it easier for developers to design and program Autopilot Assistants. That’s why we’re thrilled to announce four new features to help you build faster with Autopilot!
The Autopilot CLI allows you to create, update, delete, export and import Autopilot Assistants from the command line, making it possible to deeply integrate Autopilot into your development workflows. Assistants are available as JSON files containing all the attributes that define your Assistants behavior — Tasks, Samples, Field Types, Fields etc. You can directly edit JSON files to modify the behavior of the Assistant and use the CLI to push the new behavior to your application, and collaborate on developing Assistant behavior by sharing files. You can also test the behavior of your Assistant directly in the CLI, and bulk upload new Field Values. You can also import Dialogflow agents into Autopilot. All you need to do is upload the ZIP file generated by Dialogflow when you export an agent.
The Task Editor is a new interface in the console for programming tasks using JSON. It comes with built-in templates for each Autopilot Action to make programming a new task faster. You can also easily switch to training the task with new samples using the button in the top right corner. The Task Editor replaces the Task Builder.
Start using the Task Editor in the console today.
While the Handoff Action made it possible to transfer a live call from an Assistant to a human agent, there wasn’t an easy way to do the reverse. <Connect><Autopilot> makes that possible. It’s a new TwiML verb to directly route a live call to an Assistant. As shown in the code snippet above, all you need to do is serve TwiML that includes this verb and the unique SID of the Assistant for it to take over the call. This unlocks a number of use cases for Autopilot, like transferring a call from a human agent to run a post-call satisfaction survey.
Here's a demonstration of routing a live call to Autopilot using Node.js:
const VoiceResponse = require('twilio').twiml.VoiceResponse; const response = new VoiceResponse(); const connect = response.connect(); connect.autopilot('UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'); console.log(response.toString());
<?xml version="1.0" encoding="UTF-8"?> <Response> <Connect> <Autopilot>UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</Autopilot> </Connect> </Response>
Check out the docs to start using <Collect><Autopilot> today, and find code for other languages.
Field validation for Collect Actions
Data collection is one of the most common tasks an Assistant performs. Whether that’s providing a fully automated experience, such as booking an appointment or changing a flight, or automating data collection before handing off to a human agent, such as with selling homeowners insurance, the bulk of an Assistant’s behavior involves some form of data collection. Autopilot’s Collect Action simplifies building this behavior with a programming model very similar to how web forms are built. And just like web forms, conversational data collection flows need to make sure the information provided by the user is valid. When changing a flight for example, the Assistant must be able to verify the booking number provided by the passenger before proceeding.
Field validation for Collect Actions allows you to check the information collected by the Assistant against your business logic using a webhook. You can also use it to check if the user provided the right type of information, like a valid date. If the validation fails, you can program the Assistant to prompt the user to provide valid information.
Check out the docs to start using Field validation today.
We’re excited about continuing to improve the Autopilot developer experience, and can’t wait to see what you build with it!
Get started with Autopilot
- Sign up for a Twilio account
- Check out the Autopilot docs
- Looking for inspiration? Andrew Baker from our developer education team built this cool SMS-based adventure game using Autopilot.