
Saarthi AI: A Real-Time Voice Travel Agent with Amazon Bedrock, Strands Agents, and Amazon EC2
What if booking a bus was as simple as making a phone call? Saarthi Ai is a real time voice travel agent built with Amazon Bedrock, Strand Agents, and Amazon EC2. It turns a natural conversation into an end-to-end booking experience from bus and seat selection to payment and whatsapp ticket delivery. This article shares how we built Saarthi and solved real time challenges like streaming audio, barge-in, tool orchestration and concurrent TTS playback.
Ever wondered why people from older generations, including our grandparents, can comfortably send money through PhonePe but still struggle when asked to book a bus, train, or even a movie ticket online?
My mom, Araveeti Vijaya Lakshmi, faces the same problem. Seeing this firsthand inspired me to explore a simpler way of interacting with technology, which led me to build Saarthi AI for the WeMakeDevs Buildathon, with AWS as the brand partner.
What actually Saarthi does?
A customer simply calls Saarthi and speaks naturally. Saarthi understands the request, searches the available buses, helps with seat selection, collects the required passenger information, creates the booking, sends a payment link through WhatsApp, verifies the payment, and delivers the confirmed ticket.
Workflow of Saarthi
Phone Call → Bus Search → Seat Selection → Passenger Details → Booking → Payment → WhatsApp Ticket
Architecture of Saarthi
But, Making an AI that can talk is one thing. Making it actually perform a real transaction through a phone call is completely different engineering challenge.
That's why I followed This Architecture
Customer → Exotel → Saarthi Voice Gateway → Sarvam STT/TTS → Strands Agents → Amazon Bedrock → Snehith Travels REST API → Razorpay + WhatsApp
Amazon Bedrock -- The Intelligence
You wont believe me, I havent worked with Amazon Bedrock before and all but after working with bedrock, I really fell in love with the bedrock's nature and its power
Bedrock actually powers the model.
It understands the natural language requests (even after 10 mins of speaking in english and if suddenly turn out to telugu, It automatically detects it and changes it).
It decides which tool needs to be called Accurately (tested over 100+ times during our voice agent building)
Example: When a customer says, "I want to go from hyderabad to Vijayawada tommorow evening",** it extracts the relavant information and determine that it needs to search the travel api
Strands Agents
It turns the model into an agent it allows us to separate the agent's reasoning from the actual travel operations. The agent decides what needs to happen, While the backend API remains responsible for executing and validating the operation.
Customer → Amazon Bedrock → Strands Agent
↓ ┌─────────┴─────────┐ ↓ ↓Search & Seats Booking & Payment ↓ ↓Hold Seats → Create Booking → Create Payment ↓ Check Payment → Generate TicketThis is the complete workflow that we followed there
challenges that we have faced while buidling
1. Exotel web socket connection issue
Whenever we are rebuilding the docker containers in the EC2 instances the ip is changed and we configured the ngnix to directly the docker so that everytime a new build is happening we are experiencing issues, so as a solution we implemented a pipeline that automatically reconfigures the connection to the docker container if it restarts or rebuilds.
2.Latency & The Long Responses
The Sarvam's text to speech has been taking a lot of time to convert the long text produced by the Amazon bedrock's core which actually led to around 2000ms latency and then we have actually implemented strict rules to the agent to produce shorter responses by keep tracking of the user's session which makes it easy to convert the text to speech by SARVAM
3. Ran out of Credits(SARVAM)
While testing at first, since the bedrock agent's core produced the large outputs the free tokens for the sarvam TTS has expired, as a solution we took several free api's and added them as fall back api's and there will a service that runs every time even though someone is not in the call so that it checks for every second the credits, and immediately replace with the fallback one while the agent is not at all speaking, making sure that the convo doesnt actually affects.
4. Reasoning leak
It's Exposing the reasoning of that agent like, if a user asks a question it is exposing what the agent is thinking of itself so that the other user feels embaressed and also the SARVAM credits ran out, as a solution we have implemented the strict rules in the ai instructions and also removed the print statements in the code written by me which actually is the main reason for the exposure of the AI Reasoning.
5. Barge-In
A real person doesn.t wait silently for someone to finish speaking right so thats why we followed this flow that makes a 100% initial success rate for the first test of barge-in mechanism
FLOW OF BARGE-IN
Saarthi speaking → Customer starts speaking → Speech detected → Cancel TTS → Process new request
6. The bug that almost broke the voice experience
During testing, we encountered a particularly strange bug. Sometimes Saarthi appeared to speak multiple responses at once. The model wasn't generating incorrect responses—the problem was that multiple asynchronous TTS tasks were writing audio to the same phone stream.
so as a solution:
We introduced a per-call
AudioPlaybackCoordinator with exclusive playback locking and generation tracking. Only one TTS producer can write to the Exotel audio stream at a time, and stale audio from previous turns is discarded.What I Learned
Building Saarthi taught me that building an AI agent is much more than connecting an LLM to an application. Real-time voice introduces problems around latency, streaming, cancellation, concurrency, state management, and reliability that aren't obvious in a normal chatbot.
Most importantly, I learned that an AI agent becomes truly useful when it can move beyond conversation and actually complete a task.
What's Next
aarthi currently focuses on bus booking. The next step is to expand it into a broader travel agent that can work across multiple travel providers like Redbus, AbhiBus and eventually handle complete trip planning through a single conversation.
What started with a simple problem I saw at home became a real-time AI system that can take a customer from a phone call to a confirmed ticket.
Real Deployment:
Any how I have created my own travels website and for that website I have implemented the voice agent for that travels site check that site over here and also you don't have to actually register any accounts you can use the user or admin account there itself and login to that.
And if someone wants to test the voice agent dial in to the numbers shown there and please enter the pin because we have implemented that using the test mobile numbers and also the Don't forget to read the disclaimer there because no one can recieve the ticket or payment link through whatsapp other than me just because That is also my test number from facebook since, I have not started my business yet.
So yeah, If you want to just test how it works, wether it holds the seats really or not like those you can test freely
and if someone wants to reach out to me regarding this product:
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article