How to Build SOAP Notes AI Agent

May 5, 2025

Antoni Rosinol

Co-Founder of Stack AI

Developed in 1960, SOAP notes help clinicians structure healthcare data to make it more comprehendible and actionable. The SOAP schema is now used across the healthcare industry to document patient medical history.

However, producing SOAP notes can be a tedious task for clinicians who would rather focus on patient care. But with the emergence of AI agents, clinicians can now automate SOAP notes generation.

In the following blog, we’ll show you how to build an AI agent that automatically generates SOAP notes. We’ll also explain the benefits of the AI agent for medical teams.

What are SOAP Notes?

SOAP notes are a structured method of documentation used by healthcare professionals to record patient encounters and clinical observations. The acronym SOAP stands for Subjective, Objective, Assessment, and Plan. 

This format helps providers organize information in a consistent, concise manner, making it easier to communicate patient details across a medical team. The Subjective section includes the patient’s own account of their symptoms, concerns, and medical history. The Objective section documents measurable or observable data such as vital signs, physical exam findings, and test results.

The Assessment portion provides the clinician’s interpretation or diagnosis based on the subjective and objective information. This might include differential diagnoses or updates on an existing condition. Finally, the Plan outlines the next steps for treatment, follow-up, additional testing, or referrals. 

SOAP notes are widely used in medical, mental health, and allied health settings due to their clarity and adaptability. They support better clinical decision-making, continuity of care, and serve as a legal record of the patient's treatment journey.

SOAP Notes: What are the Challenges?

Generating SOAP notes, while essential for clinical documentation, comes with several challenges that can affect both the quality of care and the workflow efficiency of healthcare providers. One common issue is time constraints. 

Clinicians often have limited time between patient appointments, making it difficult to document thoroughly and thoughtfully. This can lead to rushed, incomplete, or overly generic notes that may not accurately reflect the patient’s condition or the provider’s clinical reasoning. In high-volume settings, maintaining consistent and detailed SOAP notes for every patient can become a significant burden.

Another challenge lies in the subjectivity and variability of documentation styles. Although the SOAP format is structured, how providers interpret and record each section can vary widely. Some may overpopulate the subjective or objective sections with excessive detail, while others may neglect important elements, leading to inconsistency in patient records. 

This variability can hinder communication among care teams, especially when multiple providers are involved in a patient’s treatment. Additionally, duplicating information or using copy-paste shortcuts can introduce errors or outdated content, further reducing the reliability of the notes.

Finally, integration with electronic health records (EHRs) presents its own set of obstacles. While EHRs are designed to streamline documentation, their user interfaces can be cumbersome, requiring multiple clicks or navigation through complex menus. 

This can detract from direct patient interaction and increase the likelihood of documentation fatigue. In some cases, EHR systems may not support the SOAP format intuitively, forcing clinicians to adapt their workflow or use free-text fields, which reduces the advantages of structured documentation. 

As a result, the challenge is not just writing SOAP notes, but doing so in a way that is efficient, accurate, and aligned with evolving digital tools.

AI Agents: Automating SOAP Notes

AI agents are increasingly transforming the way SOAP notes are generated by reducing the time and cognitive effort required for documentation. Through the use of natural language processing (NLP) and speech-to-text technology, AI tools can transcribe conversations between clinicians and patients in real time and intelligently organize the information into the appropriate SOAP format. 

This automation not only speeds up the documentation process but also helps ensure that important details are accurately captured, even during fast-paced or complex encounters. By minimizing manual note-taking, clinicians are able to devote more attention to patient interaction, enhancing both the quality of care and the patient experience.

Beyond transcription, more advanced AI systems are offering clinical decision support by suggesting differential diagnoses, recommending next steps in the treatment plan, or flagging inconsistencies in the documentation. 

These tools can also learn from previous notes and patient histories to generate more context-aware suggestions, improving the consistency and depth of SOAP notes across encounters. 

When integrated with electronic health records (EHRs), AI-powered solutions further streamline workflows by reducing repetitive tasks and minimizing the risk of documentation errors. As these technologies continue to evolve, they hold the potential to not only alleviate administrative burdens but also elevate the overall quality and utility of clinical documentation.

AI Agent Overview: SOAP Notes Generator

The SOAP Notes AI Agent allows you to automatically produce SOAP notes based on patient calls. Simply upload a call recording, and the AI agent will analyze the call and provide SOAP notes based on the recording.  

This greatly speeds up the process of SOAP note transcription. Now physicians, or their assistants, can leverage this AI agent to generate SOAP notes from phone calls. The notes are then emailed to the doctor. 

Industry

Healthcare

Persona

Physicians

Problem

Generating SOAP notes from phone calls is a time-consuming process.

Solution

The AI agent automatically writes SOAP notes based on a call recording. 

User Interface

Form

LLM

Anthropic - Claude 3.5 Sonnet (2x)

Data Sources

File Upload (Call Recording)

Actions

  1. User uploads call recording. 

  2. LLM 1 summarizes the call as SOAP notes.

  3. LLM 2 creates a transcript of the call

  4. SOAP notes and call transcript are emailed to physician

Time to Launch

Easy

Benefits

  • Automatically transcribe SOAP notes instead of manually recording them 

  • Maintain HIPAA compliance with Stack AI’s security guarantees

  • Develop an archive of SOAP notes for physicians and other healthcare professionals

  • Create record of call transcripts that are easily searchable

  • Save medical professionals time and allow them to focus on more valuable tasks

Agent Workflow

Walkthrough: How to Build SOAP Notes AI Agent

Let’s walk through how to build the SOAP notes AI agent. First, find the Audio node. It’s under the Inputs category on the sidebar. 

