Karen AI

The AI brain that orchestrates all conversations across every channel

What It Does

Karen is the central intelligence layer. Every inbound message — whether from WhatsApp, Instagram DM, the website widget, Telegram, or a voice call — is routed through Karen for processing and response.

External Service Details

Required environment variables:

Journeys

Karen AI is the active intelligence in every patient journey:

Key Source Files

Known Issues

Local ai.js is SPLIT — always pull from server before editing. The local copy is a refactored split version (547 lines). The server runs the monolithic original (2300+ lines). Editing locally without pulling first will cause merge conflicts and overwrite server-side logic. Always ssh hetzner and pull the current file before making changes.
core_memory.js:161 — owner_tenant_id bug outstanding. There is an unresolved bug on line 161 of src/core_memory.js related to owner_tenant_id. This affects how per-tenant core memory (persona, goals) is read back. Do not rely on getCoreMemory() returning the correct owner context until this is patched.