AI Development
Build an AI Calling Agent with Laravel: Voice Automation from Scratch
Build an AI phone calling agent with Laravel 12 and Twilio: webhooks, OpenAI conversation logic, speech-to-text, text-to-speech, call sessions, ngrok...
Published 2026-05-22 by Aditya Mandal.
Build an AI Calling Agent with Laravel: Voice Automation from Scratch Phone calls are still one of the highest-leverage channels in business — appointment reminders cut no-shows, customer surveys unlock retention data, and lead qualification calls move pipeline faster than any email sequence. But staffing a call center is expensive, and predictive dialers alone can't hold a real conversation. That's where AI calling agents come in: a voice bot that picks up the phone, listens to what the caller says, reasons about it with an LLM, and replies in natural spoken language — all driven by a few HTTP webhooks from a telephony provider. An AI calling agent is really three systems stitched together over the public phone network. A telephony provider (Twilio or Vonage) handles the actual phone call and streams audio in both directions. A speech-to-text service transcribes what the caller says, and a text-to-speech service turns the agent's replies back into audio. In the middle, a large language model — OpenAI's GPT, or a voice-native stack like Deepgram plus ElevenLabs — decides what the agent should say next, tracks the state of the conversation, and calls functions to book appointments, look up records, or escalate to a human. Laravel is the glue: it receives webhooks, manages call sessions, orchestrates the LLM, and persists everything to the database. In this guide you'll build a production-quality AI calling agent with Laravel 12. You'll set up Twilio webhooks for inbound and outbound calls, connect OpenAI for conversation logic with function calling, wire up text-to-speech and speech-to-text, persist call sessions and transcript history, and test the whole loop locally with ngrok. By the end you'll have a controller flow you can extend into appointment reminders, surveys,
https://adityamandal.dev/blog/build-an-ai-calling-agent-with-laravel/