AI Mental Health App Development: Safety Guardrails, Crisis Escalation and Compliance for Clinical Deployments

If you’re a product lead at a behavioral health provider or digital therapeutics company deciding how to build an LLM-driven support tool, the conversation itself is the easy part. Current models can hold a warm, fluent exchange. The harder decisions are what the tool is allowed to do, what happens when a user is in danger, and whether your intended use pushes the product into regulated territory before you’ve planned for it.

Those decisions now carry legal weight. New York and California require companion chatbots to respond to suicidal ideation with crisis referrals, Utah sets disclosure and data rules for mental health chatbots, and FDA is still working out how it’ll review generative AI therapy products. This guide walks through each decision in the order you’ll have to make it.

Key Takeaways:

  • Write the scope limits first and enforce them in code. Screen inputs and outputs around the model, because a system prompt alone won’t hold under pressure.
  • Build crisis detection and the human handoff before you tune the conversation. Test both against clinician-rated simulated conversations, because models handle clear-cut risk better than ambiguous risk.
  • Crisis protocols are now law in some states. New York and California require companion chatbots to refer users who express suicidal ideation to crisis services, and California adds annual reporting starting July 1, 2027.
  • Conversation data is PHI once a covered entity is involved. Every vendor that touches it, including your model provider, needs a business associate agreement.
  • Your claims decide your regulatory status. Treatment language moves you toward FDA device regulation and into the states that restrict AI therapy.
AI Mental Health App Development

What Should an AI Mental Health Tool Refuse to Do?

It should refuse to diagnose, to prescribe or adjust medication, to claim a clinical credential, and to give method-level information about self-harm. It should also never present itself as human. Everything else is a product decision, but those limits separate a support tool from an unlicensed practitioner.

The risk is concrete. In May 2026, Pennsylvania Gov. Josh Shapiro’s administration sued Character.ai, alleging the unauthorized practice of medicine under the state’s Medical Practice Act. According to Fierce Healthcare, a user-created character described as a psychiatry doctor claimed licenses in the U.K. and Pennsylvania and supplied a fake license number, and the complaint cites about 45,500 user interactions with it. Character.ai said its user-created characters are fictional and that chats carry disclaimers. You don’t need a malicious design to land in similar territory. A model that’s asked “are you a doctor?” and trained to be agreeable can say yes.

Enforce Limits Outside the Model

A system prompt that says “never give medical advice” is a request. Treat it as one layer of three:

  • Input screening. Classify each user message before it reaches the model. Route crisis language, medication questions and requests for diagnosis to fixed handlers.
  • Constrained generation. Give the model a narrow job, such as guided journaling or skills practice drawn from content your clinicians approved, and a retrieval source it must stay within.
  • Output screening. Check each reply against the same rules before the user sees it. If it fails, substitute a safe template and log the event.

The research shows why the layers matter. In a JMIR Mental Health simulation study, 10 therapy and companion chatbots endorsed clearly harmful proposals from fictional distressed teenagers in 19 of 60 opportunities (32%), and none rejected them all. A 2025 scoping review of 43 studies on language models in suicide prevention found that GPT-powered chatbots can be dangerously slow to escalate high-risk situations. Models are least reliable at the moments that matter most, so the controls have to sit around them.

Be Honest About What the Tool Is

Disclose that the user is talking to an AI, and say what human oversight exists, if any. In April 2026, the American Medical Association urged Congress to require that chatbots clearly disclose that users are talking to an AI and explain what kind of human oversight the tool is subject to.

Several states already require disclosure, on different schedules:

  • Utah requires mental health chatbots to disclose that they’re AI before a user first accesses the chatbot, again after more than seven days without use, and whenever a user asks.
  • New York requires AI companions to tell users they’re talking to an AI at the start of each interaction and at least every three hours during longer sessions.
  • California’s SB 243 requires a clear notice whenever a reasonable person could think they’re talking to a human. For known minors, it adds a reminder at least every three hours to take a break and that the chatbot isn’t human.

Build disclosure as a configurable component with its own timers and triggers, so a new state rule means a configuration change instead of a rebuild.

How Do You Design Crisis Detection and Human Handoff?

Design it as a separate system with its own owner, its own tests and a path to a real person, and finish it before you tune the conversation. At a crisis moment, the chatbot has three jobs: recognize the risk, respond safely and bring in a human. Counseling waits for the human.

Plan for Volume

