Mellow LogoMellow

AI Capabilities

What Mellow's AI layer does.

AI capabilities

Mellow's AI is Anthropic Claude, called through internal/ai. Every AI call is non-streaming. If ANTHROPIC_API_KEY is unset or the AI is disabled in the Mellow config row, every feature below falls back to fixed text rather than failing.

Conversation

  • ai.Generate produces supportive replies in DMs, mentions/replies, and the API's POST /v1/chat.
  • System prompt, model, temperature, and max tokens come from the Mellow config row (default claude-haiku-4-5, ~300 tokens).
  • Personality (gentle, supportive, direct, playful, professional, encouraging) and time-of-day guidance (late-night, early-morning) are added to the system prompt.
  • Conversation history is included only if the user has context_logging enabled; stored content is decrypted for the prompt and the exchange is re-persisted encrypted.

Coping

  • ai.Coping tailors the guided exercises (/coping breathing etc.) to an optional feeling:.
  • Journalling, gratitude, plan, streaks, and toolbox are data operations with no AI call.

Crisis screening

Two stages: a local keyword/regex screen, then a constrained one-shot classifier (none|low|medium|high|critical, instructed to be conservative). For high/critical, the user-facing response is fixed reviewed copy - no free-form model output. See

Crisis Safety

Crisis Safety

How Mellow screens for crisis and why it responds the way it does.

.

Fun

ai.Fun backs /joke, /compliment, /trivia, /wouldyourather; ai.Meme backs /memegen; ai.Wordgame backs /wordgame. Each has a fixed fallback.

What the AI does not do

  • No streaming.
  • No presencePenalty / frequencyPenalty (the Anthropic API has no equivalent; the columns are inert).
  • No automated moderation, content classification of arbitrary server messages, or image generation of its own (memes use an external template service).
  • No training on your data; Anthropic does not train on API traffic.

Cost

The default Haiku model with a small token cap keeps per-message cost low. Fixed fallbacks mean an Anthropic outage degrades gracefully.

On this page