Now drag the Audio node onto the canvas. 

Change the name of the node to “Patient Call”. Under Audio source, change the setting to Upload File. 

Next, find the Anthropic LLM. It’s under the LLMs category on the sidebar. 

Drag the Anthropic node on the canvas. Keep the default model (Claude 3.5 Sonnet). Rename the LLM to “SOAP Notes Generator”.

Connect the LLM to the Audio node.

Enter the text below into the Instructions box: 

You are a medical assistant that generates SOAP notes.
<instructions>
# How to write SOAP notes
Learning how to write a SOAP note is generally straight-forward because it always follows a specific and precise structure, however it does take some practice.
SOAP notes include four headings that correspond with each letter of the acronym:
1. Subjective.
2. Objective.
3. Assessment.
4. Plan.
The notes and records you enter under each heading will depend on your clinical speciality, who your client is, and what you’re working on during your sessions together.
## Subjective
This section is for subjective reporting of how your client says they are feeling during the session and what they report about their current symptoms. It can also contain information gathered from family members and reviews of past medical records.
Many mental health practitioners focus on what’s known as a “Chief Complaint”(CC) or the presenting problem in this section.
Even if the client reports multiple CC’s, it’s important to try to identify the most compelling problem so that you can ultimately provide an effective diagnosis.
Some general areas of inquiry as you try to identify the primary CC may include: history of present illness, medical history, review of systems, and current medications.
Here are some questions to ask to help uncover your client's Chief Complaint:
Describe your symptoms in detail. When did they start and how long have they been going on?
What is the severity of your symptoms and what makes them better or worse?
What is your medical and mental health history?
What other health-related issues are you experiencing?
What medications are you taking?
Make sure any opinions or observations you include in the section are attributed to who said them whether it’s yourself or your client. Because this is a subjective section, you don’t want to pass off any of this information as fact.
## Objective
This part of your SOAP note should be made up of physical findings gathered from the session with your client.
Some examples include:
Vital signs
Relevant medical records or information from from other specialists
The client’s appearance, behavior, and mood in session
Note: This section should consist of factual information that you observe and not include anything the patient has told you.
## Assessment
This section combines all the information gathered from the subjective and objective sections. It’s where you describe what you think is going on with the patient.
You can include your impressions and your interpretation of all of the above information, and also draw from any clinical professional knowledge or DSM criteria/therapeutic models to arrive at a diagnosis (or list of possible diagnoses).
## Plan
The last section of your SOAP note should outline your plan for next steps to treat the patient.
It can include short and long term goals for your patient and be as specific as what you plan to work on in the next session or as general as your expectations for the duration of treatment.
</instructions>
Therapy SOAP note examples
<Example>
Subjective
Client reports feeling more anxious this week. She said she felt more jittery and on-edge, and reports having more anxious thoughts that were harder to control.
Objective
During the session the client was fidgety, wringing her hands and speaking quickly. She appeared to have difficulty concentrating and asked me to repeat questions multiple times before responding. Client described a fear of losing her job and her housing, though admitted she didn’t have any evidence those events were imminent.
Assessment
Based on the client’s reports and in-session observations, the client’s anxiety has increased but continues to meet criteria for generalized anxiety disorder (GAD).
Plan
Recommended that client see a primary care physician to rule out any thyroid or other medical condition. Client will continue coming to therapy once a week for the foreseeable future to treat anxiety through cognitive behavior therapy (CBT). Also recommended client try some meditation and other mindfulness techniques at home in between sessions.
</Example>

Then enter the following into the Prompt box:

Meeting recording between doctor and patient:
<recording>
Patient Call
</recording>
Write me a SOAP report based on the call

Now add another Anthropic LLM to the canvas. Rename the LLM to “Transcript Generator”. 

Connect this LLM to the Audio node. Enter the following text in the Instructions box:

Create a transcript of this call recording between a patient and a doctor. Format it as if it were a play, with one person talking at each time

Enter this text in the Prompt box:

Meeting recording between doctor and patient:
<recording>
Patient Call
</recording>
Create a transcript based on this call

At this point, both LLMs should be connected to the Audio node (Patient Call). 

Now select an Output node. It’s under the Output category on the sidebar.

Drag the Output node onto the canvas. Connect it to the LLM called “SOAP Notes Generator”. 

Now select the Send Email node. It’s under Gmail in the Apps category. 

Connect SOAP Notes Generator (LLM) and Transcript Generator (LLM) to the Send Email node. 

Now click on the Send Email node to configure it. Select “New Connection” and set up your Gmail.

Then enter the email recipients and subject for the emails.

 Choose the content for the email.

In this case, the content for the email is the output of the two LLMs (SOAP Notes and Transcript). 

Save and Publish the workflow. Then go to the Export tab.

Give your AI agent a name and a description. 

Click on the link to launch the web app. 

Now upload a call recording. The AI agent will automatically generate the SOAP notes.

Then you will receive an email containing the SOAP notes and a full transcript of the call. 

 

This keeps physicians updated with the latest SOAP notes on their patients.

Automate SOAP Notes with Stack AI

Creating SOAP notes is a time-consuming and cumbersome process that strains busy healthcare workers. But with Stack AI, healthcare teams can create AI agents that automatically generate SOAP notes. 

Now physicians can get SOAP notes delivered directly to their emails, along with full call transcripts for further context. 

Sign up for a free account with Stack AI to build an AI agent that automatically writes SOAP notes for you.

Make your organization smarter with AI.

Deploy custom AI Assistants, Chatbots, and Workflow Automations to make your company 10x more efficient.