AI-Powered Hospital Appointment Management Platform
A cloud-native, multi-agent AI system that automates end-to-end hospital appointment management — enabling patients to book doctor appointments and lab tests through natural conversation, backed by a hierarchical LangGraph agent architecture deployed on AWS ECS Fargate.

1The Problem
A mid-sized hospital network managing multiple specialties relied on heavily manual appointment processes — phone calls, paper-based logs, and inconsistent scheduling practices across departments. Patients faced long wait times and scheduling conflicts, while repeated cancellations and last-minute reschedules were nearly impossible to track systematically. The hospital had no centralised system for automated reminders, conflict resolution, or reporting. This drove up administrative workload for reception and staff, caused revenue loss from missed appointments, led to inefficient allocation of doctors and lab resources, and left mobile-first patients with a frustrating, friction-heavy experience that traditional chatbots could not solve.
2The Approach
We designed and implemented a hierarchical multi-agent AI system orchestrated using LangGraph, deployed on a fully cloud-native AWS stack. A main Supervisor Agent receives all patient requests and routes them to two specialised supervisor agents — one for doctor management and one for lab test management — each of which delegates to individual worker agents responsible for availability lookups and booking actions. The FastAPI backend runs in Docker containers on AWS ECS Fargate, accessed via API Gateway and a Load Balancer. Conversation memory is persisted in Amazon S3, allowing agents to maintain context across sessions. The Next.js frontend is hosted on AWS Amplify with CI/CD integration, and all data is stored in Amazon RDS PostgreSQL. An AI scheduling optimiser handles multi-resource allocation (doctor + lab + room) per appointment, and automated reminders are dispatched via AWS SNS.
Technical Architecture
Supervisor Agent (Main): Primary LangGraph orchestrator that parses patient intent and routes requests to the Doctor Management or Lab Test Management supervisor agents
Doctor Management Supervisor Agent: Routes doctor-related queries to the Doctor Availability Info Agent (real-time schedule lookups) and the Doctor Booking Agent (appointments, cancellations, rescheduling)
Lab Test Management Supervisor Agent: Routes lab-related queries to the Lab Info Agent (test prerequisites and information) and the Lab Booking Agent (scheduling and confirmations)
FastAPI Backend API: Python REST API handling business logic, agent orchestration, conflict detection, and rescheduling suggestions — containerised with Docker and deployed on Amazon ECS Fargate
AWS Infrastructure: API Gateway → Load Balancer → ECS Fargate (ECR images); RDS PostgreSQL for persistent records; S3 for agent conversation memory; CloudWatch for logging and observability
Next.js Frontend: SSR-enabled React web app with a real-time chat interface, booking confirmation UI, and payment gateway tile — hosted on AWS Amplify with GitHub CI/CD integration
Notifications & Automation: AWS SNS for email/SMS reminders; CloudWatch + QuickSight for admin dashboards; audit logs for all appointment changes
Results
Real-time appointment availability reduced patient wait times by 30–40%
Automated reminders cut no-show rates by 25%
AI-powered chatbot handled ~60% of booking queries without human intervention
Improved doctor and lab utilisation through optimised multi-resource schedule allocation
Significant reduction in administrative workload, freeing staff to focus on patient care
Full audit trail maintained via CloudWatch for all appointment changes and agent decisions
Key Insights
“A hierarchical supervisor-agent pattern scales naturally to complex domains: routing to specialised sub-supervisors keeps each agent's responsibility small and testable, avoiding the monolithic agent failure mode.”
“Storing conversation memory in S3 rather than in-process state is the key to true cross-session continuity — stateless LLM execution with external memory rehydration is more robust than session-pinned containers.”
“Agentic AI meaningfully reduces administrative overhead only when paired with deterministic backend tools; the AI handles intent and routing while validated business logic handles the actual scheduling and conflict resolution.”
“Correct CORS configuration and environment variable management across Amplify, ECS, and API Gateway are the most common production failure points in a full-stack AWS AI deployment — treat them as first-class architecture concerns.”
Tech Stack
Interested in a similar project?
I'd love to discuss how we can apply this kind of approach to your specific business challenge.
Let's Talk