Inspiration

Iain spoke about a project to intelligently encourage journaling for therapy powered by AI prompts. (in person)

What it does

The project prompts a patient of a therapist to journal, this prompt includes the context of previous journals as well as the therapy goal for that individual patient which was input by the therapist and saved to their patient record.

How we built it

Using local json files and OpenAI Assistant API we have two different assistants. One assistant has threads with all the specific therapy patients and asks the user to journal being mindful of their therapy goal with custom instructions to that agent saved in a config json file. The AI assistant uses context and custom instructions to generate the request for a journal entry.

There is a second assistant created which has different custom instructions that takes the recent journal entry, summarize it, and suggest an update for the patients therapy goal.

All code is python with json data files to store patient data and editable prompts.

Challenges we ran into

Making consistent json that can be easily edited and updated took longer than it should. The OpenAI API had lots of downtime. We originally intended to use custom GPTs but that was only released today.

Accomplishments that we're proud of

As a solo team member and a crypto refugee and product manager with very little experience shipping code that isn't a jupyter notebook showing of some data analysis, the fact that this program works at all is an accomplishment. This project very much works as originally intended as an MVP that runs in a terminal without any frontend, but the UX is similar to intended. The interaction with the OpenAI API for the new Assistants product was fantastic to use considering there's few examples and chatGPT has no idea how to use it since it's new.

What we learned

Json hard, OpenAI API easy.

What's next for Therapy AI Assistant

Using custom GPTs (already built one in the past two hours) to supercharge the capability and add a frontend.

Built With

Share this project:

Updates