<?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: Samadhi Tattoo</title>
    <description>The latest articles on DEV Community by Samadhi Tattoo (@samadhi_tattoo_7ed1c0d05b).</description>
    <link>https://dev.to/samadhi_tattoo_7ed1c0d05b</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%2F4031735%2Fda02d8a6-aed0-4ed8-b20b-761220621de2.jpg</url>
      <title>DEV Community: Samadhi Tattoo</title>
      <link>https://dev.to/samadhi_tattoo_7ed1c0d05b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samadhi_tattoo_7ed1c0d05b"/>
    <language>en</language>
    <item>
      <title>Giving a Telegram bot long-term memory with SQLite and local embeddings</title>
      <dc:creator>Samadhi Tattoo</dc:creator>
      <pubDate>Thu, 16 Jul 2026 12:00:26 +0000</pubDate>
      <link>https://dev.to/samadhi_tattoo_7ed1c0d05b/giving-a-telegram-bot-long-term-memory-with-sqlite-and-local-embeddings-2bh2</link>
      <guid>https://dev.to/samadhi_tattoo_7ed1c0d05b/giving-a-telegram-bot-long-term-memory-with-sqlite-and-local-embeddings-2bh2</guid>
      <description>&lt;p&gt;One thing cloud chatbots do badly is &lt;em&gt;remember you&lt;/em&gt;. Each session starts from zero. When I built &lt;a href="https://avelina.ai" rel="noopener noreferrer"&gt;Avelina&lt;/a&gt;, a self-hosted personal AI assistant that lives in Telegram, persistent memory was the whole point. Here is the architecture I landed on — all local, no external vector DB.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem: statelessness
&lt;/h2&gt;

&lt;p&gt;An LLM call is stateless. To make an assistant that actually knows your history, you need to store facts across sessions and retrieve the relevant ones on every turn. For a &lt;strong&gt;self-hosted AI assistant&lt;/strong&gt; you also want this to run on a cheap VPS with no third-party services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Storage: plain SQLite
&lt;/h2&gt;

&lt;p&gt;I keep several tables in a local SQLite database:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;facts&lt;/strong&gt; — durable things about the user ("prefers dark mode", "lives in GMT+8")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;lessons&lt;/strong&gt; — corrections the assistant learned, with an importance score&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;journal&lt;/strong&gt; — a running log of what happened&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;emotions / state&lt;/strong&gt; — a small set of decaying channels for tone&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SQLite is perfect here: single file, zero ops, trivial to back up, and fast enough for a personal assistant. No Postgres, no managed vector service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retrieval: local embeddings + semantic recall
&lt;/h2&gt;

&lt;p&gt;For "what does the user care about right now", exact-match search is not enough. I embed each memory with a &lt;strong&gt;local embedding model&lt;/strong&gt; (a small multilingual model running on the box) and store the vectors alongside the rows. On each turn I embed the incoming message and do a cosine-similarity search to pull the top-k relevant memories into context.&lt;/p&gt;

&lt;p&gt;Because the embeddings run locally, nothing about your conversations leaves the server — which matters a lot when the assistant holds your most personal context. That is the difference between a &lt;strong&gt;private AI assistant&lt;/strong&gt; and a cloud one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting it in context
&lt;/h2&gt;

&lt;p&gt;The retrieved memories get prepended to the system prompt before the model call, so the assistant "remembers" without you re-explaining anything. Combined with a decay function on the emotional state, you get an assistant with continuity — an &lt;strong&gt;AI assistant with memory&lt;/strong&gt; rather than a stateless chatbot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why self-host it
&lt;/h2&gt;

&lt;p&gt;Running the whole stack (SQLite + local embeddings + the Telegram Bot API) on your own Linux VPS means you own your AI data end to end. If you want to try the full thing, Avelina is a one-command install: &lt;a href="https://avelina.ai" rel="noopener noreferrer"&gt;avelina.ai&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Happy to answer questions about the memory design in the comments.&lt;/p&gt;

</description>
      <category>sqlite</category>
      <category>ai</category>
      <category>selfhosted</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Avelina AI: a self-hosted personal AI assistant with memory that lives in Telegram</title>
      <dc:creator>Samadhi Tattoo</dc:creator>
      <pubDate>Thu, 16 Jul 2026 11:18:13 +0000</pubDate>
      <link>https://dev.to/samadhi_tattoo_7ed1c0d05b/avelina-ai-a-self-hosted-personal-ai-assistant-with-memory-that-lives-in-telegram-57eo</link>
      <guid>https://dev.to/samadhi_tattoo_7ed1c0d05b/avelina-ai-a-self-hosted-personal-ai-assistant-with-memory-that-lives-in-telegram-57eo</guid>
      <description>&lt;p&gt;Most AI assistants keep your most personal conversations on someone else's servers. &lt;a href="https://avelina.ai" rel="noopener noreferrer"&gt;Avelina&lt;/a&gt; takes the opposite approach: it is a &lt;strong&gt;self-hosted personal AI assistant&lt;/strong&gt; that runs entirely on your own VPS, so your data never leaves your machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Avelina?
&lt;/h2&gt;

