BranchGPT: Git-Style Branching for LLM Conversations
AI products · Creator, sole engineer · live
Long AI chats poison their own context. Every tangent and dead end stays in the history forever, burning tokens and diluting relevance, because a linear list is the wrong structure for how people actually think.
Open: https://branchgpt.siddhvasudev.com
How it works
Every message is a node in Neon Postgres; a Git-style tree lets you jump to any branch.
- Question → Answer
- Answer → Follow-up
- Follow-up → Merge
- Answer → Fork
- Fork → Tangent
- Tangent → Llama 3.3 summary
- Llama 3.3 summary → Merge
The detail
BranchGPT models the conversation as a graph. Every message is a node, and forking from any point creates a parallel branch that inherits the history up to that fork - so you can explore a tangent with full relevant context without polluting the main thread.
Merging is explicit and summarised by a language model, so the parent absorbs the insight rather than the entire transcript. The merge logic filters out shared history and appends only what is genuinely new, and the branch survives the merge rather than disappearing - because a branch that vanishes when merged makes people afraid to merge.
A visual tree sidebar renders the whole conversation graph for instant navigation.
Also shipped as a browser extension that injects the same branching model directly into an existing AI chat interface, storing everything locally.
Next.js 16, TypeScript, Drizzle, Neon Postgres, Groq.
What I did
- Designed and built the graph conversation model with branch inheritance
- Implemented LLM-summarised merging so the parent absorbs insight rather than transcript
- Made merges non-destructive so branches survive, removing the fear of merging
- Built the visual conversation tree navigation
- Shipped a companion browser extension injecting the same model into an existing chat interface with local-only storage
Stack
Next.js, TypeScript, PostgreSQL, AI Agent Development, Drizzle, Neon, Vercel AI SDK, Chrome Extension, IndexedDB
Case study: https://www.siddhvasudev.com/projects/branchgpt