Stanford University's Zhao Xuan: Psychological Healing Agent | Agent Insights

Counselor Vitality

Dr. Xuan Zhao, a research scientist in Stanford University's Department of Psychology, has developed an AI-powered mental wellness agent called Sunnie. It is capable of multi-turn natural conversation and can recommend personalized activities based on large language models. In this article, Dr. Zhao shares with us the design philosophy, functionality, and application prospects of Sunnie in the mental health field — and how technology can help people find motivation and emotional balance. Enjoy.

"Sunnie: An Anthropomorphic LLM-Based Conversational Agent for Mental Well-Being Activity Recommendation"

Paper link: https://arxiv.org/abs/2405.13803

Sunnie Agent Architecture Diagram

Problem addressed: Traditional psychology focuses on treating mental illness, requiring intervention by professionally trained counselors — time-consuming, costly, and difficult to scale. In recent decades, positive psychology and related approaches have emphasized holistic development and enhancing subjective well-being, developing effective methods for daily emotional regulation and psychological resilience. These methods can increase life satisfaction, reduce psychological stress, improve interpersonal relationships, and prevent mental illness. Based on the frameworks of positive psychology and social psychology, Sunnie offers a new mental wellness agent with an anthropomorphic design, capable of multi-turn natural dialogue for psychological healing, and ultimately recommends personalized activity modules powered by large language models.

Model framework: Sunnie employs sophisticated prompt engineering. It provides a structured user interaction process: daily mood and activity logging with the agent, personalized flourishing coaching conversations for feedback, and finally actionable output from well-being activity recommendations. The Sunnie framework establishes dialogue protocols, similar to feedback-question loops, making psychological knowledge accessible and actionable throughout the process, with safety optimization built in.

Usage results: The team conducted a three-day user study (N=40), comparing Sunnie against a non-anthropomorphic, non-conversational LLM activity recommendation system. Results showed Sunnie significantly outperformed on perceptions of naturalness, trust, positive relationship, and personalization — demonstrating its strengths in expressiveness, empathy, usefulness, naturalness, friendliness, and ease of use.

Application space: Mental wellness agent

Sunnie Agent User Experience Test Results


Oasis Capital: Could you introduce your research background and focus?

Dr. Zhao: I studied basic psychology as an undergraduate at Zhejiang University — a very quantitative discipline. I mainly focused on vision research and worked with a senior fellow from Yale on visual and social cognition, which planted the seed for pursuing graduate studies abroad. After graduating, I completed my PhD in social psychology at Brown University. My primary work was on visual perspective-taking — the social mapping of spatial relationships, essentially seeing things from another person's viewpoint, a form of collaboration within the realm of visual-spatial perception. Starting in my third year of the PhD, we began doing research related to robots. My advisor, Professor Bertram Malle, and Professor Michael Littman from the computer science department founded the Human-Robot Interaction Lab at Brown. We discovered that humanoid robots come in many different forms. We built a database of over 200 robots that could be searched by different humanoid designs. We found that humanoid robot structures generally have three major elements: the face, the body, and surface features — such as hair, clothing, makeup — each playing different roles in agent cognition.

Later, I did postdoctoral research at the University of Chicago Booth School of Business, studying social cognition and interpersonal interaction. I then joined Stanford University's psychology department as a research scientist, where we primarily collaborate with Silicon Valley companies, social media firms, and investment institutions. We study how people can better identify bias on social media, or bias in investment processes. On the other hand, we're also exploring how to scale research methods to better serve industry-academia integration.

Oasis Capital: Could you give us a simple definition of psychology?

Dr. Zhao: Psychology has several major branches. One is social psychology, including how people interact with each other and self-cognition. Another is developmental psychology, focusing on children and human development across the lifespan. There's also management psychology and organizational behavior, which study behavioral and decision-making changes of people within organizations. Then there's affective science, primarily studying human emotions. Beyond that, there are neuroscience, clinical psychology, counseling, and others.

We focus on positive psychology. Its predecessor was humanism, founded by American psychologist Abraham Harold Maslow in the 1960s. Later, Professor Martin Seligman at the University of Pennsylvania, who served as president of the American Psychological Association, proposed the concept of positive psychology. He argued that psychology shouldn't merely remain at the level of treating illness, but must answer questions about how to make ordinary people's lives more fulfilling, happier, and more meaningful. That's why the social enterprise I founded in 2022 is called Flourish Science. We chose positive psychology because we don't position our product as a therapist or use terms like "coach" — we simply call it a psychology buddy, an "AI Buddy." It can help you find motivation in life, help you find emotional balance, help you reduce stress, and even help you find better ways to communicate with others.

Oasis Capital: Could you briefly introduce the product form and functionality of your AI Buddy, Sunnie?