At scale, crisis conversations happen every day. In October 2025, OpenAI estimated that about 0.15% of ChatGPT’s weekly active users have conversations that include explicit indicators of potential suicidal planning or intent, and that about 0.07% show possible signs of mental health emergencies related to psychosis or mania. At that 0.15% rate, an app with 100,000 weekly users would see about 150 such users every week, and a dedicated mental health app shouldn’t assume its rate is lower. Staff the response for that volume before launch.

Detection: Plan for Ambiguity

Keyword lists catch “I want to kill myself” and miss nearly everything else. Mid-range risk is the hard part. In a RAND-led study published in Psychiatric Services in 2025, 13 clinical experts rated 30 suicide-related questions by risk level, and researchers then asked ChatGPT, Claude and Gemini each question 100 times. The chatbots’ responses matched expert judgment at the extremes of risk, but they didn’t meaningfully distinguish intermediate risk levels. Build your classifier and your test set around indirect expressions, passive ideation and risk that builds across several messages, along with single alarming lines.

Decide your sensitivity trade-off on purpose. A system tuned to catch everything will over-trigger and teach users to stop being honest. A system tuned to avoid false alarms will miss people. Your clinical lead should set that threshold, and the team should review it against real escalations after launch.

The Handoff: What Happens in the Next 60 Seconds

Write the handoff as a runbook before launch. At minimum, it should answer these questions:

  • When risk is flagged, what does the user see, and does it include the 988 Suicide & Crisis Lifeline, which people can call, text or chat with 24/7, along with local emergency options?
  • Who inside your organization is notified, how, and who covers nights and weekends?
  • Can a clinician view the relevant conversation context, and is that access logged?
  • What does the app do if the user disengages mid-escalation?
  • Who reviews every escalation afterward, and how fast?

If you can’t staff a live response, say so in the product and in your contracts, and route users to an external crisis service instead. An unmonitored flag can do more harm than no flag at all, because it creates a record showing you knew about a risk and no one acted.

What State Law Now Requires

Crisis handling has moved from best practice to legal requirement in several states. Confirm with counsel whether your product fits each law’s definitions, but design to the strictest version:

  • New York. Since November 5, 2025, operators of AI companions have had to make reasonable efforts to detect and address suicidal ideation or self-harm, and at a minimum refer users to crisis services such as suicide prevention hotlines. The attorney general can seek civil penalties of up to $15,000 per day.
  • California. SB 243 requires companion chatbot operators to maintain protocols that keep chatbots from producing suicidal ideation, suicide or self-harm content, to send a notification referring users who express those thoughts to crisis service providers, and to publish details of those protocols on their websites. Starting July 1, 2027, operators must report annually to the state’s Office of Suicide Prevention, including how many crisis referral notifications they issued, without user identifiers. People harmed by violations can sue for at least $1,000 per violation.
  • Utah. A mental health chatbot supplier can claim an affirmative defense against unlicensed-practice claims if it files a written policy with the state’s Division of Consumer Protection. The policy has to cover pre-launch and ongoing testing, harm reporting, real-time response to acute physical risk and periodic safety reviews, and it must state that user safety takes priority over engagement or profit.

New York’s and California’s laws define their scope around companion chatbots that sustain a relationship with users, so whether your tool is covered depends on its design. Either way, the requirements describe a sound crisis system: detect, refer, document and report. Log every referral as a countable event without identifiers from day one, so you can pull annual reporting numbers with a single query.

Test It With Clinicians

Open evaluation tools now exist. In June 2026, JMIR AI published a human validation study of VERA-MH, an open-source safety evaluation for how chatbots detect and respond to suicide risk. Six licensed clinicians at Spring Health rated 90 simulated conversations with GPT-4o, GPT-5.0 and Gemini 3 Pro Preview, using a rubric that scores whether the chatbot detects potential risk, confirms it, guides the user to human care, stays supportive and follows AI boundaries. Automated LLM judges agreed with the clinicians’ consensus about as well as the clinicians agreed with each other, but they caught only 77% to 85% of the responses clinicians rated as high potential for harm.

AI App Development

That points to a working method. Score simulated high-risk conversations against a clinical rubric, automate the runs so they repeat on every model, prompt or content change, and keep clinicians reviewing samples, because an automated judge will miss some of the worst responses.

How Does HIPAA Apply to Conversational Data?

If your tool runs on behalf of a covered entity such as a provider or health plan, the conversations are likely PHI, and every service that touches them is a business associate that needs a signed agreement. The chat screen is the visible part. The bigger exposure sits behind it, in model APIs, logging, analytics, error tracking and cloud storage.

