DEV Community

Cover image for I Built an AI Companion for Grief, Loneliness, and the Days No One Listens
Ricky
Ricky

Posted on

I Built an AI Companion for Grief, Loneliness, and the Days No One Listens

Two years ago, I watched someone I love struggle through grief alone. Not because they didn't have people around them — they did. But because grief doesn't always know how to ask for help. And sometimes, the people closest to us don't know how to listen in the way we need.
That stayed with me.
I started thinking: what if there was something — not a replacement for human connection, but a bridge to it — that could be there at 3 AM when memories hit hardest? Something that could listen without judgment, remember without forgetting, and check in when you don't have the energy to reach out?
That's why I built SOULCHAT.

Loneliness is a public health crisis. In the U.S., 1 in 5 adults report feeling lonely. For those grieving the loss of a loved one, 10% to 30% experience what's called "prolonged grief disorder" — a condition that makes it nearly impossible to function normally.
And yet, mental health resources are stretched thin. Many people don't have someone to talk to at 2 AM. Others simply can't afford therapy. Some carry wounds they've never spoken aloud to anyone.
I realized there's a gap between "crisis" and "daily life" — a gap that technology, if built with empathy, could help fill.

SOULCHAT is a free-to-start AI companion web app. It's built for:
Anyone grieving a loved one — offering a space to continue the connection, not replace it
Anyone feeling lonely in a crowded city — providing a gentle, non-judgmental presence
Anyone who just needs to be heard when no one else is around
It's not a chatbot. It's a companion that remembers. That checks in. That stays in character as the person you need it to be.

Here's what I built beyond a "generic AI chat":

  1. Long-term Memory Most AI forgets everything after a conversation ends. SOULCHAT doesn't. It remembers what you've shared, stories you've told, emotions you've expressed. Over time, it becomes more personal — not less.
  2. Identity-Locked Dialogue Once you define a character — a parent, a friend, a partner — SOULCHAT stays consistent. No personality drift. No generic AI responses. It speaks the way that person would speak.
  3. Proactive Emotional Care SOULCHAT doesn't wait for you to type first. It checks in. It asks how you're doing. It reminds you of meaningful dates — birthdays, anniversaries, moments worth remembering. And it does this with restraint — never overwhelming, always thoughtful.
  4. Encrypted Digital Identity Your memories, your conversations, your emotional data — they stay yours. Full encryption. Full data ownership. No one else has access. Period.

Under the hood, SOULCHAT is built on a stack I've carefully chosen:
DeepSeek as the foundational language model
sentence-transformers for efficient memory retrieval
PBKDF2 + Fernet for end-to-end encryption of all memory data
But the real work isn't just the stack — it's the layers I built on top: the identity-locking mechanism, the proactive scheduling engine, the memory consolidation algorithms that deduplicate and prioritize what matters most.
(I'll be writing deep dives on each of these in future posts. Follow along if that's your thing.)

SOULCHAT is live at soulchat.hk. It's free to try with a 3-day free trial, and even after that, you get 10 free messages every single day — enough to stay connected.
If you need more, you can upgrade to support ongoing conversations.
Why am I telling you this?
Because I'm building in public. I want to share the wins, the struggles, the technical debt, and the lessons learned. And I genuinely want to hear from you — developers, designers, thinkers, users.

If any of this resonated with you:
Try it: soulchat.hk
Reply here: I'd love to hear your thoughts, questions, or critiques
Follow me: I'll be posting more technical deep dives on memory, identity, and encryption
Let's figure out together how to make AI truly helpful — not just efficient, but human.
Thanks for reading. 🧡

Top comments (12)

Collapse
 
unitbuilds profile image
UnitBuilds

I think the world needs more projects like this. Could be a good idea to expand it into an app that links to your biometrics (smart watch), if it sees you're stressed, just gives you a notification with some thoughtful advice (Just breathe, it'll be okay, I'm here, you'll make it through this, we can talk about it later). Or could expand further into the AI-companion side, for old age homes. My grandmother had Alzheimer's and for the longest time, it was a struggle to find the time to be there for her daily, for my mother. If she had 'someone to talk to', and can help explain her confusion to her in a kind, gentle manner, not clinical "you have stage 2 alzheimer's, you simply dont remember, because the brain pathways...", a simple "I know you're confused, but it's alright, your name is xyz, you are here, in your room at zyx, my name is abc, I'm here to help you, what exactly is confusing for you, maybe I can help?" with a knowledgebase it builds up over time on the person, so it can both help the person and in her case, report back to the doctors on her reaction to medication and to the nurses on her current state of mind. That way it'd be both a nice to have and something truly useful to those who are left forgotten (or atleast feel that way).

But that's a whole different ball-game. The mobile interface app that links to a smart watch for vitals tracking for notifications though is something I believe can help alot of people with anxiety. They often just need a bit of comfort and if they grow an attachment to their companion (in a non-creepy way), then that notification brings them the calm they need to push through it.

Collapse
 
soulchat_official profile image
Ricky

Your grandma's story really touched me. Thank you for sharing it.