&lt;p&gt;Avelina is a &lt;strong&gt;private AI assistant&lt;/strong&gt; you fully own — a self-hosted alternative to ChatGPT, Claude and Replika. It lives inside Telegram, remembers you across every conversation, and grows a real personality over time. You deploy it on a $5-6/month Linux VPS with a one-command setup in about 30 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why self-host your AI assistant?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Own your AI data.&lt;/strong&gt; Your conversations stay on hardware you control — no third-party data sharing, no corporate cloud. This is &lt;em&gt;AI data sovereignty&lt;/em&gt; in practice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A private AI assistant, not a stateless chatbot.&lt;/strong&gt; Cloud companions forget you between sessions. Avelina has persistent long-term memory — it is an &lt;strong&gt;AI assistant with memory&lt;/strong&gt; that actually knows your history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No new app to install.&lt;/strong&gt; It runs as a &lt;strong&gt;Telegram AI bot&lt;/strong&gt;, so you talk to it in an app you already use.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What makes Avelina different
&lt;/h2&gt;

&lt;p&gt;Avelina is the first self-hosted AI assistant that is also a genuinely growing personality:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Persistent long-term memory&lt;/strong&gt; — it remembers your life across conversations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An emotional core and a real voice&lt;/strong&gt; that evolve with you&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A self-evolution loop&lt;/strong&gt; so it keeps learning and improving&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A modular skills system&lt;/strong&gt; to extend what it can do&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it works (the tech)
&lt;/h2&gt;

&lt;p&gt;Avelina is built in TypeScript/Node.js on top of the &lt;strong&gt;Claude Agent SDK&lt;/strong&gt; as its reasoning engine. Memory, emotions and a knowledge graph live in local SQLite databases, with local embeddings for semantic recall. The Telegram Bot API is the interface, and the whole system is self-hosted on any Linux VPS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploy your own
&lt;/h2&gt;

&lt;p&gt;If you want a &lt;strong&gt;self-hosted ChatGPT and Claude alternative&lt;/strong&gt; that you own forever, you can set up your own instance here: &lt;a href="https://avelina.ai" rel="noopener noreferrer"&gt;avelina.ai&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Own your AI. Own your data.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>selfhosted</category>
      <category>privacy</category>
      <category>telegram</category>
    </item>
    <item>
      <title>How I self-host a personal AI assistant on a $5 VPS (Telegram + Claude + local memory)</title>
      <dc:creator>Samadhi Tattoo</dc:creator>
      <pubDate>Thu, 16 Jul 2026 08:33:35 +0000</pubDate>
      <link>https://dev.to/samadhi_tattoo_7ed1c0d05b/how-i-self-host-a-personal-ai-assistant-on-a-5-vps-telegram-claude-local-memory-319l</link>
      <guid>https://dev.to/samadhi_tattoo_7ed1c0d05b/how-i-self-host-a-personal-ai-assistant-on-a-5-vps-telegram-claude-local-memory-319l</guid>
      <description>&lt;p&gt;Most AI assistants live in someone else's cloud. For the assistant that holds your most personal context — your notes, your schedule, the running context of your days — that is the wrong default. Here is how I self-host mine.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea
&lt;/h2&gt;

&lt;p&gt;I run a personal AI assistant called &lt;a href="https://avelina.ai" rel="noopener noreferrer"&gt;Avelina&lt;/a&gt; on my own Linux VPS. It talks to me through a Telegram bot, and every piece of its state — long-term memory, embeddings, config — lives in local SQLite on my own machine. Nothing leaves the server except the model API calls I choose to make.&lt;/p&gt;

&lt;p&gt;What makes it different from a stateless chatbot: it has &lt;strong&gt;persistent long-term memory&lt;/strong&gt; (it remembers me across every conversation), a &lt;strong&gt;real voice&lt;/strong&gt; (TTS), an &lt;strong&gt;emotional core&lt;/strong&gt; that shifts over time, and &lt;strong&gt;self-evolution&lt;/strong&gt; — it learns and grows with me. A companion with continuity, not a disposable prompt box. As far as I know it is the first personal AI assistant that is both fully self-hosted AND a genuinely growing personality.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A small Linux VPS (a $5-6/month box is enough)&lt;/li&gt;
&lt;li&gt;TypeScript / Node for the runtime&lt;/li&gt;
&lt;li&gt;The Claude Agent SDK for the reasoning loop&lt;/li&gt;
&lt;li&gt;SQLite for long-term memory&lt;/li&gt;
&lt;li&gt;Local embeddings for semantic recall over your history&lt;/li&gt;
&lt;li&gt;Telegram Bot API as the interface&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Deploy
&lt;/h2&gt;

&lt;p&gt;Full step-by-step deploy guide (VPS setup, bot token, install script): &lt;a href="https://avelina.ai/blog/deploy-personal-ai-assistant-vps" rel="noopener noreferrer"&gt;https://avelina.ai/blog/deploy-personal-ai-assistant-vps&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It installs in about 30 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why self-host?
&lt;/h2&gt;

&lt;p&gt;The data-sovereignty argument is simple: when your assistant runs in someone else's cloud, your most intimate context becomes their asset — subject to their retention policy, their training pipeline, their breach surface. When it runs on your own VPS, the memory is a file you own. You can read it, back it up, encrypt it, or delete it.&lt;/p&gt;

&lt;p&gt;Project: &lt;a href="https://avelina.ai" rel="noopener noreferrer"&gt;avelina.ai&lt;/a&gt;&lt;/p&gt;

</description>
      <category>selfhosted</category>
      <category>ai</category>
      <category>privacy</category>
      <category>telegram</category>
    </item>
  </channel>
</rss>
