Local-first project context engine for developers. Index your code and files, retrieve only what matters, and feed high-signal context into your AI workflows.
Your AI coding assistant re-scans your entire repo on every prompt. That is slow, expensive, and a big reason it hallucinates.
Obi fixes that. It turns your project files (code, docs, PDFs, images with OCR, spreadsheets) into a searchable context layer that runs entirely on your machine. Instead of re-sending an entire repo to an assistant each time, Obi retrieves high-signal chunks and packs targeted context for tools like Cursor or a local LLM.
The result is faster, cheaper, and more private project-aware assistance, with better grounding in your actual codebase.
The 30-second story:
- Ask Cursor a project question with no extra context (baseline).
- Ask the same question with Obi context retrieval enabled.
- Watch the speed and quality difference, with cited sources from the retrieved files.
- Mac-tier (developer laptop): Electron + React app, local indexing, SQLite + vector search, local OCR and embedding pipeline, private on-device retrieval.
- GX10-tier (higher-throughput target): same retrieval contract, scaled model serving and indexing throughput, larger context windows, concurrent query support.
- Shared abstraction: query-intent routing plus a context packer layer, so both tiers produce compatible context bundles for assistants.
Obi started fully local. For the BuilderShip hackathon it runs as a hybrid: local-first retrieval on-device, with sponsor infrastructure handling the heavier workloads and agent surface.
- Nebius for scalable inference and compute on the heavier embedding and generation workloads, while indexing stays local.
- Composio to expose Obi as a tool any agent can call.
- Tavily to extend local retrieval with live web search when the answer is not on disk.
The local-first contract stays intact. Your codebase never has to leave your machine for retrieval; the cloud tier only handles compute you opt into.
- Multimodal indexing: text, code, images, PDF, and XLS/XLSX metadata-text extraction.
- Hybrid retrieval: lexical (
FTS5) + semantic (sqlite-vec) + image embedding retrieval, fused into a single ranking. - Query intent routing: image-centric questions route to the image path; text-in-image requests route through OCR.
- Local-first execution: embeddings, retrieval, and context packing run on-device.
- Source-aware UX: indexed file metadata, skip history, and per-file unindex controls.
Status: v1 shipped (clipboard + standalone MCP server). Vector-aware MCP and embedded HTTP transport in design.
The goal is to let Cursor and other IDE agents request a compact, ranked context bundle from Obi over a stable contract, instead of re-scanning the repo every prompt.
Pieces in place:
- Context packer (
local-rag/src/utils/contextPacker.ts) turns top-KSearchResultchunks into a budgeted bundle. Per-modality formatting: text and code include content; image items expose an absolute path so the agent can attach the file itself. - Copy as Cursor context button in the chat retrieval panel writes the packed Markdown to the clipboard. Works with any agent that accepts pasted context.
- Standalone MCP server (
local-rag/mcp-server/) over stdio transport, exposingobi_search(query, limit?)to Cursor and Claude Desktop. Reads the sameapp.dbObi writes to (lexical FTS + filename match in v1; vector search lives in the Obi app for now). Seelocal-rag/mcp-server/README.mdfor~/.cursor/mcp.jsonwiring.
Next steps:
- Embedded HTTP/SSE MCP transport inside Electron, so semantic vector retrieval is available to MCP clients while Obi runs.
- Optional OCR and caption inlining for image items in the bundle.
- File-export "save bundle as .md" UI action.
Out of scope for v1: multi-repo federation, remote sync, write-back from Cursor.
- Ingest files from selected folders or manually picked files.
- Normalize and parse content (text / PDF / spreadsheet / image embedding).
- Chunk text-like content.
- Embed chunks and store vectors.
- Persist metadata and lexical index.
- At query time, fuse ranked results and pack a context bundle for the assistant.
Obi uses SQLite as local storage inside the app data directory on your machine.
- Persistent local storage, not temporary memory.
- Free and embedded, with no separate DB server to install.
- Ideal for single-user desktop apps with strong local privacy.
SQLite vs PostgreSQL: SQLite is an embedded file DB with zero admin, ideal for local desktop apps but limited on multi-client write concurrency. PostgreSQL is a networked client-server DB, better for multi-user backends and heavy concurrent writes, but it requires provisioning and operations. For Obi's local-first desktop architecture, SQLite is the right default.
Indexed data surfaces:
documents+chunks+chunks_fts+chunk_embeddingsfor text and code-like docsimage_documents+image_embeddings_clipfor imagesgmail_messages+gmail_sync_statefor Gmail metadata MVPindex_skip_eventsfor skip history and diagnostics (with retention cap)
Obi is connected to ongoing research on retrieval quality, context efficiency, and human-AI coding workflows.
Obi evaluates whether local, intent-aware retrieval can improve assistant response quality while reducing token and context overhead.
- Node.js
^22.13.0 - npm
- macOS or Windows
git clone https://github.com/himavanthkar/Personal_Vault.git
cd Personal_Vault/local-rag
npm install
npx electron-rebuild
# place required .gguf model files in local-rag/resources/models
npm run devcd local-rag && npm run build
cd local-rag && npm run lint- If macOS blocks local binaries (for example
llama-server), sign or trust the binaries before running. - Windows setup for llama.cpp binaries is documented in
local-rag/README.md.
local-rag/src— renderer UI (React)local-rag/electron— Electron main process, indexing, retrieval, vector storelocal-rag/resources— local models and runtime binaries
- App setup and platform notes:
local-rag/README.md - Focus mode technical notes:
local-rag/TECHNICAL_NOTES_FOCUS_MODE.md - Hackathon overview:
local-rag/HACKATHON_TECH_OVERVIEW.txt - Design notes, future work, generation-verification gap, verifier agents:
local-rag/DESIGN_NOTES.md - Cursor MCP server (stdio):
local-rag/mcp-server/README.md
- Built a local-first AI context system for project-aware development workflows.
- Implemented hybrid retrieval over mixed file types, including OCR-backed image support.
- Currently implementing Cursor context handoff (retrieval to context packer to adapter).
- Designed toward assistant handoff: retrieve once, send compact context, avoid repeated full-repo scans.
