Contact Sales

All fields are required

Building an AI Agent from SWML + Node.js | SignalWire
SignalWire in Seconds

Building an AI Agent from SWML + Node.js

SignalWire in Seconds Ep. 19

Creating Programmable AI Voice Agents with Node.js and SignalWire

If you’ve built AI agents using static scripts inside your SignalWire dashboard, you already know how powerful the platform can be. But what happens when you want to push further and use your own programming language to control an agent’s behavior? That’s exactly what Nicholas explores in this episode of SignalWire in Seconds.

Meet Lou, a digital box office agent for a fictional minor league baseball team. Lou’s job? Answer calls, provide ticket info, and route fans to a live sales rep, all in real time.

Using Node.js and SignalWire’s SWML (SignalWire Markup Language), Nicholas shows how to:

  • Set up a lightweight Express server to receive POST requests from SignalWire

  • Handle calls dynamically with custom endpoints (like /start and /transfer)

  • Use SWAG (SignalWire AI Gateway) to trigger post-call actions

  • Send SMS and transfer calls programmatically using JSON-formatted SWML

This setup provides full flexibility to build and extend your AI agent logic using code—not just visual tools. Whether you’re adding conditional routing, integrating a CRM, or building custom follow-ups, the combination of SWML and a local web server opens the door to a new level of customization.

Bonus: The demo also covers how to tunnel local endpoints for testing using ngrok, and how to return structured responses that interact seamlessly with the SignalWire platform.