TreeGPT 🌲

A branching conversation application that allows users to explore multiple AI responses to the same prompt, creating a tree-like conversation structure instead of a linear chat.

Project Screenshots

TreeGPT Node Visualization
TreeGPT Branching Conversation Interface

Inspiration

TreeGPT was inspired by the limitations of linear AI conversations. Traditional chat interfaces only allow users to follow a single conversation path, forcing them to start over when exploring alternative ideas. We envisioned a more natural way to interact with AI that mirrors how human conversations branch and evolve with different possible directions.

What it does

TreeGPT creates a branching conversation experience with AI. Users can:

  • Start conversations with an AI assistant
  • Create branches at any point to explore alternative responses to the same prompt
  • Visualize their conversation as a tree structure
  • Navigate between different conversation branches
  • Save and revisit their conversation trees
  • Share conversation branches with others

How we built it

We developed TreeGPT using a modern tech stack:

  • Frontend: Next.js with TypeScript and Tailwind CSS for a responsive UI
  • Backend: Node.js/Express server handling authentication and conversation management
  • Database: MongoDB for storing user accounts and conversation trees
  • AI: Anthropic's API for generating responses
  • Authentication: JWT for secure user sessions

Challenges we ran into

  • Implementing an intuitive UI for navigating complex conversation trees
  • Managing state across branching conversations
  • Optimizing API usage with Claude to balance costs and performance
  • Ensuring smooth transitions when switching between conversation branches
  • Handling error states with the external AI API gracefully