Vendor Agreements

Encryption doesn’t remove a vendor’s obligations. HHS guidance on cloud service providers says that lacking an encryption key for the data it maintains doesn’t exempt a provider from business associate status. For an LLM product, that means your model provider needs to be covered by a BAA, or your architecture has to keep PHI from ever reaching it. Check this before you choose a model. Some providers offer BAAs only on specific enterprise tiers or endpoints, and a consumer-tier API key in a prototype is a common way teams end up out of compliance.

Storage and Logging

Decide what you keep and why:

  • Minimize. Retain only what clinical review and safety auditing need. Set retention periods and enforce deletion.
  • Scrub logs. Prompt and response logs are where PHI leaks. Third-party observability tools become business associates too if they see identifiable content.
  • Separate identity from content where you can, and apply role-based access so only the people who review escalations can read transcripts.
  • Don’t train on user conversations unless your agreements, consent flow and legal review explicitly allow it.

If privacy is a deciding factor, on-device processing can keep sensitive text off your servers entirely, at the cost of tighter limits on model size and capability.

When HIPAA Doesn’t Apply

A direct-to-consumer app that no covered entity sponsors usually sits outside HIPAA, and it still has rules to follow. The FTC’s Health Breach Notification Rule covers most health apps that HIPAA doesn’t, and it counts unauthorized disclosures of health data as breaches. Utah bars mental health chatbot suppliers from selling or sharing users’ individually identifiable health information, with narrow exceptions, and prohibits advertising targeted on anything a user types. The AMA has also asked Congress to discourage ads in mental health chatbots and prohibit ads aimed at children. Treat HIPAA as the minimum, and plan for state and FTC rules on top of it.

When Does an AI Mental Health App Become Regulated Software?

It becomes a medical device when its intended use is to diagnose, treat, mitigate or prevent a disease or condition, however simple the software is. Your marketing, labeling, in-app claims and design all show intended use, whatever a regulatory memo says.

FDA’s general wellness guidance, revised on January 6, 2026, treats relaxation and stress management as general wellness uses that don’t refer to a disease or condition. A tool that guides breathing or offers journaling prompts for stress sits comfortably there. A tool that says it treats depression or anxiety, screens for a diagnosis or delivers therapy for a named condition doesn’t.

Where FDA Stands on Generative AI

FDA hasn’t settled its framework for generative AI therapy products. At its November 6, 2025 Digital Health Advisory Committee meeting, the agency said it had authorized more than 1,200 AI-enabled devices and that none yet involved generative AI for mental health conditions, and the discussion stressed human oversight and postmarket monitoring. In August 2026, FDA released a discussion paper on regulating generative AI-enabled devices, and its fiscal 2027 guidance agenda includes a planned draft on evidence for generative AI conversational devices for mental disorders. The AMA’s April 2026 letters asked Congress to bar chatbots from diagnosing or treating mental health conditions, to subject any that do to FDA review as medical devices, and to have FDA clarify which tools count as general wellness.

Plan around what’s in front of you. If you make treatment claims, expect a device pathway, clinical evidence requirements and monitoring obligations after launch.

Mental Health

The evidence base is thinnest where your crisis layer matters most. The leading trial, Dartmouth’s Therabot study in NEJM AI, randomized 210 adults to the chatbot or a waitlist, and it excluded people with active suicidality, mania or psychosis. That’s a reasonable choice for a first trial, and it means the published evidence says little about how a generative chatbot handles the users at greatest risk. Your own testing has to cover them.

State Rules on AI Therapy

States are also regulating the therapy claim itself. Illinois and Nevada restricted AI-delivered therapy in 2025, and Colorado, Maine, Rhode Island, Tennessee and Vermont followed in 2026. Their mechanisms differ, from bans on presenting AI as a therapist to requirements that psychotherapy come from a qualified professional. Our guide to AI therapy app validation and FDA pathways covers the state-by-state differences and the FDA routes in more depth.

Choose Your Lane Deliberately

Most teams have two honest options:

  • Stay in wellness and support. Limit claims, avoid condition-specific treatment language, keep the escalation path, and be clear that the tool doesn’t replace care. The evidence burden is lower, and so is the clinical value you can claim.
  • Build toward regulated software. Define the indication, build quality and risk documentation from day one, and plan clinical validation. It costs more, and it’s the only route to prescribed or reimbursed use.

The costly mistake is drifting from the first lane into the second through marketing copy, a clinician-facing dashboard or a feature that starts scoring symptoms, without updating your documentation. Review every new feature and every line of marketing against your stated intended use.

