Skip to content

Releases: shubhsaxena2020/cortex

v0.5.0 — The brain that thinks back

Choose a tag to compare

@shubhsaxena2020 shubhsaxena2020 released this 13 Jun 17:36

v0.5 closes the gap v0.4 revealed: Cortex captured conversations but didn't capture learnings. The digest told me what topic a chat was about; it rarely told me what was concluded. v0.5 adds atomic-learning extraction (the high-signal layer), a daily journal (the user's own thinking, first-class), and cortex add (capture from anywhere a shell reaches). See docs/V05-THINKING.md for the reasoning.

Privacy-first desktop app: captures AI conversations from Claude, ChatGPT, and Gemini into a local knowledge graph. Nothing leaves your machine.

What changed

  • Atomic-learning extraction. After every capture, a local Ollama pass (llama3.2:3b in JSON mode, or CORTEX_EXTRACT_MODEL) extracts up to five short sentences capturing what was concluded, decided, or worth remembering. Each learning becomes a first-class memory (source='derived', derived_from=<parent.id>) — searchable, taggable, exportable like any other memory. The digest reads from learnings instead of parent chats; the parent stays as substrate.
    • Tolerant JSON parser handles common Ollama failure modes: markdown code fences, leading prose, trailing commas, {"learnings": [...]} envelopes.
    • Dedupe-against-existing logic so re-extracting a re-captured conversation doesn't duplicate.
    • Single-flight per parent id; null-safe when Ollama is down.
  • Daily journal — first-class memory type. New source='journal' memories, one per day. In-app Journal view (Ctrl+5): debounced autosave, recent-entries sidebar, paired-with-digest hint. CLI: cortex journal "what you've been thinking" for one-liners; cortex journal --edit opens $EDITOR on the day's entry; bare cortex journal prints today's entry. The user's own thinking lives alongside captured chats.
  • cortex add for terminal quick-capture. cortex add "scheduler-by-priority idea from podcast" --tag idea. Stdin-aware (echo "thought" | cortex add). Source defaults to cli. Bridges meetings, walks, podcasts to Cortex via voice-to-text or any shell pipe.
  • MCP server v0.5 — two new tools (cortex_extract, cortex_journal), totals 11. cortex_journal reads today's entry by default or upserts when content is supplied; cortex_extract returns derived learnings (or triggers extraction in the in-app context).
  • In-app Learnings panel on every memory's detail panel. Shows derived learnings as clickable cards; "extract" button kicks Ollama on demand. Derived memories show a "↑ Parent conversation" link back.
  • Schema v8 — memories.derived_from column + idx_memories_derived_from partial index (only indexes the derived rows) + idx_memories_journal_day for the hot "today's entry" lookup. Forward-only, idempotent.

What slipped (deliberately)

  • Local read-only web companion (cortex.local on the LAN). Smaller win than expected; deferred to v0.6 where it can be paired with mobile-friendly capture.
  • Encrypted P2P sync. Pushed to v0.6+ — single-machine is the common case and the engineering cost (key management, conflict resolution, NAT traversal) is enormous.

Verified this release

  • 453/453 tests green (434 → 453, +19 across extract / journal / MCP).
  • MCP smoke harness: 14/14 checks on the 11-tool surface.
  • CLI smoke: cortex add, cortex journal (write + read + edit + stdin), cortex recent --source cli all correct.
  • The CLI is pre-v7-DB tolerant — INSERTs don't reference v7/v8 columns, so it works against unmigrated DBs (the Electron app handles migration on its next launch).
  • npm run build clean across all three processes + worker chunk.

Stack

Electron 31 · React 18 · TypeScript 5 · Tailwind 3 · better-sqlite3 12 · sqlite-vec 0.1 · Fastify 5 · D3 7 · Zustand 4 · Vitest 4 · local Ollama (all-minilm for embeddings, llama3.2:3b for summarization + extraction, both optional with graceful degradation). 453/453 tests passing.

v0.4.0 — Cortex finds you, not the other way around

Choose a tag to compare

@shubhsaxena2020 shubhsaxena2020 released this 13 Jun 17:36

Pivoted hard from the ROADMAP-as-written. The original v0.4 scope was code signing and themes; the actual v0.4 is the inversion that v0.3's MCP server kicked off — Cortex stops waiting to be opened. See docs/V04-THINKING.md for the full reasoning.

Privacy-first desktop app: captures AI conversations from Claude, ChatGPT, and Gemini into a local knowledge graph. Nothing leaves your machine.

What changed

  • cortex CLI — a real terminal companion. cortex search "auth flow", cortex recent --tag rust --limit 20, cortex digest, cortex export <id>, cortex stats, cortex tags, cortex pin <id>, cortex unpin <id>, cortex pinned. Pipeable (snippet-only output on non-TTY for | grep, | head), greppable, opens the same FTS5 + sqlite-vec + Ollama stack the MCP server uses. Both Bash (cli/cortex) and CMD (cli/cortex.cmd) launchers ship; npm run cortex -- <cmd> works locally without PATH setup.
  • Local Ollama summarization with llama3.2:3b (or CORTEX_SUMMARY_MODEL). Two summaries per memory — one-line (≤20 words) and paragraph (≤80 words) — cached in memory_summaries keyed on content hash. Stale summaries invalidate when content changes. Generation is null-safe: Ollama down ⇒ silent no-op, same pattern as embeddings.
  • MCP server v0.4: bandwidth fix + three new tools. cortex_search and cortex_get_memory return one-line / paragraph summaries instead of raw content, dropping the typical search-result payload from ~600 lines of raw chat to ~60 lines of distilled summary. Three new tools: cortex_digest, cortex_pinned, cortex_pin. Pinned memories are prepended to every cortex_search envelope. Tools went 6 → 9.
  • Daily / weekly digest (cortex digest + in-app view, Ctrl+4). Groups recent captures by top tag, surfaces one-line summaries, clickable in the app to drill into the editor. Two-second read on the CLI for morning-coffee use.
  • Pinned memories — per-memory star toggle in the detail panel; pinned set surfaces at the top of the sidebar and prepends to every MCP search response. The "user-IS" surface the 13 seed memories revealed was missing.
  • Medium-zoom edge LOD fix — graph perf top-up. Edge strength threshold rises with visible-edge count; mention edges drop above 4k visible nodes. Buys back the one remaining sad zoom band from v0.3.
  • Schema v7 — memory_summaries table + memories.pinned column + idx_memories_pinned. Forward-only, idempotent, runs at first launch.

Why this scope, not the ROADMAP's

The original v0.4 ROADMAP was distribution + polish: code signing ($300/yr), Linux AppImage, auto-update, dark/light themes, accessibility, keyboard graph navigation. All of that is future table-stakes — and none of it makes Cortex genuinely indispensable to someone using it daily. Per docs/V04-THINKING.md:

The product is half-passive on intake and fully active on retrieval. A second brain that waits to be asked is a filing cabinet. The thing it needs to become is the thing that finds me.

The CLI is the highest-leverage single thing I can ship — terminal users will reach cortex search 20× a day, never the Electron window. The summarization makes the MCP server's output composable with limited LLM contexts. The digest makes the app a habit instead of a tool. Pinning gives the user an explicit "always-relevant context" surface.

Verified this release

  • 434/434 unit + integration tests green (399 → 434, +35 across summarize/digest/MCP/CLI).
  • MCP smoke harness: 14/14 checks (handshake → 9-tool list → search → digest → pinned → create → error paths).
  • CLI verified live against the real DB: cortex stats, cortex search (semantic mode), cortex tags, cortex help all produce correct output.
  • npm run build clean across all three processes + worker chunk.

Stack

Electron 31 · React 18 · TypeScript 5 · Tailwind 3 · better-sqlite3 12 · sqlite-vec 0.1 · Fastify 5 · D3 7 · Zustand 4 · Vitest 4 · local Ollama (all-minilm 384d for embeddings, llama3.2:3b for summarization, both optional with graceful degradation). 434/434 tests passing.

v0.3.0 — Smart, linked, and 100k-ready

Choose a tag to compare

@shubhsaxena2020 shubhsaxena2020 released this 13 Jun 17:36

Cortex earns the name. Six of v0.3's eight roadmap items shipped (the kill criteria asked for at most five — we beat it), plus two items the criteria didn't anticipate: an MCP server turning the second brain into native Claude tool calls, and a graph performance overhaul that takes the canvas from 2.9 FPS at 100k+ nodes (v0.2) to 133 FPS settled.

Privacy-first desktop app: captures AI conversations from Claude, ChatGPT, and Gemini into a local knowledge graph. Nothing leaves your machine.

Headline features

  • Bidirectional [[wiki]] links + backlinks panel. Obsidian-style syntax ([[Title]] and [[Title|alias]]) persists as graph edges with a dedicated emerald color and a "wiki" signal type. Clickable in detail-panel previews and the editor's markdown preview; unresolved targets render muted as dangling links. New memories automatically resolve inbound links — if someone wrote [[Cortex Architecture]] before that memory existed, the link binds itself the moment the memory appears. Backlinks ("Linked mentions") section on every memory shows who points here.
  • Auto-tagging from content. Deterministic heuristic tagger weights title words 3× and prefers existing vocabulary tags (scaled by usage) over fresh keywords. No Ollama dependency — works fully offline. Lock semantics: first capture of an untagged conversation gets suggested tags; re-captures and user edits are never clobbered. Per-memory "suggest" button in the detail panel.
  • Embedding backfill UI. Visible progress bar in both the Settings AI panel and the status bar; pause at batch boundaries, resume restarts the scan. Skip reasons (Ollama down, model not pulled, vector search disabled) become actionable hints instead of silent no-ops.
  • Cortex MCP server. Six tools over stdio JSON-RPC 2.0 — cortex_search (FTS5 keyword + sqlite-vec semantic with auto-fallback), cortex_get_memory, cortex_list_memories, cortex_create_memory, cortex_related, cortex_stats. Zero new dependencies (hand-rolled dispatch beats @modelcontextprotocol/sdk's postinstall native-rebuild churn). Runs under Electron-as-Node because better-sqlite3 is compiled for Electron's ABI. Registered for Claude Code (project .mcp.json) and Claude Desktop (claude_desktop_config.json). Tested with 31 unit tests + a full end-to-end smoke harness against the live DB.
  • Graph performance overhaul: 125k+ nodes, no jank. Measured on a 60k-memory + 60k-file + 150k-edge fixture:
    • Far view (auto-fit, full graph in view): 7.5 ms/frame steady state — 133 FPS. (v0.2 measurement on the same hardware: 347 ms/frame, 2.9 FPS — 44× improvement.)
    • Cold open to first paint: 13–15 s at 125k nodes (the layout streams from tick 0 — early frames show physics organizing instead of a blank canvas).
    • Medium-zoom pan/zoom with ~40k edges on screen: 78 ms/frame (~13 FPS) settled — still degraded by per-edge stroke cost, but interactive instead of frozen.
    • Memory content no longer ships to the renderer. memories:getAll returns the LIGHT projection (id + title + tags + 200-char snippet); full bodies hydrate per selection. Editor mounts gate behind hydration so autosave can't write empty content over real data.
    • Mention edges computed in the main process behind a fingerprint cache. Renderer never tokenizes memory content.
    • Worker simulation scales by node count. ≥20k nodes drops forceCollide (its per-tick quadtree dominates the profile and the spacing it buys is sub-pixel at 100k zoom levels), raises Barnes-Hut theta to 1.2, cools faster, batches fewer ticks per post. Zero-copy typed-array init protocol — three ArrayBuffers instead of object arrays (structured-cloning 100k objects costs seconds).
    • Far-LOD scene cache. Clusters + bundled edge segments (deduped per pair, hard-capped at 6,000 segments) computed over the whole graph once per zoom band; reused across every pan/zoom frame in the band. Per-frame far cost becomes O(clusters), not O(nodes + links).
    • Density-override LOD. Visible-count override forces the cluster path whenever the frame would otherwise be unpayable, regardless of zoom band.
    • Flat-fill fast path above 1,500 visible nodes (no gradient, no shadowBlur per node — the rich style costs ~40 µs/node).
    • Adaptive quadtree leaf capacity (32 ≥ 20k points; 8 below). 4× fewer tree-node objects on big graphs with no measurable query-time hit.
    • Quadtree-local edge hover above 20k links — tests only edges incident to nodes near the cursor instead of the full O(links) scan.
    • Throttled position application. Worker batches are stashed (only the newest matters) and applied at 400 ms cadence — earlier code applied every batch, an O(nodes) copy + bounds pass that starved the main thread while the sim streamed per-tick.
    • Sidebar render cap at 300 rows. Mounting one DOM row per memory put 7+ MB of nodes in the React tree at 60k and froze first paint.

Shipped vs slipped (v0.3 kill criteria: ship ≥5 of 8)

Item Status
Bidirectional [[wiki]] links + backlinks panel ✅ Shipped
Auto-tagging from content ✅ Shipped
Embedding backfill UI ✅ Shipped
Saved searches / smart folders ✅ Shipped (search history + named saved searches + date-range filters)
Graph force simulation in a web worker ✅ Shipped in v0.2; further tuned here
Conversation summarization � Slipped to v0.4 — needs a second Ollama model (llama3.2:3b). Not worth blocking on.
Multi-model Ollama picker � Slipped to v0.4 — settings plumbing with no consumer until summarization exists.
db.test.disabled.ts → vitest-electron � Slipped to v0.4 — infra-only; live-process scripts + 399 unit tests cover the DB layer.

6/8 shipped — kill criteria exceeded.

Verified this release

  • 399/399 unit + integration tests green. npm run build clean across all three processes + worker chunk.
  • MCP server end-to-end smoke harness: 12/12 checks (handshake → tools/list → stats → search keyword → search semantic → get → related → create → round-trip → error paths).
  • Graph at 125,177 nodes / 175,087 edges: cold open to interactive in 13–15s; far-zoom steady state 133 FPS (7.5 ms/frame); pan/zoom never frozen.
  • Live verification via Chrome DevTools Protocol harness (scripts/cdp-fps2.mjs) — actual draw timings from the real renderer, not synthetic micro-benchmarks.

Migrations

  • Schema v6 unchanged from v0.2 (introduced idx_memories_source + ANALYZE). No migrations in this release.
  • Wiki backfill runs once at startup, LIKE-prefiltered so vaults with no wiki syntax pay one scan and zero writes.

Known limitations carried into v0.3.0

  • Medium-zoom pan/zoom still degraded at 5–10k visible nodes (~13 FPS). Far and close zoom are smooth; the middle band has 40k edges in view simultaneously and per-edge stroke cost dominates. v0.4 candidate: edge strength threshold rising with visible count, or OffscreenCanvas + WebGL.
  • Edge hover stops tooltipping at scale for edges whose endpoints are both far from the cursor (20k-link quadtree-local fallback). Acceptable trade-off.
  • Installer unsigned — SmartScreen will warn. Code-signing is v0.4 (~$300/yr in certs).
  • Windows-only installer — macOS DMG + Linux AppImage are v0.4.
  • Embedding 10k still takes ~5 min — Ollama CPU inference, not the script.

Stack

Electron 31 · React 18 · TypeScript 5 · Tailwind 3 · better-sqlite3 12 · sqlite-vec 0.1 · Fastify 5 · D3 7 (force sim in a Web Worker, scale-adaptive) · Zustand 4 · Vitest 4. 399/399 tests passing.

v0.2.0 — Graph Obsidian Match, Search 200ms p95, Web Worker Physics

Choose a tag to compare

@shubhsaxena2020 shubhsaxena2020 released this 05 Jun 17:41

v0.2.0 — Graph Obsidian Match, Search 200ms p95, Web Worker Physics

Cortex v0.2.0 makes the capture pipeline correct, fast, and observable. All five P0 items shipped, plus the graph got a ground-up rebuild matched to Obsidian's exact rendering values. Privacy-first as always: nothing leaves your machine.

What's New

  • Conversation deduplication (P0 #1) — the same chat captured twice updates one memory in place instead of forking the graph into duplicates (canonical-URL upsert).
  • Smart capture filtering (P0 #2) — empty, single-message, and system/tool-only chats are dropped at the content-script layer before they ever reach the app.
  • Graph, rebuilt (P0 #3) — viewport culling + Obsidian-style rendering (node radius, label fade, hover dim all matched to Obsidian 1.4.3's source values), force simulation moved to a Web Worker, and a 1.35M-edge explosion that turned the canvas black at scale was root-caused and fixed (inverted word→memory index).
  • Search under 200ms p95 (P0 #4) — keyword search swapped from LIKE scans to FTS5 MATCH with a dedicated index.
  • Feedback + opt-in local telemetry (P0 #5) — in-app feedback form (saved to disk) and an anonymous usage log that is OFF by default, never leaves the machine, and is fully viewable / exportable / deletable from Settings. Events are PII-redacted at write time (paths hashed, queries length-only).

Performance

  • Search: p95 86.6 ms on a 10,000-memory vault (FTS5), down from ~107 ms. Long-phrase queries dropped from ~99 ms to ~0.2 ms.
  • Graph: renders 10,000 nodes with physics on a Web Worker — the UI thread never blocks (Obsidian runs physics on the main thread and can stutter). Verified rendering live (non-background canvas pixels went from 0 / black to ~19k after the edge fix).
  • Embeddings: full 10k embed backfill in 5.2 min (≈2.1× faster after request-batching the Ollama calls; the remaining cost is Ollama's CPU inference, not Cortex).

Downloads

  • Cortex-0.2.0-win-x64-portable.zip (~123 MB) — recommended for this release. Portable Windows x64 build; no installer required.

NSIS installer (Cortex Setup 0.2.0.exe) is not in this release. It could not be built on the current machine: Windows 11 Smart App Control (Enforce mode) blocks the unsigned NSIS installer during the build's uninstaller-extraction step ("An Application Control policy has blocked this file"). The fix is code-signing, which is the v0.4 distribution milestone (requires a ~$200–400/yr Windows code certificate). Until then, use the portable zip. Note that an unsigned build may also be blocked by Smart App Control on end-user machines that have it enabled.

Known Issues

  • No signed installer / SmartScreen + Smart App Control. The build is unsigned (code-signing is v0.4). On machines with Smart App Control enabled, even the portable build may be blocked until signed.
  • Graph node zoom-scale not matched. Obsidian enlarges nodes when zoomed out (nodeScale = sqrt(1/zoom)); Cortex draws in simulation space where matching that explodes the hit-test envelope at low zoom. The larger 8–30px node radii recover most of the benefit. Deferred — see docs/OBSIDIAN-GAP-ANALYSIS.md.
  • Per-frame hover-alpha easing not implemented. Cortex redraws on demand, not every frame; hover dim is instant rather than eased.
  • In-graph settings panel not built. Obsidian's cog → force/size/fade sliders are deferred.
  • Embedding backfill is slow (~5 min for 10k) — bound by local Ollama CPU inference, not Cortex. A GPU or OLLAMA_NUM_PARALLEL closes the gap.
  • Extension is load-unpacked only; Windows-only build. Chrome Web Store listing and macOS/Linux builds are v0.4.

How to Test

A full Windows 11 first-run checklist is in docs/SMOKE-TEST-CHECKLIST.md — installer/portable run, DB init, extension pairing, capture + dedup, search, graph, telemetry/feedback, and edge cases, with PASS/FAIL fields and a "where to look when it breaks" section.

Installation

Portable (recommended): download Cortex-0.2.0-win-x64-portable.zip, extract it anywhere, and run Cortex.exe from the extracted folder. No install step. (On a machine with Smart App Control enabled you may need to right-click → Properties → Unblock, or the build must be signed.)

Installer: not available in this release — see the Downloads note above.


Stack: Electron 31 · React 18 · TypeScript 5 · better-sqlite3 12 · sqlite-vec 0.1 · Fastify 5 · D3 7 (force sim in a Web Worker) · Zustand 4. 245/245 tests passing.

Cortex v0.1.0-beta — Privacy-First Knowledge Graph

Choose a tag to compare

@shubhsaxena2020 shubhsaxena2020 released this 04 Jun 15:20

Cortex v0.1.0-beta — Pre-Release (Infrastructure)

This is a GitHub Pre-Release, not the latest release. v0.1.0 ships the plumbing — Electron app, sqlite-vec storage, Chrome extension capture pipeline, Ollama integration, D3 graph. The user-visible intelligence (dedup, summarization, auto-tagging, performance) lands in v0.2. If you're looking for a finished product, come back in Q3 2026 for v0.2. If you want to see how the pipeline works or stress-test the capture flow, you're in the right place.

Privacy-first desktop app: captures AI conversations from Claude, ChatGPT, and Gemini into a local knowledge graph. Nothing leaves your machine.

What works in v0.1.0-beta

  • Local-only memory store — better-sqlite3 + sqlite-vec for vector search, FTS5 for keyword fallback. No cloud, no telemetry.
  • Chrome extension capture — browser extension talks to the app over 127.0.0.1 and saves AI conversations to your vault as Markdown.
  • Extension pairing handshake — GET /health returns { app: 'cortex' }; the extension only trusts a server that returns that exact handshake. Bearer-token auth on every other route.
  • Vault on disk — your data lives as plain files in a folder you pick. Cortex never copies or moves files; it indexes them in place.
  • Knowledge graph — D3 force-directed view of memories + watched files + relationships.
  • Ollama integration (optional) — local all-minilm model (384-dim) for semantic search. Silent fallback to keyword search if Ollama is down or sqlite-vec fails to load.
  • Watch folder — point at any existing folder; Cortex auto-indexes the text files into the graph.

Stack

Electron 31 · React 18 · TypeScript 5 · Tailwind 3 · better-sqlite3 12 · sqlite-vec 0.1 · Fastify 5 · D3 7 · Zustand 4 · Vitest 4. 128/128 tests passing.

Try it (developer install, ~10 minutes)

The Windows installer is unsigned in this beta. SmartScreen will warn — that's expected. Code-signing is on the v0.4 distribution-polish list.

  1. Download Cortex Setup 0.1.0.exe (~83 MB) from the assets below and run it. Click More info → Run anyway on the SmartScreen prompt.
  2. Launch Cortex. First run routes you to Settings to pick a vault folder.
  3. (Recommended) Install Ollama and run ollama pull all-minilm for semantic search. Without it you get keyword search, which still works.
  4. Install the Chrome extension unpacked — see EXTENSION_SETUP.md. Web Store listing is v0.4.
  5. In Settings, click Pair Extension; open the extension popup and authorize within 60 seconds.
  6. Start a conversation on claude.ai / chatgpt.com / gemini.google.com. It auto-saves to your vault. Open Graph to see it.

Honest limitations

  • Windows-only installer. macOS DMG + Linux AppImage shipped in v0.4 (gated by Apple Developer enrollment + Windows code cert — see ROADMAP.md).
  • Installer unsigned. SmartScreen warning is real. Fix is v0.4, costs ~$300/yr in certs.
  • Extension load-unpacked only. Chrome Web Store listing is v0.4.
  • No installer smoke test on a third party's machine yet. If it crashes on yours, that's a v0.1.0 bug — please file an issue.
  • Graph slows past ~8000 nodes. LOD + viewport culling lands in v0.2.
  • Duplicate captures. Same conversation scraped twice creates two memories. Dedup is v0.2 P0.
  • No summarization / auto-tagging. v0.3.
  • DB integration tests parked (src/main/db.test.disabled.ts) due to better-sqlite3 ABI mismatch between Electron's Node (125) and vitest's Node (127). The DB code is covered end-to-end by scripts/integration-tests.mjs against the live Electron process. Proper fix (vitest-electron) is v0.3.

What v0.1.0-beta is asking for

Not press. Not stars (although the URL appreciates them). Install reports.

  • Did the installer run on your machine?
  • Did the extension pair on the first try?
  • Did your first captured conversation appear in the Notes view?

That's it. File issues with that level of detail and you've contributed more than any feature request can right now.

Roadmap

See ROADMAP.md for the full v0.2 → v1.0 plan. Reviewed via Claude Council; v0.2 was deliberately cut to 5 P0 items.


Issues / questions: https://github.com/shubhsaxena2020/cortex/issues