Your AI Chats Are Locked in Corporate Silos. I Built an Open-Source Vault to Rescue Them

Your AI Chats Are Locked in Corporate Silos. I Built an Open-Source Vault to Rescue Them

posted 3 min read

I Kept Losing Context Switching Between AI Tools — So I Built a Browser Extension That Remembers Everything

ContextVault Demo

Your AI conversations should not be trapped inside platforms.

The Problem

By 2025, most developers use multiple AI tools every day.

  • ChatGPT for quick questions
  • Claude for long reasoning
  • Gemini for research
  • Perplexity for analysis

But every platform stores conversations separately.

That creates a frustrating workflow:

  • Conversations get cut when context windows fill up
  • Switching platforms destroys continuity
  • Exporting chats is painful or incomplete
  • Your history is tied to accounts you don’t control
  • There’s no unified search across platforms

In short:

The knowledge you build with AI is trapped inside isolated silos.


Why Existing Solutions Didn’t Feel Right

Some tools try solving this problem, but they usually require:

  • Paid APIs
  • Backend servers
  • Account linking
  • Cloud syncing
  • Monthly subscriptions

I wanted something simpler.

A question kept bothering me:

What if every AI conversation stayed entirely inside the browser?

No backend. No accounts. No tracking.


The Solution: ContextVault

ContextVault is an open-source Chrome extension that captures AI conversations locally while you use platforms like:

  • ChatGPT
  • Claude
  • Gemini
  • Perplexity
  • Poe
  • DeepSeek
  • Grok
  • Microsoft Copilot

Everything stays on your machine.

No telemetry. No external storage.

ContextVault Screenshot


How It Works

Capturing AI conversations reliably turned out to be harder than expected.

There were two major problems:

1. Every platform has a different DOM structure

Selectors, layouts, and rendering logic differ completely between ChatGPT, Claude, Gemini, and others.

2. AI responses stream in real time

Messages arrive token-by-token instead of all at once.

To solve this, ContextVault uses a 6-layer architecture:

Adapters → Capture → Stream Assembler → Background Worker → Storage → Export

1. Adapters Layer

Each platform has its own adapter implementing a shared interface:

interface LLMAdapter {
  platform: Platform
  urlPattern: RegExp
  messageContainer: string
  userSelector: string
  assistantSelector: string
}

Each adapter knows how to:

  • Detect the platform
  • Locate messages
  • Handle UI differences

2. Capture Layer (DOM + Network)

This is the core system.

DOM Observer

A MutationObserver watches the conversation UI in real time.

It detects:

  • New messages
  • Streaming updates
  • Edited content

Network Monitor

The extension also patches:

  • fetch
  • XMLHttpRequest
  • WebSocket

This provides early access to streaming responses directly from network traffic.

Why both?

  • DOM reflects exactly what the user sees
  • Network capture improves streaming accuracy

Using both together dramatically reduced missed messages.


3. Stream Assembler

AI responses arrive in chunks like:

"Hel"
"lo "
"world"

The Stream Assembler rebuilds complete messages while handling:

  • Chunk merging
  • Duplicate removal
  • Completion detection

4. Background Worker

The background worker manages:

  • Active sessions
  • Conversation lifecycle
  • Deduplication
  • Streaming updates
  • Conversation linking

It also prevents duplicate saves during rapid streaming events.


5. Storage Layer (IndexedDB)

Everything is stored locally using IndexedDB.

Stored data includes:

  • Conversations
  • Drafts
  • Settings
  • Projects

Each conversation stores:

  • Platform
  • Messages
  • Timestamps
  • Model information
  • Tags
  • Conversation chains

No external database is used.


6. Export Layer

Conversations can be exported as:

  • Markdown
  • ZIP archives

Example output:

## User
How do I design a secure API?

## Assistant
Start with authentication, validation, and rate limiting...

Markdown Export


Privacy First

ContextVault was designed around one principle:

Your conversations belong to you.

So the extension:

  • Has no backend server
  • Uses no analytics or telemetry
  • Works fully offline
  • Only activates on supported AI domains
  • Never sends your conversations anywhere

Tech Stack

  • TypeScript
  • Manifest V3
  • CRXJS + Vite
  • IndexedDB
  • MutationObserver
  • JSZip
  • Vitest

Final Thoughts

AI tools are becoming part of how we think, not just how we code.

But memory between tools is still broken.

Every platform acts like a closed silo where conversations disappear the moment you switch workflows.

ContextVault is my attempt to fix that.

A lightweight browser extension that keeps your AI conversations portable, searchable, and fully yours.


GitHub: https://github.com/aliabdm/ContextVault

Demo: https://context-vault-two.vercel.app/

Portfolio: https://senior-mohammad-ali.vercel.app/

LinkedIn: https://www.linkedin.com/in/mohammad-ali-abdul-wahed-1533b9171/


More Posts

Your AI Doesn't Just Write Tests. It Runs Them Too.

Kevin Martinez - May 12

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelskiverified - Mar 19

Local-First: The Browser as the Vault

Pocket Portfolio - Apr 20

I Wrote a Script to Fix Audible's Unreadable PDF Filenames

snapsynapseverified - Apr 20
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

1 comment
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!