<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Monisha14206</title>
    <description>The latest articles on DEV Community by Monisha14206 (@monisha14206).</description>
    <link>https://dev.to/monisha14206</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4153416%2Fa417e365-3b09-4721-a292-f3a91817cabd.png</url>
      <title>DEV Community: Monisha14206</title>
      <link>https://dev.to/monisha14206</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/monisha14206"/>
    <language>en</language>
    <item>
      <title>When You Need Me 💛 — A Private AI Companion Built for a Friend</title>
      <dc:creator>Monisha14206</dc:creator>
      <pubDate>Mon, 05 Oct 2026 09:28:07 +0000</pubDate>
      <link>https://dev.to/monisha14206/when-you-need-me-a-private-ai-companion-built-for-a-friend-4k27</link>
      <guid>https://dev.to/monisha14206/when-you-need-me-a-private-ai-companion-built-for-a-friend-4k27</guid>
      <description>&lt;h1&gt;
  
  
  What I Built
&lt;/h1&gt;

&lt;h2&gt;
  
  
  When You Need Me 💛
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;When You Need Me&lt;/strong&gt; is a private AI companion built for a real friend.&lt;/p&gt;

&lt;p&gt;Sometimes someone we care about wants to talk, share how they feel, or simply have someone listen — but we may be busy, unavailable, or unable to respond immediately.&lt;/p&gt;

&lt;p&gt;I built this project to create a small bridge during those moments.&lt;/p&gt;

&lt;p&gt;Instead of building another generic chatbot, I wanted the AI to understand &lt;strong&gt;how I communicate&lt;/strong&gt; and combine that with what I know about my friend.&lt;/p&gt;

&lt;p&gt;The system can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analyze an approved sample of my conversations to create a &lt;strong&gt;communication-style profile&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Learn my tone, vocabulary, sentence style, emoji usage, humor, language mixing, and support style&lt;/li&gt;
&lt;li&gt;Build a &lt;strong&gt;friend profile&lt;/strong&gt; based on information I choose to provide&lt;/li&gt;
&lt;li&gt;Generate responses using the communication style + friend profile + current conversation&lt;/li&gt;
&lt;li&gt;Explain &lt;strong&gt;why a response feels like my communication style&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Run the AI &lt;strong&gt;locally using an open-weight model&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Provide safety handling for conversations involving serious distress&lt;/li&gt;
&lt;li&gt;Allow users to delete stored chats, profiles, memory, and other personal data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most importantly, the AI &lt;strong&gt;does not pretend to actually be me&lt;/strong&gt;. It clearly identifies itself as an AI companion inspired by my communication style.&lt;/p&gt;




&lt;h1&gt;
  
  
  Demo
&lt;/h1&gt;

&lt;h3&gt;
  
  
  🌐 Live UI Demo
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://monisha14206.github.io/when-you-need-me/" rel="noopener noreferrer"&gt;https://monisha14206.github.io/when-you-need-me/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The GitHub Pages version demonstrates the frontend experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  🎥 Full AI Demo
&lt;/h3&gt;

&lt;p&gt;The complete AI experience runs locally with Ollama and an open-weight model.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Demo video: &lt;a href="https://drive.google.com/file/d/1tFId9IJMRS3d-3FGy0tEpueLhSw4rFPG/view?usp=sharing" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1tFId9IJMRS3d-3FGy0tEpueLhSw4rFPG/view?usp=sharing&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Code
&lt;/h1&gt;

&lt;h3&gt;
  
  
  GitHub Repository
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/Monisha14206/when-you-need-me" rel="noopener noreferrer"&gt;https://github.com/Monisha14206/when-you-need-me&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository contains the complete frontend, backend, safety system, local AI integration, demo data, tests, and setup instructions.&lt;/p&gt;




&lt;h1&gt;
  
  
  How I Built It
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Frontend
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Vite&lt;/li&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Backend
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;FastAPI&lt;/li&gt;
&lt;li&gt;SQLite&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AI
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Ollama&lt;/li&gt;
&lt;li&gt;&lt;code&gt;llama3.2:3b&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Open-weight local inference&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Other
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Local-first data storage&lt;/li&gt;
&lt;li&gt;Rule-based safety layer&lt;/li&gt;
&lt;li&gt;Communication-style analysis&lt;/li&gt;
&lt;li&gt;Friend profile and memory system&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The basic architecture is:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             ┌─────────────────────┐
             │       Friend        │
             └──────────┬──────────┘
                        │
                        ▼
             ┌─────────────────────┐
             │   React Frontend    │
             └──────────┬──────────┘
                        │
                        ▼
             ┌─────────────────────┐
             │    FastAPI Backend  │
             └──────────┬──────────┘
                        │
            ┌───────────┼───────────┐
            ▼           ▼           ▼
      ┌──────────┐ ┌──────────┐ ┌──────────┐
      │  Style   │ │  Friend  │ │  Safety  │
      │ Analysis │ │  Profile │ │   Layer  │
      └────┬─────┘ └────┬─────┘ └────┬─────┘
           │            │            │
           └────────────┼────────────┘
                        ▼
             ┌─────────────────────┐
             │  Ollama / LLM       │
             │  llama3.2:3b        │
             └──────────┬──────────┘
                        │
                        ▼
             ┌─────────────────────┐
             │ Personalized Reply  │
             └─────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  1. Communication Style
