***
id: 9c5b00ac-d5aa-4f54-a032-e2a361f5267b
title: VirtualAgent
sidebar-title: VirtualAgent
slug: /cxml/reference/voice/virtual-agent
availability: deprecated
position: 9999
max-toc-depth: 3
----------------
Dialogflow application creation and management through the SignalWire Compatibility API is deprecated.
Only existing Dialog applications will continue to function; new Dialog applications can no longer be created.
[``](/docs/compatibility-api/cxml/reference/voice/connect) verb's `` noun permits connecting the
call to a Dialogflow agent.
For example, one can connect to Dialogflow with:
```xml
```
```javascript title="Node.js"
const { RestClient } = require("@signalwire/compatibility-api");
const response = new RestClient.LaML.VoiceResponse();
const connect = response.connect({
action: "https://example.com/next-xml-instructions",
});
connect.virtualAgent({
connectorName: "my-agent",
});
console.log(response.toString());
```
```csharp
using System;
using Twilio.TwiML;
using Twilio.TwiML.Voice;
class Example
{
static void Main()
{
var response = new VoiceResponse();
var connect = new Connect(action: new Uri("https://example.com/next-xml-instructions"));
connect.VirtualAgent(connectorName: "my-agent");
response.Append(connect);
Console.WriteLine(response.ToString());
}
}
```
```python
from signalwire.voice_response import Connect, VoiceResponse, VirtualAgent
response = VoiceResponse()
connect = Connect(action='https://example.com/next-xml-instructions')
connect.virtual_agent(
connector_name='my-agent'
)
response.append(connect)
print(response)
```
```ruby
require 'signalwire/sdk'
response = Signalwire::Sdk::VoiceResponse.new do |response|
response.connect(action: 'https://example.com/next-xml-instructions') do |connect|
connect.virtual_agent(connector_name: 'my-agent')
end
end
puts response.to_s
```
## Noun attributes
The Google Project ID of the agent to use. Find a list of IDs in the [Dialogflow](https://my.signalwire.com/?page=dialogflow_agents) page in the UI.
After a Dialogflow conversation is completed, SignalWire can make a request to the `` verb's `action` attribute. In addition to the [Standard Request Parameters](/docs/compatibility-api/cxml/reference/voice#request-parameters), the following are parameters passed back to your application when SignalWire makes the request.
An error message, in case `VirtualAgentStatus` is `"failed"`.
An [error code](/docs/compatibility-api/rest/error-codes), in case `VirtualAgentStatus` is `"failed"`.
The provider of the VirtualAgent (e.g., `Dialogflow`)
A JSON object (serialized as a string) containing data about the Dialogflow interaction.
E.g. `failed` or `transfer`