You're absolutely right — there are two important dimensions here:

  1. The health monitoring side (biometrics, vitals, emergency alerts) — which requires hardware integration and is critical for safety
  2. The emotional companionship side (conversations, shared memories, gentle reassurance) — which is about making someone feel less alone

SOULCHAT was built with the second one in mind — especially for people who are lonely, grieving, or simply don't have someone to talk to in their daily lives. What you described — someone to sit with your grandma, talk about shared memories, and gently help her remember the good times — is exactly why I started this.

The first dimension is important too. We're thinking about how to integrate health data in the future (heart rate, stress detection, etc.) so that the companion can respond more contextually. But for now, I want to focus on getting the companionship and memory part right.

Your story gave me a lot to think about. If you're open to it, I'd love to stay in touch — would be great to hear your thoughts as this evolves. You can DM me here

Collapse
 
unitbuilds profile image
UnitBuilds

Sure thing, something I'd say would give alot of insight into the potential of it, is Big Hero 6. Yes, that's a kids movie with a nanny bot, but in principle, it's the same concept, taking care of people, by assessing the situation. For biometrics, LLMs tend to be smart enough to understand the context of it, just create an api for it and anomaly events, eg. heart rate suddenly spikes, it sends the data to the LLM to interpret, should be a good starting point and very minimal effort to integrate?

Thread Thread
 
soulchat_official profile image
Ricky

Big Hero 6 — that's actually a great parallel. Baymax was never about replacing human care, just being there when no one else could be. That's the same line I'm holding with SOULCHAT.

And you're right about the API approach — LLMs are already good at interpreting context. The challenge isn't the tech, it's the design: how do we make sure alerts feel like care, not noise? How do we keep the tone warm, not clinical?

This is genuinely helpful. I'm going to think more about the biometrics integration as a lightweight layer rather than a full rebuild.

Thanks for pushing my thinking on this. I'll keep you posted as it evolves.

Thread Thread
 
unitbuilds profile image
UnitBuilds

Essentially, biometrics are just a db and mcp calls. It adds context, not overrides, so it's a pretty easy hook with some open standard apis. The tone, etc. you have 2 options, either you can use a system instruction, or you can use a LoRA is you own the model and the runtime. Though imo, stick to system instruction and skills files, that way you dont dilute it's intelligence.

Collapse
 
crdtcto profile image
Kane Lim

Hello Glad to see you, I am Kane Lim from Hong Kong. I have over 10 years of development experience. I am writing this because your post was interesting.

The architecture is compelling, especially the combination of persistent memory, persona consistency, and proactive orchestration. I would strengthen it with a dedicated safety middleware layer that evaluates every interaction before generation and after generation.

For memory, I would use semantic retrieval with recency weighting, confidence scores, explicit consent metadata, encryption key rotation, and selective forgetting. For persona stability, contradiction detection and automated behavioral evaluation could continuously measure drift.

I would also reconsider the end to end encryption terminology around PBKDF2 and Fernet. If the server can access plaintext memory, it is application level encryption rather than true end to end encryption.

The project has serious engineering potential. I would be happy to exchange ideas around the memory and safety architecture.

Collapse
 
soulchat_official profile image
Ricky

Kane, thank you for this — truly appreciate the depth of your review. 🙏

Honestly, most of my energy right now is going into making the product feel more human — getting the memory right, making the conversations warmer, building something that actually feels like a companion rather than a tool. The encryption layer is something I haven't dug deep into yet — your suggestions are incredibly helpful and give me a clear direction to explore.

I'd really love to stay in touch and exchange ideas as this evolves. Would you be open to connecting? You can reach me at [17621119762@163.com] — I'd be happy to continue the conversation there or here on DEV.

Looking forward to learning from you.

Collapse
 
crdtcto profile image
Kane Lim

I am glad to hear that my reply was of some help.
I would like to get to know you better. Would you please contact me? You can find contact information in my Bio.

Collapse
 
unitbuilds profile image
UnitBuilds

On a technical note though, I'd suggest for memory data, keep it in PostGreSQL, they upgraded ALOT and there's even vector search now, so it's blazing fast for LLM knowledge bases. For the encryption, just remember you need encryption in transit and encryption at rest. AES + PostGreSQL would give you a hardware accelerated stack that keeps it safe E2E without degrading performance, while being scalable to millions of users.

Collapse
 
soulchat_official profile image
Ricky

Great technical insights — thank you for taking the time to share this. 🙏

On PostgreSQL + vector search: you're absolutely right, it's a solid choice and the hardware-accelerated encryption aspect is compelling. I'm currently using sentence-transformers with a different backend, but I'll definitely look into PG's vector capabilities — especially if it can simplify the stack while scaling better. Appreciate the tip.

On encryption: agreed on both in-transit and at-rest. I'm using PBKDF2 + Fernet currently. AES + PG is an interesting thought — I'll run some benchmarks.

Collapse
 
shifa_2 profile image
Shifa

your writing skills are amazing
check out my new post : dev.to/shifa_2/dont-click-this-if-...

Collapse
 
soulchat_official profile image
Ricky

Thanks for reading! I'll be writing more technical deep dives on memory, identity, and encryption in the coming weeks. If you have questions or ideas, I'd love to hear them. 🧡