Addon:ChatWithTree
Contents
ChatWithTree Addon
Imagine having an intelligent interpreter to query your family history. The ChatWithTree Gramplet addon for Gramps brings this to life by connecting your rich genealogy data directly with the power of a Large Language Model (LLM). This tool 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!
Overview of features
- ChatWithTree shows a chat like interface
- Select 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 looks into 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
- The Gramplet is build for Gramps version 6
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:
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.
Add ChatWithTree to the Gramps Dashboard
The ChatWithTree addon is a Dashboard addon. This means that the addon displays on the default Grampls Dashboard.
After installing the addon via the addon-manager, go to the Dashboard and add ChatWithTree by right clicking and installing in the dashboard.
Using ChatWithTree
In the textbox at the bottom of the screen you can:
- start a chat by sending a text message or - send commands by starting a message with a slash /
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 succesfull you can interact with the model:
Note the colour 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.
How does it all work?
The ChatWithTree is build in such a way that it sends off a list of "tool names" to the LLM, and based on the message send, 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 digest 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?
A word about privacy
Privacy warning. The ChatWithTree 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/