What Should You Monitor After Launch?

Safety work continues after launch, and regulators and professional groups agree on that point. The AMA wants AI companies required to keep checking their chatbots’ safety and performance after release, FDA’s advisory committee discussion stressed postmarket monitoring, and Utah’s affirmative defense calls for periodic safety reviews. Build a safety dashboard that a clinician reviews on a schedule, covering:

  • Escalations and referrals by risk tier, with the time from flag to human contact.
  • Clinician review findings, including missed risk and false alarms, which tune your detection threshold.
  • Refusals and output-screen failures, which show where the model keeps pushing against its scope.
  • Model and prompt versions, so every metric ties back to the configuration that produced it.

Pre-Launch Guardrail Checklist

Don’t ship until each item has an owner and evidence that it works.

  • Scope. A written list of refused behaviors, enforced by input and output screening, with test cases for each.
  • Identity. AI disclosure at session start and on each state’s required schedule. The bot never claims a license, credential or human identity.
  • Crisis detection. Validated against clinician-rated simulated conversations, including ambiguous and indirect risk.
  • Handoff runbook. Named responders, coverage hours, escalation timing and a post-event review process.
  • Crisis resources. 988 and local emergency options shown at the point of risk, on every platform.
  • State requirements mapped. Crisis referral, disclosure and reporting rules for each launch state, with referrals logged as countable events.
  • BAAs. Signed with every vendor that can see conversation content, including the model provider, hosting, logging and analytics.
  • Logging and retention. PHI scrubbed from logs, retention periods set and deletion tested.
  • Regulatory position. A documented intended use, with marketing, labeling and features reviewed against it.
  • Change control. Safety tests rerun on every model, prompt or content update.
  • Monitoring. A dashboard of escalations, refusals and failures, reviewed by a clinician on a schedule.

Why Partner With Dogtown Media

Dogtown Media is headquartered in Venice Beach, California, with a presence in San Francisco, New York City and London, and has launched more than 200 apps since 2011. Our healthcare clients include the National Institutes of Health, Moffitt Cancer Center and the National Sleep Foundation, and we built the apps for two NCI-funded randomized trials of smoking cessation interventions at Moffitt. Our AI compliance and risk mitigation work covers HIPAA-ready data handling, safeguards against prompt injection, bias review, risk assessments and FDA readiness for AI-driven health apps.

Frequently Asked Questions

Is an AI counseling app regulated by FDA?

It depends on its intended use. A tool limited to general wellness claims, such as stress management, falls under FDA’s low-risk wellness policy, while one intended to treat or diagnose a condition is likely a medical device. FDA has discussed generative AI mental health devices with its advisory committee and released a discussion paper, but it hasn’t issued a final framework specific to them.

Can a behavioral health chatbot use a general-purpose LLM API?

Yes, once you’ve covered privacy and safety. If conversations contain PHI, the provider must sign a business associate agreement, or your architecture must keep PHI from reaching it. You also need your own safety layers, because general-purpose models have handled suicide-related prompts inconsistently, especially at intermediate risk.

Do state laws require crisis protocols for mental health chatbots?

Some do. New York requires AI companions to detect and address suicidal ideation and refer users to crisis services. California’s SB 243 requires crisis referral notifications and published protocols, with annual reporting starting July 1, 2027. Utah ties an affirmative defense to a written policy that covers real-time response to acute risk. Coverage depends on how each law defines the product, so get legal review for every launch state.

Does AI for virtual therapy need a human in the loop?

For crisis moments, yes. At a minimum, the product needs a defined path to a human or an external crisis service, and state laws and professional bodies are pushing toward required safeguards and human oversight. How much clinician involvement you need in routine conversations depends on your claims and your states.

How do digital therapeutics differ from a wellness chatbot?

Digital therapeutics deliver a clinical intervention for a defined condition and are typically evaluated as regulated software, with clinical evidence behind them. A wellness chatbot makes general support claims and avoids treatment language. The difference lies in the intended use you can document and defend.

Where This Leaves Your Build Decision

The teams that avoid trouble make three decisions early and keep them: a narrow scope enforced in code, a crisis path that reaches a person, and an honest intended use that matches their marketing. The market is crowded and well funded. Rock Health reports that mental health is the top-funded clinical indication in digital health for the seventh consecutive year, so competitors will ship fast. The tool that lasts is the one you can defend to a clinical committee, a regulator and a worried parent. If you’re scoping an AI mental health product and want help designing the guardrails and crisis path before you build, contact our team.

