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.


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

Grove will ask you to pick a model and a session, then you're chatting.


Commands

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.0.tar.gz (197.5 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.0-py3-none-any.whl (198.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grove_chat-0.2.0.tar.gz
  • Upload date:
  • Size: 197.5 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.0.tar.gz
Algorithm Hash digest
SHA256 abe2e1da51040435a6793d2730731049875f1265bc39247cd821807aebcb0183
MD5 d46513db4567e9f3bf42ac55a5ef5b5f
BLAKE2b-256 3c4c0fbf7a774c63c8d9569c85c52fa0eaf37d37840aab089d96d5074ffb2aec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grove_chat-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 198.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73a6ba95c324cd1e90617ce8ba38e0583fcb83134a1371201cebd9ab8576f23b
MD5 a472d38aa5a285c3a7350bcef9fa564b
BLAKE2b-256 87f23c0e7864ad8bf87f3d1a6091503b33dc1d8aa1317399cfb08ce671ba7c85

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