&lt;/h3&gt;

&lt;p&gt;The user can provide an approved conversation sample.&lt;/p&gt;

&lt;p&gt;Instead of sending the entire conversation to a cloud AI service, the application extracts useful communication patterns such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tone&lt;/li&gt;
&lt;li&gt;Sentence length&lt;/li&gt;
&lt;li&gt;Vocabulary&lt;/li&gt;
&lt;li&gt;Emoji usage&lt;/li&gt;
&lt;li&gt;Punctuation&lt;/li&gt;
&lt;li&gt;Humor&lt;/li&gt;
&lt;li&gt;English/Telugu mixing&lt;/li&gt;
&lt;li&gt;Listening style&lt;/li&gt;
&lt;li&gt;Reassurance and advice style&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are converted into a communication-style profile.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Friend Profile
&lt;/h3&gt;

&lt;p&gt;The user can optionally provide information about their friend, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Personality&lt;/li&gt;
&lt;li&gt;Interests&lt;/li&gt;
&lt;li&gt;What makes them happy&lt;/li&gt;
&lt;li&gt;What makes them upset&lt;/li&gt;
&lt;li&gt;Preferred support style&lt;/li&gt;
&lt;li&gt;Humor preferences&lt;/li&gt;
&lt;li&gt;Topics to avoid&lt;/li&gt;
&lt;li&gt;Important boundaries&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  3. Response Generation
&lt;/h3&gt;

&lt;p&gt;The AI combines:&lt;/p&gt;

&lt;p&gt;Communication Style&lt;br&gt;
        +&lt;br&gt;
Friend Profile&lt;br&gt;
        +&lt;br&gt;
Current Conversation&lt;br&gt;
        +&lt;br&gt;
Approved Memory&lt;br&gt;
        +&lt;br&gt;
Safety Rules&lt;br&gt;
        ↓&lt;br&gt;
   Local Open-Weight LLM&lt;br&gt;
        ↓&lt;br&gt;
 Personalized AI Response&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Explainability
&lt;/h3&gt;

&lt;p&gt;The application can also explain why a response feels similar to the user's communication style.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Casual conversational tone&lt;br&gt;
Uses familiar expressions&lt;br&gt;
Short supportive sentences&lt;br&gt;
Matches the user's emoji style&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This makes the personalization more transparent instead of simply saying that the AI "knows" the user.&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Safety
&lt;/h3&gt;

&lt;p&gt;The application includes a safety layer that classifies conversations into different levels of emotional distress.&lt;/p&gt;

&lt;p&gt;For potentially serious crisis situations, the application does not simply let the language model generate an unrestricted response.&lt;/p&gt;

&lt;p&gt;Instead, the safety layer can intervene and provide a predefined supportive response that encourages reaching out to trusted people and appropriate emergency/professional support.&lt;/p&gt;

&lt;p&gt;The AI is also explicitly designed &lt;strong&gt;not to encourage emotional dependency&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It should never tell someone that they only need the AI or that the AI is their only source of support.&lt;/p&gt;


&lt;h1&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h1&gt;

&lt;p&gt;I chose open-source AI because this project deals with something extremely personal: &lt;strong&gt;private conversations and relationships&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Using a closed cloud AI API would mean sending potentially sensitive conversations to an external service.&lt;/p&gt;

&lt;p&gt;With a local open-weight model, the project can instead run the inference on the user's own computer.&lt;/p&gt;

&lt;p&gt;This provides:&lt;/p&gt;
&lt;h3&gt;
  
  
  🔒 Privacy
&lt;/h3&gt;

&lt;p&gt;Personal conversations can remain local.&lt;/p&gt;
&lt;h3&gt;
  
  
  🛠️ Control
&lt;/h3&gt;

&lt;p&gt;The developer can inspect and modify how the system works.&lt;/p&gt;
&lt;h3&gt;
  
  
  🧠 Customization
&lt;/h3&gt;

&lt;p&gt;The AI experience can be designed specifically for one person's communication style and use case.&lt;/p&gt;
&lt;h3&gt;
  
  
  💰 Accessibility
&lt;/h3&gt;

&lt;p&gt;The project does not require a paid proprietary AI API to function.&lt;/p&gt;
&lt;h3&gt;
  
  
  🌍 Open Innovation
