How a voice agent that books, moves and cancels appointments actually talks to a hospital. Each tool the agent can call is its own small workflow: a webhook in, validation, one call to the hospital system, and a response shaped so the agent can say it out loud.
How it works
A voice agent is only as useful as the systems it can reach. In a hospital that means the appointment system, the patient record and the insurance check, none of which were built to be called mid-sentence by a machine.
The pattern is one small workflow per tool. A tool call arrives on a webhook. The input is validated and reshaped: phone numbers normalised, dates resolved to the hospital's format, a medical record number checked for shape before anything is looked up. Then one call to the hospital system, and a response the agent can speak.
Identity comes before action. A caller is verified by record number and a one-time code before anything that books, moves or cancels. Read-only lookups, such as which specialties exist or which slots are free, do not need it, because they change nothing.
During a proof of concept the hospital system is a mock, built in the same tool. Swapping the mock for the live API is a change to one HTTP node per tool, which is what turns a PoC that impresses into a deployment that works.
Key features
- One workflow per tool, so each is testable on its own and swappable from mock to live
- Verification tools (record number, send code, verify code) gate the write tools
- Reschedule is implemented as cancel-then-rebook, so a failed rebook never leaves the patient with nothing
- Responses are shaped for speech: short, no identifiers read digit by digit, dates in words
- Mock backends stand in for the hospital system until integration is approved
Step by step
- The agent needs somethingMid-conversation, the voice agent decides it needs a fact or an action.
- Tool call arrivesEach tool has its own webhook.
- Validate and shapeInputs are normalised and checked before any system is touched.
- Verify the callerCheck the record number exists, send a one-time code, verify it. Only then can anything be written.
- Find careSpecialties, physicians, available slots.
- ActBook, reschedule (cancel then rebook), cancel, check coverage.
- Respond for speechThe result comes back short and sayable.