Sources

  • Fierce Healthcare, “Pennsylvania sues Character.ai over AI chatbot allegedly presenting itself as licensed medical professional” (May 2026): https://fiercehealthcare.com/ai-and-machine-learning/pennsylvania-sues-characterai-over-ai-chatbot-allegedly-unlawfully
  • Clark A, “The Ability of AI Therapy Bots to Set Limits With Distressed Adolescents: Simulation-Based Comparison Study,” JMIR Mental Health (2025): https://mental.jmir.org/2025/1/e78414
  • Holmes G, Tang B, Gupta S, Venkatesh S, Christensen H, Whitton A, “Applications of Large Language Models in the Field of Suicide Prevention: Scoping Review,” Journal of Medical Internet Research (2025): https://www.jmir.org/2025/1/e63126
  • Healthcare Dive, “AMA urges lawmakers to implement safeguards on AI chatbots” (April 23, 2026): https://www.healthcaredive.com/news/american-medical-association-ama-urges-congress-ai-chatbot-mental-health-safeguards/818269/
  • Wilson Sonsini, client alert on Utah’s mental health chatbot law, HB 452 (2025): https://www.wsgr.com/en/insights/utah-enacts-mental-health-chatbot-law.html
  • Manatt, “New York’s Safeguards for AI Companions Are Now in Effect” (2025): https://www.manatt.com/insights/newsletters/client-alert/new-york-s-safeguards-for-ai-companions-are-now-in-effect
  • Skadden, “New California ‘Companion Chatbot’ Law Imposes Disclosure, Safety Protocol and Annual Reporting Requirements” (October 2025): https://www.skadden.com/insights/publications/2025/10/new-california-companion-chatbot-law
  • OpenAI, “Strengthening ChatGPT’s responses in sensitive conversations” (October 27, 2025): https://openai.com/index/strengthening-chatgpt-responses-in-sensitive-conversations/
  • McBain RK, et al., “Evaluation of Alignment Between Large Language Models and Expert Clinicians in Suicide Risk Assessment,” Psychiatric Services (2025), via RAND: https://www.rand.org/pubs/external_publications/EP71040.html
  • 988 Suicide & Crisis Lifeline: https://988lifeline.org/
  • Bentley KH, et al., “AI Chatbot Suicide Risk Detection and Response: Human Validation Study of the Open-Source VERA-MH Safety Evaluation,” JMIR AI (June 29, 2026): https://ai.jmir.org/2026/1/e92817
  • U.S. Department of Health and Human Services, “If a CSP stores only encrypted ePHI and does not have a decryption key, is it a HIPAA business associate?”: https://www.hhs.gov/hipaa/for-professionals/faq/2076/if-a-csp-stores-only-encrypted-ephi-and-does-not-have-a-decryption-key-is-it-a-hipaa-business-associate/index.html
  • Federal Trade Commission, “Health Breach Notification Rule,” Federal Register (May 30, 2024): https://www.federalregister.gov/documents/2024/05/30/2024-10855/health-breach-notification-rule
  • U.S. Food and Drug Administration, General Wellness: Policy for Low Risk Devices (January 2026): https://www.fda.gov/regulatory-information/search-fda-guidance-documents/general-wellness-policy-low-risk-devices
  • U.S. Food and Drug Administration, Digital Health Advisory Committee meeting summary (November 6, 2025): https://www.fda.gov/media/190450/download
  • U.S. Food and Drug Administration, “FDA Seeks Public Feedback to Inform Regulatory Approach for Generative AI-Enabled Medical Devices” (August 18, 2026): https://www.fda.gov/news-events/press-announcements/fda-seeks-public-feedback-inform-regulatory-approach-generative-ai-enabled-medical-devices
  • WorldHealth.AI, “FDA puts final AI device lifecycle guidance at top of its 2027 priorities” (October 2026): https://www.worldhealth.ai/insights/fda-puts-final-ai-device-lifecycle-guidance-at-top-of-its-2027-priorities
  • 2 Minute Medicine, summary of the Therabot randomized trial: https://www.2minutemedicine.com/?p=81659
  • Becker’s Behavioral Health, “5 states restrict AI therapy chatbots in 2026”: https://www.beckersbehavioralhealth.com/ai-2/5-states-restrict-ai-therapy-chatbots-in-2026/
  • Rock Health, “H1 2026 funding and market overview: Durable roots, shifting routes” (July 2026): https://rockhealth.com/insights/h1-2026-funding-and-market-overview/