Rate this page:

Connect Virtual Agent

Virtual Agent is in Public Beta. Learn more about Twilio's beta product support here.

Connect Virtual Agent widget screenshot


"Connect Virtual Agent" allows you to connect a Twilio Voice call to a Dialogflow Essentials (ES) agent.

You can leverage a native integration between Twilio Voice and Google’s Dialogflow ES to provide callers with conversational experiences through their Interactive Voice Response (IVR). Twilio provides the telephony aspect of the conversational IVR experience, and Dialogflow ES manages agent configuration, including intents and responses, via the Dialogflow ES console or Dialogflow APIs.

Connect your Dialogflow ES agent to Twilio from the Dialogflow ES console. Choose the "Twilio" One-Click Telephony integration in the Integrations section of the Dialogflow ES console, and follow the prompts to complete the setup. Once the integration is complete, you can use Twilio to manage the flow of your calls and configured connections to Dialogflow ES agents.

When you first connect a Dialogflow ES agent to Twilio via the One-Click Integration, Twilio will create a new Studio Flow containing a Connect Virtual Agent widget. When a call comes in to the Twilio number you've configured for the integration, Twilio will connect the call directly to this Studio Flow and route the caller to the Dialogflow agent.

You can modify this Flow by adding widgets before and after the Connect Virtual Agent widget. Additionally, once you have connected a Dialogflow ES agent to Twilio using the One-Click Telephony integration, you can then add a Connect Virtual Agent widget for that Dialogflow ES agent to other Studio Flows.

You can also modify what happens during a call with a Dialogflow ES agent using TwiML. Learn more here.

Required Configuration

Name Description Default
Connector Name Configured in Dialogflow ES connector instance in the Unique Name Field. Appears as "Unique Name" in the connector. None

Editing the Connector Name within the Connect Virtual Agent Studio widget alone will break the integration between Dialogflow ES and your Twilio project. If you need to update the Connector Name, you must edit it in the Dialogflow ES Stream Connector and the Studio widget.

Optional Configuration

Name Description Default

Language to be used by Dialogflow ES agent. Learn more about Multilingual Dialogflow ES agents here.

Defaults to the language provided in the Dialogflow ES connector configuration.
Sentiment Analysis

Whether sentiment analysis should be enabled or not.

Defaults to the sentiment analysis setting in the Dialogflow ES connector configuration.
Status Callback URL

URL to post status callbacks from Twilio.



These are the events that trigger transitions from this widget:

Name Key Description
Return completed Fired when the Dialogflow ES agent ends the connection because an intent matched the "end of the conversation" intent.
Hangup hangup Fired when the caller hangs up during the Dialogflow ES agent interaction.

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 by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.


        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. Please select the reason(s) for your feedback or provide additional information about how we can improve:

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more