There are now a few options to use modern chatbot AI systems with Gramps, and so I thought I would list and highlight their uses. This post gives pointers and brief summary of the projects. If I left any out (or I made any mistakes), please let me know.
Note: some of the Gramps addons require additional Python packages. This hasn’t worked very well in the past, but there is a planned fix for a future release (maybe 6.1) so those addons should work much better without issue.
The projects:
Gramps Web API
The Gramps Web API has support for a AI Agent, and Gramps Web uses
it. It requires an OpenAI-compatible LLM connection, and uses Pydantic
AI infrastructure. It currently has 9 read-only tools:
- get_current_date
- search_genealogy_database
- get_person
- get_family
- get_event
- get_place
- filter_people
- filter_events
- filter_families
The search_genealogy_database is a sophisticated function that uses
either full-text search or vector similarity search against
pre-indexed representations of all Gramps objects, with the LLM
choosing the mode.
Resources
Gramps MCP
Gramps MCP also uses Gramps Web API under the hood. It has:
- Universal search using Gramps Query Language (from the
gramps_qlpackage) - Full-text search across all entities
- CRUD (Create, Read, Update, and Delete) operations for all major Gramps objects (person, family, event, place, source, etc.)
- Tree analysis tools (descendants, ancestors, statistics)
- Change tracking and relationship discovery
Tools, in detail
These tools allow reading data, and writing data.
Search & Retrieval
- find_type - Universal search for any entity type (person, family, event, place, source, citation, media, repository) using Gramps Query Language
- find_anything - Text search across all genealogy data (matches literal text, not logical combinations)
- get_type - Get comprehensive information about specific persons or families by ID
Data Management
- create_person - Create or update person records
- create_family - Create or update family units
- create_event - Create or update life events
- create_place - Create or update geographic locations
- create_source - Create or update source documents
- create_citation - Create or update citations
- create_note - Create or update textual notes
- create_media - Create or update media files
- create_repository - Create or update repository records
Analysis Tools
- tree_stats - Get tree statistics and information
- get_descendants - Find all descendants of a person
- get_ancestors - Find all ancestors of a person
- recent_changes - Track recent modifications to your data
Gramps MCP is a clever and powerful implementation, building on the
independence of Gramps Web API. But that does make it more complicated
to use for other uses outside of Gramps Web (or outside of web use in
general).
Resources
- GitHub - cabout-me/gramps-mcp: MCP server for AI-powered genealogy research with Gramps Web API · GitHub
- [Release] Gramps [Web] MCP v1.0 - Connect AI Assistants to Your Family Tree
Gramps EZ MCP
Gramps EZ MCP is a server that supports 14 tools. It uses some modern
Gramps features (like JSON), but also uses the slower SimpleAccess
API. MCP is a very useful API, and allows access to Gramps data from
outside of gramps.
A companion library of reusable database functions, libchatfuncs, was started alongside it. Development has since shifted toward in-process addons like GrampsAssistant, where the MCP layer is not needed — though the libchatfuncs tools may eventually be folded in there.
Resources
- GitHub - dsblank/gramps-ez-mcp: An easy to use MCP server to talk to a Gramps genealogy family tree · GitHub
- A simpler Gramps MCP Server for chatbots
- New libchatfuncs by dsblank · Pull Request #763 · gramps-project/addons-source · GitHub
GrampsChat
GrampsChat is an OpenAI-based Agent that has 13 tools, and requires
litellm. Under the hood, it uses Gramps SimpleAccess. Gramps chat
was my first attempt at building a chatbot in Gramps desktop. I’ll
probably remove this in favor of GrampsAssistant (below).
Resources
- GrampsChat Addon for 6.0
- addons-source/GrampsChat at maintenance/gramps60 · gramps-project/addons-source · GitHub
ChatWithTree
ChatWithTree is a well-maintained addon with 15 read-only tools:
- start_point
- get_person
- get_family
- get_children_of_person
- get_mother_of_person
- get_father_of_person
- get_person_birth_date
- get_person_death_date
- get_person_birth_place
- get_person_death_place
- get_person_event_list
- get_event
- get_event_place
- get_child_in_families
- find_people_by_name
It shares a similar approach to GrampsChat — both require litellm and use SimpleAccess under the hood — but ChatWithTree has a substantially different architecture. One notable characteristic: it opens its own separate database connection rather than plugging into the running Gramps session, which means it cannot control or update the Gramps UI.
Resources
- addons-source/ChatWithTree at maintenance/gramps61 · gramps-project/addons-source · GitHub
- ChatWithTree gramplet addon
GrampsAssistant
Gramps Assistant is a PR at the moment, but I hope to finish it up soon. It has no Python dependencies (no litellm required) and is wired directly into the running Gramps Gtk desktop session, so it knows which person is currently selected and can control the Gramps UI. It can also write Gram.py Scripts that can do additional functions (such as change data).
It has 26 tools, grouped roughly as:
Database queries — look up people, families, events, and statistics by Gramps ID or by relation to the active person:
get_person_details, get_active_person, get_home_person, get_database_statistics, get_person_events, get_children, get_siblings, get_ancestors, is_person_alive, find_relationship
UI control — navigate the Gramps window and apply sidebar filters so results appear on screen:
switch_to_view, search_in_view, get_view_results, set_active_person, edit_active_person, filter_people, filter_families, filter_events, filter_places, filter_sources, filter_citations, filter_media, filter_repositories, filter_notes
Scripting — write and execute a Gram.py Script for complex or custom queries; the generated code is shown to the user so they can learn and re-run it themselves:
execute_script
Web — look up historical context on Wikipedia:
search_wikipedia
Gramps Assistant tools don’t actually filter data or edit data (as the tool names might suggest) but rather uses the Gramps UI to do those things. The guiding idea is to surface Gramps’ own capabilities rather than duplicate them in functions that the user has no access to. (Suggestions welcome!)