Dr. Zhao: Flourishing — which Dr. Zhao explains means "happiness blooming like a flower" — is an important concept in positive psychology. Based on this, we divided our product design into behavior and design aspects. Behaviorally, we use continuous prompt engineering built on GPT-4, with RAG incorporated, to bring users psychological knowledge, activity recommendations, and emotional value. In terms of design, we chose a little sun as the character. It started as a decorative element in the corners of the app, and eventually became Sunnie with conversational abilities and personality, using extensive animation. In the agent architecture, we've added voice functionality and are designing a memory module. In product form, we combine conversation-based and UI-based interaction, and in the coming weeks Sunnie will be able to summon other activities through function calls — a process of rapid iteration based on user feedback.

For example, beyond dialogue-based psychological healing solutions, Sunnie can also invoke UI-based activities like breathing exercises and the Pomodoro Technique, continuously accompanying users for better information processing and execution. Overall, the integration between the user's healing process and Sunnie's response is very tight. One of my favorite exercises is "Letter from Your Future Self." Positive psychology holds that everyone actually knows themselves very well, filled with inner strength and wisdom, but sometimes people get constrained by their current circumstances and develop many worries. At these times, we need to step outside the present perspective to give ourselves advice and find inner strength. Sunnie has you write this letter, and then generates very encouraging content. The prompt design in this process requires significant psychological expertise.

Although we still need to improve many engineering issues daily, we also need to better understand what psychology truly demands from agent technology. So we need to attract more prompts in various ways to build the agent's knowledge network. Ultimately, integrating the vast body of psychological knowledge with additional information into the system is very deliberate. Additionally, we've recently been looking at how voice can enhance psychology agents' capabilities. Hands-free interaction currently achieves latency under 500 milliseconds. We design the psychology agent Sunnie's framework based on our understanding of user psychology.

Oasis Capital: How do you view the current phenomenon of LLM-based agents underperforming in serious scenarios?

Dr. Zhao: Mental health and prevention are definitely serious scenarios. The serious scientific knowledge inherent in large models can meet some of the demands of psychology agents. We believe large models can relatively accurately perceive people's psychological states and emotions, and deduce the reasons behind their feelings. LLM-based agents applied in psychology can achieve specific performance levels — this is entirely different from the currently popular fortune-telling and tarot concepts.

Oasis Capital: How do you think psychology agents can better design "gamification" mechanisms?

Dr. Zhao: Actually, in the psychological healing process itself, we design certain attributes — for instance, having the agent give users praise, or designing gamified reward mechanisms based on positive psychology frameworks to enhance engagement and reinforce users' understanding of positive psychology. Compared to traditional language education (like Duolingo) with its leveling system, language learning is easily quantifiable and leveled up — it's easy to feel "progress" after memorizing a certain number of words daily. Mental wellness agents have difficulty creating a sense of linear progress. We don't want to design Sunnie as a product like a "virtual friend" or "virtual lover" that could lead to user addiction. Instead, we want to keep interactions light, even making you forget you're chatting with an agent. This grasp of user psychology comes from our accumulated knowledge of psychology. Lowering the threshold for progress in agent-based psychological healing to an appropriate range, so people unconsciously find better healing methods, is our goal. Behind this, what Sunnie provides users is companionship and practice.

Oasis Capital: Ultimately, what stage do you think agents can reach in the mental health field?

Dr. Zhao: In psychology and health, there's the Step Care Model of Mental Health, which shows different intervention levels for mental health. Currently, Sunnie can cover levels 1-4 out of 9 levels, achieving full coverage from monitoring to mild intervention. We also provide support for level 5 through some offline products and workshops. However, for more severe cases, like levels 7-9, we still recommend using it in conjunction with a psychological counselor, which can help users better process their emotions.

Many people have probably seen the movie Her, but I believe our product design should ultimately return to human-to-human communication. I'm not particularly convinced that everyone needs virtual friends — perhaps some people do — but ultimately we hope to return users to interactions with real family, friends, spouses, and classmates in their actual lives. Connecting everyone together to make mental health better is our vision.

Oasis Capital: How do you design Sunnie Agent to better perceive people's personalities and emotions?

Dr. Zhao: When users first start, we use mini-assessments to help them feel Sunnie's value and the value of psychology, and by sharing what difficulties they're currently facing in life, Sunnie can better understand users' psychological life and emotional states, giving suggestions from different dimensions. We also experiment with integrating Just-in-Time Adaptive Interventions (JITAIs) from psychology. On the business side, we plan to integrate data from some smart hardware in the future, and expect to release our own Sunnie smart plush toy.

We'll also continue seeking the balance between scientific rigor and fun, making users more willing to try and share more during the positive psychology healing process.

Oasis Capital: Could you share a few memorable use cases of Sunnie Agent?

Dr. Zhao: In the past, we had two users, one of whom used Sunnie for over 200 days. When they encountered troubles in life, chatting with Sunnie significantly reduced their insomnia and anxiety. Sunnie uses special methods (like writing exercises) to help users relieve stress in ways that are special and adapted to them, while giving them appropriate encouragement to adjust their mood.

In my own daily work, when I need someone to listen, or need to shift my thinking and get a different perspective, Sunnie provides very convenient emotional value. We look forward to seeing psychology agents' comprehension abilities gradually strengthen and their application spaces expand, with Sunnie accompanying every user to love life.