Inspiration

Scheduling appointments at a doctor's office can be a difficult task. For those who work through office hours, have limited options for calling, or are just averse to phone calls, the barriers of setting an appointment can lead to the prolonging of necessary appointments. For anyone scheduling an appointment for their health the focus should be on health and not the stress of making an appointment. What if with just a few emails you can get an appointment?

What it does

Our app receives emails from prospective patients and helps them schedule an appointment by offering available times and booking the appointment. Fully automating the process allowing for a speedy and painless appointment booking.

How we built it

We built our app using AgentMail to serve as the email hub for our agent, Google's calendar api for scheduling, and Open ai's api for processing requests. Using these tools we listen for emails using web hooks and process the email once one has entered the inbox. During processing the ai will either schedule an appointment for the requested time and notify the requester of the booking or if the time is currently booked respond with available times. The email chain continues until the requester is able to successfully book a time.

Challenges we ran into

The number one challenge we faced was using unfamiliar technologies. Almost every portion of our app used some tech that was new to at least one of us. This led to frustration and issues in our implementation. Keeping code quality high while also writing code we have never used before was a real problem. The first example of this was the Gemini API. We were completely unable to use it agentically with Langchain and thus had to switch to OpenAI's API, which only one of us had used before. The switch ended up being worth it, and our final product has most of the functionality we envisioned.

Another big challenge that we faced was setting the right timezone for the bookings. Creating and maintaining a consistent timezone took us some time. The other problem we ran into was that the Agentmail agent was repeatedly calling the sendmail tool and sending multiple replies. We needed to create robust error handling for this particular case.

Privacy and Safety

In our system, if there are requests that require urgent attention, the agent transfers the request to a human. There are also guardrails for the agent not to give medical advice or a diagnosis. This human-in-the-loop and strong guardrails ensure that the agent does not give false advice or handle emergency situations incorrectly.

Accomplishments that we're proud of

While our project is not feature-rich, we are still very proud of the key feature that we did produce. We set out to accomplish a goal, solve a problem, and learn while trying to implement an idea that could actually have applications in the world. We accomplished that goal of creating the end-to-end product and are very proud of it.

What we learned

During our planning stage we did not correctly address all of the problems we would face, leading to an inefficient development process. If in our planning stage we had aptly assessed the true load of work, we could have more effectively spread out tasks increasing efficiency. In addition we now have a stronger understanding of how to design an application that uses api's and web hooks, which increases our confidence and potential to do more when building an application.

What's next for Care Inbox

The next step for Care Inbox is to evolve into an all in one office assitant for your medical needs. This includes giving medical data, handling insurance queries, keeping track of active patients, and alerting patients who are due to book an appointment. The agent can also be refined to work more effectively at scale, and since AgentMail is designed to scale, so there should be no issues with scalability.

Built With

Share this project:

Updates