Skip to main content

Branching conversations for local LLMs via Ollama

Project description

🌿 Grove

Ever gone down a rabbit hole with your local LLM, only to lose your original train of thought? Grove fixes that.

Grove is a CLI chat tool for Ollama that lets you branch conversations — explore a tangent, then return to your main thread exactly where you left off, with no context bleed.

Think of it like Git, but for your chats.


The problem

Normal LLM chats are linear. Every tangent you explore gets mixed into the same context window. Ask about transformers, go deep on attention mechanisms, come back — and the model is now confused about what you were originally talking about.

Grove calls this context poisoning. Branching is the fix.


How it works

branch: main
you: explain how transformers work in ML
grove: Transformers use self-attention...

you: /branch attention
Branched into: attention

branch: main > attention
you: go deeper on self-attention specifically
grove: Self-attention allows the model to weigh...

you: /main
Jumped to: main

branch: main
you: how do transformers compare to RNNs?
grove: Unlike RNNs which process tokens sequentially...

The model answering that last question has no idea the attention branch ever happened. Clean context, every time.


UI

Grove ships with a full web UI — sessions on the left, chat in the middle, branch tree on the right.

Sessions — all your conversations, persistent across restarts
Chat — markdown rendered responses, model picker at the bottom
Branch tree — visual tree showing your current position, click to navigate


Requirements

  • Python 3.10+
  • Ollama installed and running
  • At least one model pulled — ollama pull mistral is a good start

Install

pip install grove-chat

Quickstart

# make sure Ollama is running
ollama serve

# start grove
grove-serve

Grove will launch the UI


Commands

If you want to use grove in the terminal

# start grove
grove
Command Description
/branch [name] Fork a new branch from current context
/switch <name> Switch into an existing branch
/parent Go up one level
/main Jump straight back to the root
/branches List branches from current node
/tree Show the full conversation tree
/merge Summarize this branch and inject into parent
/discard Drop this branch and return to parent
/session list List all saved sessions
/session new <name> Start a new named session
/session load <name> Resume a past session
/session delete <name> Delete a session
/model Switch Ollama model mid-conversation
/help Show help
/quit Save and exit

Sessions

Grove saves everything to ~/.grove/grove.db — a local SQLite file. Sessions survive restarts. Pick up exactly where you left off.

🌿 Grove — branching conversations for local LLMs

Available models:
  [1] mistral:latest
  [2] llama3.2:3b
Pick a model (1): 1

Saved sessions:
  [1] ml-research (last used 2026-04-12)
  [2] work-project (last used 2026-04-10)
  [n] New session
Pick a session (1):

API

Grove also ships with a local REST API — useful if you want to build a web UI, integrate with other tools, or just script your conversations.

grove-serve
# API running at http://localhost:7337
# Docs at http://localhost:7337/docs

Key endpoints:

GET  /sessions                      list sessions
POST /sessions                      create a session
POST /chat                          send a message
POST /chat/stream                   streaming response
POST /branch                        fork a branch
POST /merge                         merge branch into parent
GET  /sessions/{session}/tree       full tree as JSON
GET  /models                        list available Ollama models

Full interactive docs at http://localhost:7337/docs once the server is running.


Why Ollama?

Ollama is the easiest way to run LLMs locally — one command to install, one command to pull a model, and you're running Mistral, Llama, Gemma, DeepSeek or dozens of others entirely on your own hardware. No API keys, no cloud, no cost per token.

Grove is built on top of Ollama and works with any model you've pulled.

ollama pull mistral       # fast, great for most tasks
ollama pull llama3.2:3b   # lighter, good for slower machines
ollama pull deepseek-r1   # strong reasoning

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grove_chat-0.2.1.tar.gz (197.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grove_chat-0.2.1-py3-none-any.whl (198.5 kB view details)

Uploaded Python 3

File details

Details for the file grove_chat-0.2.1.tar.gz.

File metadata

  • Download URL: grove_chat-0.2.1.tar.gz
  • Upload date:
  • Size: 197.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for grove_chat-0.2.1.tar.gz
Algorithm Hash digest
SHA256 986aaf7b2354e56f8b8701df33f8b023232ada2a7fa1638f1088d672eb5d28fd
MD5 26a594d136e2e8b3829e18cf42ad67cc
BLAKE2b-256 d0ae34a5b0f24622bc2c7645e3a47d1f6810e82c90891c81ba9921651465cd8c

See more details on using hashes here.

File details

Details for the file grove_chat-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: grove_chat-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 198.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for grove_chat-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d4978a2894d45885f5348ec24aabae79d96a63d560747a1f6f037630724d6d4
MD5 d08cd01af6f9d2599a683b9d3fc1d215
BLAKE2b-256 2d809730c829b5994726abadf3193bbd222d913571c8acf5acb76368ea9971c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page