Transform your AI conversations with visual branching - like Git, but for chat. Start a conversation, then branch off at any point to explore different directions without losing context.
ChatBranch lets you have non-linear conversations with AI models. Instead of a single thread of messages, you can branch your conversation at any point to explore alternative topics, approaches, or solutions. Think of it as version control for your thoughts and discussions.
π³ Branching: Create new conversation paths from any message without losing your original thread. Perfect for exploring "what if" scenarios or diving deeper into specific topics.
π― Navigation: Built-in undo/redo system lets you navigate between different conversation states and branches effortlessly. Use the arrow buttons to step back and forward through your conversation history.
ποΈ Visualization: Switch between Chat view (traditional message interface) and Tree view (visual diagram) to see the full structure of your branched conversations.
π€ Multi-Model Support: Seamlessly switch between different AI models (GPT-3.5, GPT-4, Claude) mid-conversation to compare responses or leverage different AI strengths.
- Right-click any message to create a new branch from that point
- Name your branches with descriptive labels for easy organization
- Branch colors help distinguish different conversation paths in tree view
- Independent contexts - each branch maintains its own conversation history
- Undo/Redo system for navigating between conversation states
- Branch switching to jump between different conversation paths
- Message selection to resume conversations from specific points
- Conversation persistence - all your work is automatically saved
- Interactive tree diagram showing your entire conversation structure
- Click any message in the tree to jump to that point
- Visual branch relationships to understand conversation flow
- Zoom and pan to navigate large conversation trees
- Switch AI models anytime during conversations
- Compare responses by branching and trying different models
- Model-specific capabilities - use the right AI for the right task
- Seamless transitions between different AI providers
- Test without API costs using built-in dummy responses
- Explore all features before connecting your own API keys
- Perfect for learning the branching workflow
- No setup required - works out of the box
- Create a new conversation with a descriptive title
- Type your message and send to start the conversation
- Choose your AI model from the dropdown (GPT, Claude, etc.)
- Get AI response and continue the conversation normally
- Right-click any message (yours or the AI's) in the conversation
- Select "Branch from here" from the context menu
- Name your branch (e.g., "Alternative approach", "Deep dive")
- Continue the conversation in this new direction
- Switch between branches using the branch selector
- Use undo/redo arrows (β βΆ) to step through conversation history
- Switch to Tree view to see the visual structure
- Click messages in tree view to jump to specific points
- Use branch selector to switch between conversation paths
- Conversation sidebar shows all your saved conversations
- Delete branches you no longer need (except main branch)
- Rename conversations by clicking the edit icon
- Automatic saving preserves all your work
- Compare different approaches to solving a problem
- Explore multiple angles of a complex topic
- Deep dive into specifics without losing the main thread
- Document your thinking process with clear visual structure
- Draft multiple versions of content in parallel branches
- Explore different writing styles or tones
- Develop ideas incrementally while preserving alternatives
- Collaborate with AI on creative projects
- Try different solution strategies in separate branches
- Compare AI model responses to the same problem
- Build on partial solutions without losing progress
- Document decision-making process with clear paths
- Explore concepts from multiple perspectives
- Create study guides with branching topics
- Compare different explanations of complex subjects
- Build knowledge trees that grow with your understanding
ChatBranch consists of a React frontend for the user interface and a FastAPI backend for data management and AI integration. All conversations are stored in PostgreSQL with a tree structure that preserves the branching relationships between messages.
- Tree-structured storage preserves conversation branching relationships
- Real-time updates keep the interface synchronized with your actions
- Efficient navigation with intelligent state management
- Scalable design ready for multi-user deployment
- URL-based routing for conversations - each conversation has its own URL
- Browser back/forward works for switching between conversations
- Within-conversation navigation uses the built-in undo/redo system
- Bookmarkable conversations - share specific conversation URLs
ChatBranch is currently in development mode with full LLM integration coming soon. You can explore all features using the built-in demo mode.
- No API keys required - test all features immediately
- Realistic dummy responses simulate actual AI conversations
- Full functionality including branching, navigation, and visualization
- Perfect for learning how branching conversations work
- Connect your own API keys for OpenAI, Anthropic, and other providers
- Real AI responses instead of demo content
- Advanced model switching with provider-specific features
- Usage tracking and conversation analytics
See QUICKSTART.md for detailed developer setup instructions.
Quick overview:
- Clone the repository and install dependencies
- Set up PostgreSQL database using provided scripts
- Run backend and frontend in separate terminals
- Open browser to http://localhost:3000
If you see errors about missing branches.is_active or messages.is_active (for example when upgrading branches or running the frontend), you can run the provided helper to add those columns safely:
From the repo root (uses the same DATABASE_URL your backend is configured with):
PowerShell (venv):
& "./venv/Scripts/Activate.ps1"
python backend\database\ensure_is_active_columns.pyOr, inside the running backend container:
docker compose exec backend python backend/database/ensure_is_active_columns.pyThis is an idempotent helper intended as a stop-gap; for production use create a proper Alembic migration.
The application runs locally on your machine with full data privacy and control.
ChatBranch is actively developed with new features being added regularly. The focus is on creating the most intuitive and powerful tool for branching conversations with AI.
- β Visual branching with right-click context menus
- β Tree visualization with interactive diagrams
- β Navigation system with undo/redo functionality
- β Multi-model support framework ready
- β Demo mode for testing without API costs
- π LLM integration coming soon
- π Multi-user support planned for future release
The codebase is designed for extensibility and contribution. Key areas for development include additional AI model integrations, advanced visualization features, and collaborative conversation tools.