Abstract
Large language models (LLMs) in psychological counseling have attracted increasing attention. However, existing approaches often lack emotional understanding, adaptive strategies, and the use of therapeutic methods across multiple sessions with long-term memory, leaving them far from real clinical practice. To address these critical gaps, we introduce TheraMind, a strategic and adaptive agent for longitudinal psychological counseling. The cornerstone of TheraMind is a novel dual-loop architecture that decouples the complex counseling process into an Intra-Session Loop for tactical dialogue management and a Cross-Session Loop for strategic therapeutic planning. The Intra-Session Loop perceives the patient's emotional state to dynamically select response strategies while leveraging cross-session memory to ensure continuity. Crucially, the Cross-Session Loop empowers the agent with long-term adaptability by evaluating the efficacy of the applied therapy after each session and adjusting the method for subsequent interactions. We validate our approach in a high-fidelity simulation environment grounded in real clinical cases. Extensive evaluations show that TheraMind outperforms other methods, especially on multi-session metrics like Coherence, Flexibility, and Therapeutic Attunement, validating the effectiveness of its dual-loop design in emulating strategic, adaptive, and longitudinal therapeutic behavior. The code is publicly available at https://0mwwm0.github.io/TheraMind/.
Introduction
Psychological counseling is inherently a longitudinal process, requiring therapists to maintain continuity across sessions and adapt their strategies based on patient progress. However, most current Large Language Model (LLM) based counseling agents suffer from two major flaws: "clinical amnesia," an inability to integrate insights from past sessions, and "strategic rigidity," where agents are locked into a single therapeutic modality regardless of patient response.
TheraMind aims to bridge the gap between reactive text generation and deliberative clinical intervention by decoupling turn-by-turn dialogue tactics from long-term strategic planning. This approach allows the agent to move beyond simple chatbots and emulate the strategic thinking of a human therapist.
The Dual-Loop Architecture
The core of TheraMind is its dual-loop architecture, which mimics the hierarchical cognitive processes of a human therapist. This design separates tactical dialogue management from strategic therapeutic planning.
Intra-Session Loop (Tactical)
This loop manages the immediate conversation. It utilizes a Reaction Classifier to perceive the patient's primary emotion, intensity, and attitude (Cooperative vs. Resistant). A Memory Recall module dynamically pulls relevant summaries from previous sessions to ensure continuity. The final response generation is "multi-factor conditioned," meaning the LLM generates a response based on the patient's state, the tactical strategy (e.g., "Reflection of Feelings" or "Confrontation"), and the current treatment stage (e.g., Engagement vs. Exploration).
Cross-Session Loop (Strategic)
Operating between sessions, this loop provides long-term adaptability. After a session concludes, a Therapy Evaluation module assesses the efficacy of the current approach. A Therapy Selection module then decides whether to maintain the current therapy or adjust it for the next session based on the patient's progress. This allows the agent to pivot, for example, from Cognitive Behavioral Therapy (CBT) to a more client-centered approach if the patient is not responding.
Evaluation and Key Results
The researchers utilized the CPsyCounR corpus, containing over 3,000 professional counseling reports, to construct a high-fidelity longitudinal simulation environment. They sampled 100 cases across 10 clinical categories (such as Addiction and Anxiety), using an LLM-based patient simulator to engage in six-session arcs.
Performance Metrics
TheraMind established a new state-of-the-art across both single-session and multi-session metrics:
- Multi-Session Performance: It achieved a score of 2.755 (on a 0-3 scale), significantly outperforming specialized models like PsyDTLLM (1.938).
- Coherence and Flexibility: It led in Coherence (2.860) and Flexibility (2.290), confirming the effectiveness of the dual-loop design in managing long-term memory and strategic pivots.
- Human Validation: In pairwise human evaluations, TheraMind won 70-75% of the time against top-performing baselines, with experts noting its superior ability to handle complex, evolving psychological issues.
Key Insights
- Decoupling is Essential: By separating "how to talk right now" from "what is the long-term plan," the agent avoids getting bogged down in superficial empathy and can focus on actual therapeutic progress.
- Architecture vs. Scale: TheraMind (built on DeepSeek-V3) outperformed the base DeepSeek-V3 model by 18.2% on multi-session metrics, proving that a specialized agentic framework provides capabilities that raw scale cannot.
Conclusion and Future Work
TheraMind represents a significant step toward AI agents capable of longitudinal psychological support. However, limitations remain, including potential evaluation bias in LLM-based grading (e.g., using Gemini-2.5-Flash) and the need to generalize across different cultural therapeutic norms. Future work will focus on implementing more rigorous safety guardrails and ethical oversight for real-world clinical support.
Summary updated