GenealogyKG
A knowledge graph over GEDCOM family-history files: people, families, events,
places and sources as nodes, lineage as edges, and a sqlite-vec index for
natural-language search. Built on the KGRAG fleet's shared kgmodule-utils
SDK, so it federates with the other knowledge graphs and speaks the fleet's
temporal contract.
See docs/USAGE.md for the complete guide -- every CLI command, the MCP server's tool reference, the curated corpus, and the living-person privacy model, with real examples.
Author: Eric G. Suchanek, PhD -- Flux-Frontiers, Liberty TWP, OH
Status: pre-alpha.
build,query,pack,analyze,status, ASCII lineage trees (ancestors/descendants), KGRAG federation, the place hierarchy, the living-person filter, snapshots, the 2-Dvizcharts and the 3-Dquilt/viz3drenderer all work end to end (Phase 1-5). Since then: a curated, committed corpus (corpora/entries/, 97 trees across 10 genres) withgenkg corpus survey/ingestto build and register it; bounded, normalized CLI and MCP inputs; deterministic resource cleanup and an MCP shutdown hook; a full MCP behavioral test suite and an enforced coverage floor; and field parity with kg-rag's own federation adapter. See docs/DESIGN.md for the phased build history.
Overview
GenealogyKG reads a GEDCOM 5.5 or 5.5.1 file and builds:
- a SQLite graph (
.genealogykg/graph.sqlite) withperson,family,event,placeandsourcenodes linked byCHILD_IN,SPOUSE_IN,PARENT_OF,MARRIED_TO,HAS_EVENT,OCCURRED_AT,CITESandWITHIN(place hierarchy:Cincinnati, Hamilton, Ohio, USAisWITHINHamilton, Ohio, USA, and so on up toUSA) edges - a sqlite-vec index (
.genealogykg/vectors.sqlite) over a prose summary of every record, so "chemists born in Cincinnati" finds Robert Hartwell occurred_start/occurred_endmetadata derived from birth, death and marriage dates, so a federated KGRAG query can scope the graph by time
pack returns the original GEDCOM record behind each hit, with line numbers.
The source file is read in place and never copied into the store.
Quick start
pip install genealogy-kg
# Build the graph (creates .genealogykg/ in the current directory)
genkg build --source family.ged
# Search
genkg query "emigrated from Yorkshire"
# Source-grounded snippets for an LLM context window
genkg pack "Hartwell marriages" --output context.md
# Lineage walks
genkg ancestors I7 --generations 3
genkg descendants I1
# Family trees as self-contained HTML (needs the `viz` extra)
genkg viz I1 --output tree.html
genkg viz I1 --view network --color-by generation --output family.html
# Generation depth, surnames, date coverage, people with no family links
genkg analyze
# Point-in-time metrics, tracked in git
genkg snapshot save
genkg snapshot list
# MCP server for Claude Code and other MCP clients
genkg-mcp --repo .
# No GEDCOM of your own? Build one of the 97 curated trees shipped in this
# repo -- see "The curated corpus" below.
genkg corpus ingest --genre samples --no-register
genkg descendants I0001 --repo corpora/entries/samples/bronte # the Brontë family
Installation
From PyPI
pip install genealogy-kg
pip install "genealogy-kg[adapter]" # + kg-rag, for KGRAG federation
pip install "genealogy-kg[viz]" # + plotly/pyvis, for `genkg viz`
pip install "genealogy-kg[viz3d]" # + PyVista/PyQt5, for `genkg quilt`/`viz3d`
Local development
git clone https://github.com/Flux-Frontiers/genealogy_kg.git
cd genealogy_kg
poetry install --with dev
poetry run pytest
Dev tooling is a Poetry group, not an extra: pip install genealogy-kg[dev]
does not exist. To also get the dockg and pycodekg CLIs that index this
repo itself, run poetry install --with dev,kg.
Configuration
genkg build --source records the file it used in
.genealogykg/config.json; later builds reuse it. To pin sources in the
project instead, list them in pyproject.toml:
[tool.genealogykg]
sources = ["family.ged"]
.gitignore excludes *.ged outside tests/fixtures/. GEDCOM exports
contain personal data about living people; keep them out of version control.
Living people
Before sharing a store, turn on the living-person filter and rebuild:
[tool.genealogykg]
sources = ["family.ged"]
living_cutoff_years = 100
unknown_birth_policy = "redact"
Anyone with no death or burial record who was born within the last 100
years is then stored as a bare person node named Living: their lineage
edges and sex are kept so trees still walk through them, but their name,
dates, events, notes and citations are dropped, and their name is withheld
from every family, spouse and parent mention too. A family with a living
spouse keeps its members but not its marriage details.
unknown_birth_policy controls records that have neither a usable birth
date nor a death/burial record. The default, "keep", preserves historical
data completeness and existing behavior. The conservative "redact" mode
withholds those uncertain records; this may also hide historical people whose
dates are simply incomplete. A death or burial record always counts as
affirmative evidence that the person is not living.
pack reads the GEDCOM file in place, so share the .genealogykg/ store
without the .ged file.
Git hook
genkg install-hooks writes a pre-commit hook that runs the repo's
pre-commit checks on every commit. Set GENKG_SNAPSHOT=1 on a
commit to also rebuild the store and save a snapshot; that is off by
default because a snapshot staged into the commit it describes can never
carry that commit's tree hash.
The curated corpus
corpora/entries/<genre>/<slug>/*.ged is a committed, curated set of 97
public GEDCOM trees across 10 genres (royalty, US presidents, corporations,
fictional characters, and more) -- unlike the benchmark corpora below,
these ship in the repo and are safe to build against directly, since
safety is enforced at the query/pack/MCP boundary rather than by curating
which files are let in. See
corpora/entries/NOTICE.md for provenance and
licensing.
genkg corpus survey # which entries are built, by genre
genkg corpus ingest --genre samples # build (and register with KGRAG)
See docs/USAGE.md for the full
genkg corpus reference.
Benchmark corpora
./scripts/fetch_corpora.sh downloads public GEDCOM files (the 1992
European royalty file, the US presidents file, the GEDCOM 5.5 torture test,
and a 200,000-person scale benchmark) into the gitignored corpora/
directory -- everything under it except corpora/entries/, which is
committed. docs/CORPORA.md lists each file, its
provenance and licence, and what it exercises.
Storage
.genealogykg/
graph.sqlite nodes and edges
vectors.sqlite sqlite-vec index (BAAI/bge-small-en-v1.5, 384-d)
snapshots/ point-in-time metrics, tracked in git
config.json source path used by the last build
KGRAG federation
GenealogyKG registers with kg-rag
as kind genealogy (KGKind.GENEALOGY) -- genkg corpus ingest is the
usual way entries get registered. Once registered, kgrag query and kgrag pack include people, families and events from every registered
GenealogyKG store alongside the fleet's other knowledge graphs, and a
federated query can scope by time using the occurred_start/occurred_end
metadata derived from birth, death and marriage dates.
Citation
Suchanek, E. G. (2026). GenealogyKG: Genealogical Knowledge Graph
(Version 0.1.0) [Software]. https://github.com/Flux-Frontiers/genealogy_kg
@software{suchanek_genealogykg_2026,
author = {Suchanek, Eric G.},
title = {GenealogyKG: Genealogical Knowledge Graph},
year = {2026},
version = {0.1.0},
url = {https://github.com/Flux-Frontiers/genealogy_kg}
}
License
Elastic License 2.0. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genealogy_kg-0.1.0.tar.gz.
File metadata
- Download URL: genealogy_kg-0.1.0.tar.gz
- Upload date:
- Size: 72.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
438b173b8d588a71950cf2615097a315953880517cc0baae74bac852f4cffbbf
|
|
| MD5 |
14228521d88e1e7471e9bc9511bd3b25
|
|
| BLAKE2b-256 |
6acb6d62c2c3c1ed4d262ea3c67aa7889952fbb9b9a30000aab71b48fd5a676e
|
Provenance
The following attestation bundles were made for genealogy_kg-0.1.0.tar.gz:
Publisher:
release.yml on Flux-Frontiers/genealogy_kg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genealogy_kg-0.1.0.tar.gz -
Subject digest:
438b173b8d588a71950cf2615097a315953880517cc0baae74bac852f4cffbbf - Sigstore transparency entry: 2655850637
- Sigstore integration time:
-
Permalink:
Flux-Frontiers/genealogy_kg@c24cb22b9c96a9c4a6e022ba7d12b8393cf8fcbe -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Flux-Frontiers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c24cb22b9c96a9c4a6e022ba7d12b8393cf8fcbe -
Trigger Event:
push
-
Statement type:
File details
Details for the file genealogy_kg-0.1.0-py3-none-any.whl.
File metadata
- Download URL: genealogy_kg-0.1.0-py3-none-any.whl
- Upload date:
- Size: 83.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a6d7efbaacb3eb7b8b37fd3ffcb27780526197b9f20b7ebdad7d24298ab8b34
|
|
| MD5 |
880439e287c2be584aa2b1dff13a5a4e
|
|
| BLAKE2b-256 |
c54c918af7a02655f653f189583434733279aa5c7096b518a71a8a83ea664550
|
Provenance
The following attestation bundles were made for genealogy_kg-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Flux-Frontiers/genealogy_kg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genealogy_kg-0.1.0-py3-none-any.whl -
Subject digest:
2a6d7efbaacb3eb7b8b37fd3ffcb27780526197b9f20b7ebdad7d24298ab8b34 - Sigstore transparency entry: 2655850685
- Sigstore integration time:
-
Permalink:
Flux-Frontiers/genealogy_kg@c24cb22b9c96a9c4a6e022ba7d12b8393cf8fcbe -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Flux-Frontiers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c24cb22b9c96a9c4a6e022ba7d12b8393cf8fcbe -
Trigger Event:
push
-
Statement type: