- product:freeswitch - favorite - product:ai - product:voice import domainImg from ./create-domain.webp; import editDomainImg from ./old-edit-domain.webp; # Adding AI Capabilities to FreeSWITCH Did you know you can add an AI agent to your FreeSWITCH instance to handle your calls? In this guide, we’ll walk through an example code snippet for bridging a FreeSWITCH dialplan to a [SignalWire AI Agent](https://signalwire.com/products/ai-agent). This will allow an AI agent to take over the call as a virtual assistant or an IVR replacement, which is especially useful if you’re receiving many calls at once. ## **What is the SignalWire AI Agent?** SignalWire’s AI Agent is a low-code voice agent you can build using [plain-text instructions](https://signalwire.com/blogs/product/tips-for-building-ai-agent). Personality, skills, and areas of expertise can all be customized in a [simple drag-and-drop interface](https://signalwire.com/blogs/product/build-your-own-voice-agent). You can also code your own if you want it to [perform more complex functions](https://signalwire.com/blogs/developers/using-signalwire-ai-agent-to-create-a-surveybot). You can use an AI agent as a [virtual receptionist](https://signalwire.com/blogs/product/ai-agent-examples) for your business, or as your own personal AI assistant. With the power of AI, the agent does not require pre-recorded messages or even text-to-speech prompts - it’s smart enough to engage in conversation with callers based on plain language instructions. ## **SIP Domain Application** Once you have created your AI agent, we can now assign the agent to a SIP domain application in your SignalWire dashboard. This will allow us to bridge the FreeSWITCH dialplan to the AI agent, so that the AI agent can take over the call. ### Creating a SIP Domain Application In your SignalWire dashboard, navigate to the SIP tab and click on Domain Apps. To create a new domain application, click on the Create a Domain App button if you currently have not created a Domain Application or click the + New button. ### Configuring the SIP Domain Application With Your AI Agent Once you have created your domain application, you can now configure it to handle calls with your AI agent. In the Domain Apps page, click on the Edit button or the name for the domain application you want to configure. In the Edit Domain App page, you can configure the domain application to handle incoming calls with your AI agent resource. Click on the Handle Using select box and choose an AI Agent. Then under the When a Call Comes In section, select the AI agent you want to use for the domain application. :::tip You can also use SWML! For more complex AI use-cases, you might want to consider using [SignalWire Markup Language (SWML)](/swml). You can use a SWML script resource to define the AI agents behavior. ::: ## **FreeSWITCH Dialplan Configuration** Now that we have configured our AI agent in the SignalWire dashboard, we can now bridge the FreeSWITCH dialplan to the AI agent. Well break down the components of the following code snippet: xml