Addon:ChatWithTree
This is a Third-party Addon. The Addon/Plugin system is controlled by the Plugin Manager. Please use carefully on data that is backed up, and help make it better by reporting any issues to the bug tracker. |
|
You may install the external addon project manually. See Installation
|
|
Privacy warning - addon requires Internet access for external LLM models The Chat With Tree Gramplet addon uses tools to query your Gramps database, and sends via the Internet the found information to the LLM's. When you use remote LLMs that are running in the cloud on the Internet, for example via OpenRouter, be aware that your local data is sent to those models! If privacy is your concern, then always ensure to run this tool only with local running LLM models, for example using a local setup with tools that enable running LLMs locally. One example of that is with https://www.ollama.com/ |
The Chat With Tree Gramplet is an intelligent interpreter to query your family history. It does this by connecting your rich genealogy data directly with the power of a Large Language Model (LLM). This Gramplet transforms your family tree into an interactive chatbot, allowing you to literally "talk with the tree" to ask complex questions about relationships, details, and connections within your Gramps database using natural language queries!
- Features
- Shows a chat like interface
- Select Large Language Model (LLM) models from several different AI providers
- Apart from the free local models using self-started tools (ollama), you can also connect to hosted sites for openai, anthrophic, openrouter etc, all thanks to the llm python model
- You have to create an API key for the model that you want to use
- Start anywhere in your tree using the “search by name” tool
- Person information searches the person notes of Gramps to tell about the people found
- When the AI bot is thinking, it shows the thinking in the chat - showing the strategy to answer difficult questions
Usage
Add and install the external ChatWithTree project along with the required litellm Python module prerequisite and then add the Chat With Tree Gramplet to the Dashboard view.
In the Chat With Tree Gramplets empty textbox entry field at the bottom of the screen you can:
- Start a chat by typing a text message and pressing the Send button or
- Send commands by starting a message with a slash
/see the ChatWithTree Commands section.
You always have to select a chat-model first so that the tool knows what LLM is to be used for interacting with the genealogy tree.
When you select a certain chat-model, you will have to have set a valid API key as an environment-variable for that model before starting Gramps!
Above example shows what happens when the model does not have a valid API key set. When using local models this is not an issue.
Example chat - what chat balloons are visible?
When the interaction with a LLM model is successful you can interact with the model:
Legend
Note the color of the balloons.
- The green balloons are what I have typed above
- The yellow balloons show the “thinking strategy” how the AI model is going to use the tools that are provided - there will always be one balloon showing what local tools have been used to read Gramps database information.
- The last blue balloon is the final answer of the AI model.
Commands
These commands control the settings of the Chat With Tree Gramplet addon:
/help- shows a generic help text/history- show the full chat history in JSON format/setmodel <model_name>- set the model name to use for the LLM/setlimit <number>- set the tool-calling loop limit (6-20)
/help command
The /help command shows generic help text.
/history command
The /history command shows the full chat-history of what Chat With Tree Gramplet has gathered in memory. This is a very verbose version of the chat, with a some internal ways of showing information like Javascript Object notation (JSON) - mostly interesting if you want to know in detail what conversation the addon has been doing with the LLM
/setmodel command
With the /setmodel command you select the model the Chat With Tree Gramplet addon opens up the conversation. Some examples are:
/setmodel ollama/deepseek-r1:1.5b/setmodel openrouter/moonshotai/kimi-k2:free/setmodel gemini/gemini-2.0-flash/setmodel ollama/gpt-oss:120b-cloud/setmodel openrouter/z-ai/glm-4.5-air:free
/setlimit command
Set the tool calling loop limit (a number between 6 and 20). A low number ensures a quicker final response, preventing certain models to continuously try calling the same tools. For questions that would take a lot of interactions, a limit of 20 might be feasible.
How does it all work?
The Chat With Tree Gramplet is built in such a way that it sends off a list of "tool names" to the LLM, and based on the message sent, will determine what tools it needs to respond. The tools in the respond execute an interaction with your Gramps database, and the results are then send back to the LLM again, so that the LLM can process the information for an answer.
This interaction between tool calling, thinking of the model, is shown in the ```yellow balloons```.
You will find out that certain models are way better, or smarter, in this tool calling task then other models. As an example, try asking the model a very difficult question. Example:
From the start person of this genealogy tree, can you tell me all names going back in time by following the mother, then the father, then the mother, then the father, and so on, until you do not find a person anymore? Name all these people with their birth dates, and based on the birth locations, and occupations of these people, based on your own knowledge of these places, can you tell me the most likely family heritage we are looking into?
Privacy warning
Privacy warning. The Chat With Tree Gramplet addon uses tools to query your Gramps database, and sends off the found information to the LLM's. When you use remote LLMs that are running in the cloud, for example via OpenRouter, be aware that your local data is send to those models! If privacy is of your concern, then always ensure to run this tool only with local running models, for example using a local setup with tools that enable running LLMs locally. One example of that is with https://www.ollama.com/
Installation
You can install the Addon gramplet by adding a new project via Edit->Addon-manager Projects tab.
Add the following Project to the projects tab:
Summary: ChatWithTree
URL: https://raw.githubusercontent.com/MelleKoning/addons/refs/heads/myaddon60/gramps60/
The URL points to the source of the addon.
Next is to select the addon in the list of addons:
The addon is now installed, but not yet visible in Gramps.
Prerequisites
The following prerequisite is required before you can install the addon.
- litellm Python module
Enable the
Allow Gramps to install required python modules option on the Addon Managers - Settings tab
Add ChatWithTree to the Gramps Dashboard
After installing the addon via the Addon Manager, go to the Dashboard and Add a gramplet > Chat With Tree Interactive Addon. by right clicking and installing in the Dashboard View.
Issues
- ??? MS-Windows AIO is unable to install litellm Python prerequisite "ModuleNotFoundError: No module named 'ctypes.wintypes'" (see hidden comment for full error message)
- same error message as 0013921 S3 Media Uploader [ ImportError: cannot import name 'wintypes' from 'ctypes' (C:...\lib\library.zip\ctypes__init.pyc) ]
- already mention on PR see https://github.com/gramps-project/addons-source/pull/762#issuecomment-3239587788
See also
- ChatWithTree gramplet addon 2025/08/31 - introduction message of Gramps forum.
- ChatWithTree gramplet addition