&lt;/h3&gt;

&lt;p&gt;Open models and tools make it possible for students and independent developers to experiment with AI applications that would otherwise require expensive infrastructure or proprietary services.&lt;/p&gt;

&lt;p&gt;For this project, open innovation is not just about using free software.&lt;/p&gt;

&lt;p&gt;It gives me more control over &lt;strong&gt;where personal data goes, how the AI behaves, and how the system can be changed.&lt;/strong&gt;&lt;/p&gt;


&lt;h1&gt;
  
  
  Privacy &amp;amp; Safety
&lt;/h1&gt;

&lt;p&gt;Privacy is a core part of the project.&lt;/p&gt;

&lt;p&gt;The project is designed around:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Local AI inference&lt;/li&gt;
&lt;li&gt;No OpenAI/Claude/Gemini API&lt;/li&gt;
&lt;li&gt;No real private conversations in the repository&lt;/li&gt;
&lt;li&gt;Fictional demo data&lt;/li&gt;
&lt;li&gt;Data deletion controls&lt;/li&gt;
&lt;li&gt;Transparent AI identity&lt;/li&gt;
&lt;li&gt;Safety rules for high-risk conversations&lt;/li&gt;
&lt;li&gt;No encouragement of emotional dependency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The AI is &lt;strong&gt;not a therapist and does not replace real human support&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is intended to provide a temporary supportive interaction while encouraging connection with real people when needed.&lt;/p&gt;


&lt;h1&gt;
  
  
  What I Learned
&lt;/h1&gt;

&lt;p&gt;Building this project taught me that creating an AI application is not only about getting a model to generate a response.&lt;/p&gt;

&lt;p&gt;The harder questions were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What personal data does the AI actually need?&lt;/li&gt;
&lt;li&gt;What information should never be sent to the model?&lt;/li&gt;
&lt;li&gt;How can personalization happen without training a model?&lt;/li&gt;
&lt;li&gt;How do you prevent an AI from pretending to be a real person?&lt;/li&gt;
&lt;li&gt;What should happen when a conversation becomes unsafe?&lt;/li&gt;
&lt;li&gt;How can users understand why an AI generated a particular response?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions influenced the architecture as much as the choice of model.&lt;/p&gt;


&lt;h1&gt;
  
  
  Challenges
&lt;/h1&gt;

&lt;p&gt;The biggest challenge was balancing &lt;strong&gt;personalization and privacy&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I wanted the AI to feel familiar without simply feeding a person's entire chat history into an LLM.&lt;/p&gt;

&lt;p&gt;The solution was to separate:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Raw Conversation
       ↓
Communication Analysis
       ↓
Communication Profile
       ↓
AI Prompt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows the application to use communication patterns without continuously sending the original private conversation to the model.&lt;/p&gt;

&lt;p&gt;Another challenge was safety. A general-purpose LLM should not be responsible for making every safety decision, so I added a separate safety layer before response generation.&lt;/p&gt;




&lt;h1&gt;
  
  
  Future Improvements
&lt;/h1&gt;

&lt;p&gt;Some improvements I would like to explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Better multilingual support&lt;/li&gt;
&lt;li&gt;More sophisticated communication-style analysis&lt;/li&gt;
&lt;li&gt;Optional voice interaction&lt;/li&gt;
&lt;li&gt;Improved long-term memory controls&lt;/li&gt;
&lt;li&gt;More granular privacy settings&lt;/li&gt;
&lt;li&gt;Additional open-weight models&lt;/li&gt;
&lt;li&gt;Better mobile experience&lt;/li&gt;
&lt;li&gt;More explainable personalization&lt;/li&gt;
&lt;li&gt;Optional encrypted local storage&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  My Agent Session
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Optional&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you used an AI coding agent while building the project, I will include my agent session / development process here.&lt;/p&gt;




&lt;h1&gt;
  
  
  Prize Categories
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Primary category:&lt;/strong&gt; Open Source AI / AI Application&lt;/p&gt;

&lt;p&gt;The project uses an open-weight model through Ollama and keeps the core AI functionality local rather than depending on a proprietary cloud AI API.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Note
&lt;/h1&gt;

&lt;p&gt;I built &lt;strong&gt;When You Need Me&lt;/strong&gt; for a simple reason:&lt;/p&gt;

&lt;p&gt;Sometimes the person you want to talk to isn't available immediately.&lt;/p&gt;

&lt;p&gt;I don't want an AI to replace that person.&lt;/p&gt;

&lt;p&gt;I wanted to build something that can make the waiting period feel a little less lonely — while still being honest that it is an AI, keeping personal data under the user's control, and encouraging real human connection when it matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When you need me, even when I'm not immediately there. 💛&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>beginners</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
