Skip to content

rjspence3/ContextOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContextOS — The Graph Mind

A persistent context layer for Chrome that builds a living knowledge graph of your browsing — turning every AI conversation into searchable, connected memory.

ContextOS captures conversations from Claude, ChatGPT, and other AI tools as you browse, stores them in a local graph + vector database, and surfaces relevant context when you need it. Think of it as long-term memory for your AI assistant sessions.

Features

  • Knowledge Graph — Entities, concepts, and relationships extracted from every AI conversation using KuzuDB
  • Semantic Search — Vector-indexed memory with LanceDB for similarity-based retrieval
  • Chrome Extension — Passively captures chat context from Claude.ai and ChatGPT with zero friction
  • DSPy Extraction Pipeline — Kimball-style entity extraction optimized for consistency and accuracy
  • Local-First — All data stays on your machine; no cloud sync required

Tech Stack

Layer Technology
Backend Python, FastAPI
Graph DB KuzuDB
Vector DB LanceDB
Extraction DSPy (MIPROv2 optimized)
Extension Chrome Manifest V3
Models OpenAI GPT-4 / compatible

Getting Started

Prerequisites

  • Python 3.11+
  • Chrome browser

1. Server Setup

cd server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

2. Configuration

Copy .env.example to .env in the server/ directory and fill in your keys:

cp server/.env.example server/.env

3. Start the Server

cd server
uvicorn main:app --port 8742

4. Load the Chrome Extension

  1. Navigate to chrome://extensions
  2. Enable Developer mode (top right toggle)
  3. Click Load unpacked → select the extension/ directory

The extension will begin capturing AI conversations automatically once loaded.

Architecture

Chrome Extension (content scripts)
    ↓ HTTP POST
FastAPI Server (port 8742)
    ↓ extract entities/relationships
DSPy Pipeline → KuzuDB (graph) + LanceDB (vectors)
    ↓ query
Context API → returned to extension on demand

Project Structure

.
├── extension/          # Chrome extension (Manifest V3)
│   ├── content.js      # Page scraper for Claude/ChatGPT
│   └── popup/          # Extension UI
└── server/             # Python backend
    ├── main.py         # FastAPI app
    ├── graph/          # KuzuDB schema + queries
    ├── vectors/        # LanceDB indexing
    └── extraction/     # DSPy extraction pipeline

Status

Active development. Core extraction pipeline and Chrome extension are functional.


Built with DSPy, KuzuDB, and LanceDB.

About

ContextOS — persistent context layer for Chrome. Builds a living knowledge graph of your browsing history automatically.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors