<?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: BryDepth</title>
    <description>The latest articles on DEV Community by BryDepth (@brydepth).</description>
    <link>https://dev.to/brydepth</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%2F4258005%2Fbcf10e54-0545-4155-a23e-a74e02a797bc.png</url>
      <title>DEV Community: BryDepth</title>
      <link>https://dev.to/brydepth</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brydepth"/>
    <language>en</language>
    <item>
      <title>How I Built a Multi-AI Workspace with Persistent Memory &amp; Tree Chats (Next.js + Supabase pgvector)</title>
      <dc:creator>BryDepth</dc:creator>
      <pubDate>Sat, 21 Nov 2026 22:25:56 +0000</pubDate>
      <link>https://dev.to/brydepth/how-i-built-a-multi-ai-workspace-with-persistent-memory-tree-chats-nextjs-supabase-pgvector-44h0</link>
      <guid>https://dev.to/brydepth/how-i-built-a-multi-ai-workspace-with-persistent-memory-tree-chats-nextjs-supabase-pgvector-44h0</guid>
      <description>&lt;p&gt;As a developer, my daily AI workflow used to look like a mess of open browser tabs. I was paying separately for ChatGPT, Claude, and Gemini—and worse, every time a conversation grew past a few thousand tokens, the model would forget my project architecture, coding preferences, or earlier decisions.&lt;/p&gt;

&lt;p&gt;I got tired of copy-pasting the same context over and over. So over the last few months, building solo from Sri Lanka 🇱🇰, I built &lt;strong&gt;&lt;a href="https://viryber.com" rel="noopener noreferrer"&gt;BryDepth&lt;/a&gt;&lt;/strong&gt;—an independent AI workspace designed around &lt;strong&gt;persistent long-term memory&lt;/strong&gt; and &lt;strong&gt;non-linear tree chats&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is a breakdown of the architecture and the lessons I learned shipping it.&lt;/p&gt;




&lt;p&gt;**## 1. The Core Problem: Linear Chats &amp;amp; Amnesia&lt;/p&gt;

&lt;p&gt;****Traditional AI chat interfaces have two structural flaws for real engineering work:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Context Amnesia:&lt;/strong&gt; Once a session ends (or the context window fills up), your preferences and project rules vanish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Linear Pollution:&lt;/strong&gt; If you want to test a quick edge-case or debug a side tangent, asking it in the main thread pollutes the context for everything that follows.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  2. The Architecture Behind BryDepth
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🧠 Living Memory Vault (&lt;code&gt;Postgres + pgvector&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Instead of relying purely on massive context windows, I built a structured extraction pipeline on &lt;strong&gt;Supabase (PostgreSQL + &lt;code&gt;pgvector&lt;/code&gt;)&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;7 Structured Categories:&lt;/strong&gt; Memories are automatically classified into technical preferences, active projects, architectural decisions, workflows, and goals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic Recall:&lt;/strong&gt; When you send a prompt, BryDepth embeds the query and retrieves only the most relevant memory vectors via Row-Level Security (RLS) isolated queries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Sovereignty:&lt;/strong&gt; Unlike black-box memory systems, users can inspect, edit, approve, or wipe any extracted memory inside the vault.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🌳 Tree Chats &amp;amp; Sub-Chats
&lt;/h3&gt;

&lt;p&gt;Every message node in BryDepth is stored as a parent-child relational tree rather than a flat array. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can &lt;strong&gt;fork any AI response&lt;/strong&gt; into a dedicated sub-chat to explore an alternative implementation, debug an error, or brainstorm—and then return to your main branch with zero context pollution.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ⚡ Multi-Model Routing &amp;amp; Workspace Copilot
&lt;/h3&gt;

&lt;p&gt;Different tasks need different engines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemini 2.5 Flash&lt;/strong&gt; for ultra-fast iteration and large-context synthesis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GPT-4o&lt;/strong&gt; for general reasoning and structured outputs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude 3.7 Sonnet&lt;/strong&gt; for deep code refactoring and architectural planning.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;BryDepth lets you switch models mid-workflow inside the same workspace without losing your memory state.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The Hardest Part Wasn't the Code
&lt;/h2&gt;

&lt;p&gt;Honestly, building the &lt;code&gt;pgvector&lt;/code&gt; pipeline and tree-state UI was the fun part. Getting global payments approved as a solo indie developer in Sri Lanka—after facing rejection after rejection from traditional merchant platforms—was the real boss fight.&lt;/p&gt;

&lt;p&gt;After months of persistence and compliance iterations, I finally integrated &lt;strong&gt;Dodo Payments&lt;/strong&gt; with a seamless dark-mode overlay checkout, allowing me to offer &lt;strong&gt;prepaid 30-day passes&lt;/strong&gt; with zero sneaky auto-renewals.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Out (14-Day Free Trial)
&lt;/h2&gt;

&lt;p&gt;If you're tired of repeating yourself to AI or juggling multiple subscriptions, give &lt;strong&gt;&lt;a href="https://viryber.com" rel="noopener noreferrer"&gt;BryDepth&lt;/a&gt;&lt;/strong&gt; a spin:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;14-day universal free trial&lt;/strong&gt; (no credit card required).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;30% Launch Discount&lt;/strong&gt; for the next 30 days using code &lt;strong&gt;&lt;code&gt;LAUNCH30&lt;/code&gt;&lt;/strong&gt; at checkout.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’d love to hear feedback from fellow devs on the memory categorization and tree-chat UX. Drop your thoughts or questions below! 👇&lt;/p&gt;

</description>
      <category>ai</category>
      <category>nextjs</category>
      <category>supabase</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
