Systems

Prototype

After-Hours Emergency Service AI

Designed to answer a service company's after-hours line, screen for hazards, collect what a technician needs, connect real emergencies to the on-call tech, and send a work order when the call ends. The triage and work-order logic is built and tested on simulated calls.

The problem it solves

After-hours calls go to an answering service that takes a name and number. The on-call technician calls back blind, and a gas smell can get the same treatment as a parts order.

Replay a simulated call

How it fits together

  1. CallerCalls the after-hours line
  2. Vapi, not yet connectedVoice platformSpeech in and out, phone line, warm transfer, transcript
  3. Ours, in version controlConversation designInstructions, safety branch, 30-field call schema
  4. OursTriage + backstopRules assign priority; transcript hazard check can only escalate
  5. OursWork order + alertsPlain-text work order, push and email, call log
  6. On-call technicianWarm transfer for emergencies; callback for the rest
Our codeVendor service (swappable)People

How a call is designed to flow

The backend steps (6) are built and tested. The conversation steps (1–5) are designed and configured but haven’t run on a live voice platform yet.

  1. The assistant answers, says it is automated, and says the call is recorded.
  2. It asks what’s going on and lets the caller explain in their own words.
  3. It screens for hazards early: gas smell, fire or smoke, fuel or water release, pressure concerns, injuries.
  4. If there’s a hazard, it stops asking technical questions, tells the caller to get clear and call 911 (and the gas utility for gas), takes a callback number and address, and transfers to the on-call technician.
  5. Otherwise it collects the site, equipment, fault, backup status, and impact, reads a short summary back for the caller to correct, and either transfers or tells the caller a technician will call back.
  6. After hang-up, the backend assigns a priority by rule, writes the work order, alerts the on-call phone, and logs the call.

Safety design

  • Priority is decided by rules, not by the language model. The model fills in a structured form. Deterministic code in the backend decides P1 safety, P1 emergency, P2 urgent, P3 routine, or P4 non-service. The rules are tested and auditable.
  • A second check reads the caller’s own words. If the caller mentions a hazard the model didn’t record, the backend escalates the call and flags it for review. This check can only raise priority, never lower it.
  • Hazards have three states: reported, denied, or not asked. The work order never says “no gas smell” when nobody asked.
  • A failed transfer is never silent. When the call record shows a transfer that didn’t connect, the backend sends a “call now” alert to the on-call tech and a backup. This is tested on simulated calls and will be verified on live calls.
  • No repair advice. The assistant won’t diagnose, give reset instructions, say equipment is safe, or promise arrival times or prices.
  • Disclosure at the start of every call that the assistant is automated and the call is recorded. This is designed with California’s all-party recording consent law in mind and will get a compliance review before any live use.

Architecture

The voice platform handles the real-time parts: speech recognition, the model, speech synthesis, the phone line, and the warm transfer. Everything that defines the business logic is in our own code: the conversation instructions, the call schema, the triage rules, the work order, notifications, and records. It’s designed so that moving to a different voice platform means rewriting one adapter file.

What exists today

  • Conversation design with the safety branch, a 30-field call schema, and the voice-platform configuration kept in version control.
  • A backend with no third-party dependencies, covering adapter, triage, hazard backstop, work order, notifications, and storage.
  • Seven simulated calls and 13 automated tests. Every scenario lands on its expected priority.

What comes next

Live test calls through the voice platform, then end-to-end alerts to a phone, then a test phone number with a real warm transfer. Recorded test calls will be added here as they happen.