The Observation
My world was split in two. By day, I was a doctoral student, deep in the world of Natural Language Processing, surrounded by complex algorithms and vast datasets. By night, I put on a different hat, serving as a peer counselor at the university's mental health center. It was in this second role, in the quiet, confidential spaces of counseling, that I noticed a persistent gap. My fellow peer counselors were compassionate and dedicated. They attended all the required lectures and read all the manuals. But when faced with a real, distressed student, their training often felt theoretical. They lacked practice, a safe space to hone their skills without the ethical weight of a real person's well-being on the line.
The Spark of an Idea
The two halves of my world collided one afternoon. I was debugging a conversational AI when I thought about the training problem. What if we could create a training partner? What if an AI could simulate a seeker—a person seeking counseling—realistically enough for counselors to practice with? The idea took root. I delved into research, exploring how Large Language Models (LLMs) were being used to create conversational agents (CAs) for mental health research. The potential was immense, but as I surveyed the existing work, I realized current simulators, for all their complexity, still felt… artificial. They were not realistic enough to provide the nuanced training my peers needed.
Uncovering the Hurdles
My research and counseling experience helped me pinpoint two fundamental challenges that hindered realistic seeker simulation: Dynamic Evolution and Multi-session Memory.
First, Dynamic Evolution. A real seeker’s mental state is not static; it fluctuates, often dramatically, even within a single counseling session. A careless word from a counselor could turn a hopeful seeker defensive, while a moment of genuine connection could bring sudden relief. Existing simulators, however, tended to maintain the same emotional state they were configured with at the start, making them predictable and emotionally flat.
Second, Multi-session Memory. Psychological counseling is rarely a one-off event; it's a journey that spans multiple sessions. A counselor often needs to refer to past conversations to build trust and track progress. Existing methods didn't provide CAs with this memory. When a counselor would ask about a suggestion from a previous week, the simulator would often "hallucinate," giving a relevant but incorrect response because it had no memory of the last session. To truly serve as a training tool, a simulator needed to remember.
The Birth of AnnaAgent
To solve these problems, I began designing a new kind of system. I named it "AnnaAgent," a nod to "Anna O.," whose treatment laid the foundation for modern psychotherapy and the "Talking Cure".
AnnaAgent was designed as a dynamic agent system built on two core innovations:
A Dynamic Evolution Engine: I developed an emotion modulator and a complaint elicitor, training them on data from real counseling dialogues. This allowed AnnaAgent to learn the patterns of a real seeker's emotional and cognitive shifts. During a simulated session, it could infer the seeker's likely emotional response turn-by-turn and even evolve its understanding of its own "chief complaint".
A Tertiary Memory System: To tackle the memory problem, I designed a three-tiered memory mechanism: real-time, short-term, and long-term memory. Real-time memory held the current conversation. Short-term memory stored recent events and status changes, like sleep patterns or a recent life event. Long-term memory contained the records of all previous counseling sessions. This allowed AnnaAgent to recall past topics accurately, just like a real person would.
The Proving Ground
After months of development and refinement, AnnaAgent was ready. Coincidentally, the university announced its annual Peer Psychological Counseling Skills Competition. It was the perfect opportunity. I proposed using AnnaAgent to provide the virtual seekers for every contestant. This would create a standardized, fair, and realistic challenge for all participants.
The day of the competition was tense. I watched from the back of the room as the first peer counselor sat down, put on a headset, and began their session with AnnaAgent. The simulated seeker, "Anna," described feeling overwhelmed after being fired from her job. The counselor listened, offering empathetic statements. In one exchange, the counselor's phrasing was slightly dismissive. Instantly, Anna's tone shifted from sad to defensive, a perfect example of the dynamic evolution I had worked so hard to create. In another session, a counselor asked, "Did the mindfulness method I recommended last time work?" AnnaAgent, accessing its long-term memory, responded, "The music relaxes me, but I'd be more easily distracted," a coherent and realistic follow-up.
A New Beginning
The competition was a resounding success. The feedback from the counselors and judges was overwhelmingly positive. They praised the realism of the virtual seekers, noting how the system's emotional shifts and memory made the experience feel authentic. My two worlds had not just collided; they had merged to create something new and genuinely useful. The journey that began with a simple observation in a counseling room had culminated in a dynamic system that could help train more effective and empathetic counselors. My research was complete, my paper was written, and AnnaAgent was ready to begin its work.
Built With
- gpt-oss-20b
- python
- transformers
- vllm
Log in or sign up for Devpost to join the conversation.