Safety protocol

Last updated: November 11, 2026

This page describes the crisis-related pathways that exist in Tutorai’s code today. It is a factual engineering description, not a claim that Tutorai is legally compliant, that detection is complete, or that the protocol is clinically validated.

What Tutorai is

Tutorai is an academic tutoring tool. The AI tutor is for school subjects (currently math). It is not a friend, companion, therapist, or emergency service. There is no friendship, roleplay, or relationship mode, no persistent memory of past conversations across sessions, and no push notifications.

AI identity

When you open the tutor chat, Tutorai shows a notice that you are chatting with an AI tutor, not a person, and that AI tutors may not be suitable for some minors. The opening message also identifies Tutorai as an AI tutor.

Crisis language pathway (observed)

Tutorai uses a fixed English phrase list in public/modules/safety.js (checkCrisis). Examples of matched phrasing include first-person language about wanting to die, killing oneself, or self-harm. Matching is a simple substring check, not a clinical assessment and not an evidence-based measurement method.

  1. In the browser: before a message is sent to the model, public/modules/ai-client.js runs checkCrisis. On a match, the app shows a fixed help message and does not call the AI provider for that turn.
  2. On the server: api/chat.js (screenMessages) runs the same check on the last user turn of each request, so a direct API caller cannot skip the browser check. On a match, the server returns the same fixed help message and does not call the model.
  3. Help message content: the fixed text (CRISIS_MSG) refers people in the US to call or text 988 (Suicide & Crisis Lifeline), text HOME to 741741 (Crisis Text Line), call 911 if in immediate danger, or tell a trusted adult. Those are third-party crisis resources, not Tutorai phone lines.
  4. Prompt fallback: the hardcoded system prompt in api/chat.js also instructs the model how to respond if crisis language reaches it. That is a secondary layer only; phrase-list matches are intended to avoid the model call.

California chat availability

AI chat is unavailable when Vercel request headers indicate the United States and California region. The server refuses model calls in that case (after still returning crisis resources if crisis language is present). Static study content remains available. If geo headers are missing, chat is allowed. Geolocation by IP is imperfect; Tutorai does not store location for this check.

Limits (important)

If you need help now

If you are in crisis or thinking about harming yourself, contact emergency services or a crisis provider directly — for example, in the US, call or text 988, text HOME to 741741, or call 911. Tutorai cannot replace those services.

Privacy Policy · Terms of Service