Most modern AI assistants suffer from a fundamental rigidity in how they handle tools. When a user says, I am feeling lost, help me find why my heart feels this way, a standard agent identifies the keyword find and immediately triggers a search tool. The result is often a clinical list of psychological articles or search engine results that shatter the emotional intimacy of the moment. This mechanical response creates a friction point where the AI prioritizes functional utility over human context, effectively treating a cry for help as a data retrieval request.
The Architecture of Intent Re-evaluation
AIRU is an emotional support AI designed to solve this specific disconnect. Developed and operated by a single high school senior, the service allows users to engage in conversations as guests without the friction of sign-ups or email registration. The system is built on a model-agnostic architecture, meaning it consumes LLMs via API, allowing the underlying brain to be swapped without rebuilding the entire pipeline. The technical stack is lean, utilizing FastAPI for the backend and vanilla JavaScript for the frontend, all deployed within a single droplet environment managed by Docker and Caddy.
The core innovation is a mechanism called the Refractive Reflection Gate. In a typical agentic workflow, a keyword trigger leads directly to tool execution. AIRU inserts a critical layer between these two steps. When a keyword like find is detected, the system does not execute the search. Instead, it calls a tiny, specialized LLM to perform an intent re-evaluation. This mini-model determines whether the utterance is a genuine request for information or a conversational expression of emotion that requires comfort. If the gate determines the user is seeking emotional support, it cancels the tool execution entirely and returns the flow to the conversational LLM.
To ensure the system remains functional even when the re-evaluation layer falters, AIRU employs a fail-open strategy. If the tiny LLM fails to reach a definitive judgment, the system defaults back to the original keyword-based trigger. This ensures that the user is never left without a response, even if the sophisticated filtering fails.
Memory management in AIRU is split into two distinct streams to maintain continuity. Structured memory handles explicit data such as the user's name, preferences, and the current state of the conversation. For the broader history, the system uses an archive combining SQLite with a Korean 2-gram similarity search. This allows the AI to retrieve relevant past interactions based on linguistic patterns rather than just exact keyword matches. Privacy is handled with a strict boundary; sensitive conversations are not stored by default, and users maintain full authority to view, modify, or delete their data.
Safety is integrated into the primary logic. If the system detects crisis signals, it bypasses all other flows to prioritize the delivery of the suicide prevention integrated number, 109. Furthermore, the service explicitly defines its boundaries through its persona and UI, stating clearly that it is not a professional mental health service.
Shifting the Metric from Retention to Recovery
While most AI companies optimize for Daily Active Users (DAU) or session length, AIRU operates on a reversal of these incentives. Most character-based AI services use dark patterns to increase immersion and stickiness, effectively trying to keep the user locked into the ecosystem. AIRU defines success as the state where the user no longer needs the service. By banning expressions that induce dependency and avoiding engagement-hacking patterns, the project shifts the performance metric from quantitative retention to qualitative emotional recovery.
From a technical implementation standpoint, the most significant challenge AIRU addresses is coreference resolution in conversational search. In a standard pipeline, if a user asks, What is the theme of that song?, the search query that reaches the tool is often just that song, which yields poor results because the subject is missing. AIRU implements a logic layer that detects these referential pronouns. When a pointer like that song is identified, the system scans previous utterances to find the actual subject and synthesizes a complete query before it ever hits the search tool.
Maintaining this level of sophistication in a one-person operation requires a rigorous operational pipeline. To prevent developer test traffic from polluting actual user metrics, the system physically separates logs for real users, evaluators, operators, and bots. This isolation ensures that the data used for tuning the Refractive Reflection Gate remains pure. Additionally, the developer has automated data snapshots and integrity verification, running 296 regression tests before every single deployment to maintain stability without a dedicated QA team.
This approach demonstrates that the bottleneck in AI agents is not the power of the primary LLM, but the precision of the orchestration layer. By placing a lightweight judgment gate before tool execution, AIRU prevents the mechanical nature of agents from breaking the human connection.




