xbrlkit
Work with XBRL filings above Arelle: fetch a filing, parse it once into a neutral typed model, and project that model into whichever portable representation you need — or hand it one of those representations and get the model back.
EDGAR ───────────┐
├──▶ Arelle ──▶ XbrlModel ──┬──▶ holon.jsonld (RDF / JSON-LD)
filings.xbrl.org ┘ ▲ ├──▶ Tavi (compiled model)
│ ├──▶ xBRL-JSON (OIM)
holon, Tavi ──────┘ └──▶ property graph (parquet, .lbug)
primary HTML ──▶ xbrlkit.text ──▶ sections (text blocks, Items, tables)
Two sources in — the SEC, and everyone else through
filings.xbrl.org — four projections out, and two of
those read back, so a report that was never an SEC filing gets the same
treatment. A fifth surface, the filing's text, reads the primary HTML directly
and needs neither Arelle nor the network. And the model itself can be served:
xbrlkit serve holds a filing in memory and exposes it to an MCP client
through shaped tools.
Arelle stays the parser — nobody should reimplement DTS resolution. What it
does not give you is anything ergonomic to hold: ModelXbrl is a large
mutable object graph tied to a controller you have to close. XbrlModel is the
answer to that — stateless, single-filing, lossless, and the waist every
projection hangs off.
The one architectural rule: everything goes through XbrlModel. A feature
that reaches into Arelle's ModelXbrl directly is bypassing the waist, and
that is the change that turns a kit into a junk drawer.
What's in the box
parse |
Arelle in, XbrlModel out |
the load, the DTS cache policy, taxonomy packages |
serialize |
the four projections | holon, Tavi (+ its gap report), xBRL-JSON, the property graph |
deserialize |
the importers | a holon or a Tavi read back into the model, no Arelle |
edgar |
the SEC | discovery, download, full-text search, 1994 onward |
filings_org |
everyone else | ESEF and the national regimes, by LEI |
text |
the filing as prose | inline text blocks, 10-K/10-Q Items, the XML forms |
serve |
the local MCP server | fourteen shaped tools over a filing in memory |
model.py is the waist itself, schema/ declares the property graph's tables,
and query.py runs SPARQL over a built holon.
Install
pip install xbrlkit
Exposes the xbrlkit CLI (build, fetch, query, cache, serve) and the
library. Two optional extras: xbrlkit[lpg] for the property-graph projection
(pyarrow, LadybugDB) and xbrlkit[mcp] for the MCP server.
From a source checkout:
brew install uv just
just install # dependencies, and .env from the template
SEC User-Agent
SEC EDGAR requires a descriptive User-Agent on every request, or it throttles
you (empty responses / HTTP 429). just install already created your .env —
set your details there:
# .env
SEC_GOV_USER_AGENT="Your Name your@email.com"
.env is loaded automatically by every command. Outside the just workflow,
export SEC_GOV_USER_AGENT=… or pass --user-agent. Nothing outside EDGAR
needs it — a local file, a JSON report and filings.xbrl.org all load without.
Usage
# Build a holon.jsonld from a specific filing (-> ./output/)
xbrlkit build --cik 320193 --accno 0000320193-23-000106
# The other projections: Tavi (plus its .tavi.gaps.json sidecar), xBRL-JSON,
# the property graph (needs the lpg extra), or every one of them
xbrlkit build --cik 320193 --accno 0000320193-23-000106 --format tavi
xbrlkit build --cik 320193 --accno 0000320193-23-000106 --format all
# Fetch the latest filing for a ticker (-> ./output/); --form and --n filter
xbrlkit fetch --ticker NVDA
# Query consolidated facts in a built holon (in-memory SPARQL)
xbrlkit query --in output/0000320193-23-000106.holon.jsonld --element us-gaap:Assets
From a source checkout, just wraps the same CLI: just build 320193 0000320193-23-000106 and just fetch NVDA.
from xbrlkit.parse import load_model, to_xbrl_model
from xbrlkit.serialize import to_holon, to_tavi_report
from xbrlkit.deserialize import from_holon_json
model = to_xbrl_model(load_model("mmm-20241231.htm"), filing_meta)
holon = to_holon(model)
tavi, gaps = to_tavi_report(model)
model = from_holon_json(holon) # and back again
Serve to an MCP client
pip install "xbrlkit[mcp]"
xbrlkit serve
# → MCP at http://127.0.0.1:8765/mcp
claude mcp add --transport http xbrlkit http://127.0.0.1:8765/mcp
Or without installing anything:
uvx --from "xbrlkit[mcp]@latest" xbrlkit serve
Then load filings from the chat — a ticker, an EDGAR cik:accession, a
lei:, a local package, or a holon or Tavi by path or URL — and ask for
statements, facts by concept and period, calculations, exhibits and text.
There is no graph and no index behind the tools: every answer is read from the
filing. Full detail, including the tool table and the --pure profile, in
serve/.
Where it runs
RoboSystems. The platform's SEC pipeline is built on this package: filings
are parsed with xbrlkit.parse (its own Arelle controller, with
register_sec_transforms and the cache policy from configure_webcache),
projected with to_holon, to_tavi_report and the property-graph tables, the
shared sec graph is declared from xbrlkit.schema, and the full-text index
behind its document search is built from xbrlkit.text.
Filing Ladder. The Filing Ladder benchmark — one filing handed to the same language model in every representation — built its 26-filing corpus of 2024–2025 10-Ks and 10-Qs with this package. Each projection is a rung of the ladder, so its published results are also a measurement of what a model can do with each of these outputs. That corpus is this package's test bench too: the text sections were checked against the filing's own text-block facts on all 26 filings, the property graph row for row against the platform's processor, and the two importers by round trip.
View & explore
Built holons render in the RoboSystems Holon Viewer — a browser-based reader that renders the financial statements and lets you ask questions of the report with AI:
- Hosted: https://holon.robosystems.ai/ — open a
holon.jsonldand explore the statements, notes and dimensional facts, or chat with the report. - Source: https://github.com/RoboFinSystems/robosystems-holon-viewer
The viewer reads a holon entirely client-side, so a single holon.jsonld is a
complete, portable, self-describing report. Its chat asks the report raw
questions (jq over a Tavi model, SPARQL over a holon); xbrlkit serve is the
other side of that pair — the same filing behind shaped tools, on your own
machine.
License
MIT © 2026 RFS LLC — 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 xbrlkit-0.7.3.tar.gz.
File metadata
- Download URL: xbrlkit-0.7.3.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a146aa0115833931cf8233a88f394cdd3ead3acf71480f2e681f0f73851a7fb6
|
|
| MD5 |
4ef9bad0afaa68a90aa9c8b675f595b6
|
|
| BLAKE2b-256 |
1880361415e701ffad337e800b071cb2da4a78f1d24f6152362025031d263a50
|
Provenance
The following attestation bundles were made for xbrlkit-0.7.3.tar.gz:
Publisher:
publish.yml on RoboFinSystems/xbrlkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xbrlkit-0.7.3.tar.gz -
Subject digest:
a146aa0115833931cf8233a88f394cdd3ead3acf71480f2e681f0f73851a7fb6 - Sigstore transparency entry: 2755325049
- Sigstore integration time:
-
Permalink:
RoboFinSystems/xbrlkit@54e5ba81c25ebfce1e5630a8e7b8c6b9200ab255 -
Branch / Tag:
refs/heads/release/0.7.3 - Owner: https://github.com/RoboFinSystems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54e5ba81c25ebfce1e5630a8e7b8c6b9200ab255 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xbrlkit-0.7.3-py3-none-any.whl.
File metadata
- Download URL: xbrlkit-0.7.3-py3-none-any.whl
- Upload date:
- Size: 2.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cf2bc505998ac4bfd57e3ea3ae0b949cda4c676cb887a588ab943835697715f
|
|
| MD5 |
b377cae2cc0fd61f230bddca574e77f4
|
|
| BLAKE2b-256 |
f308370439a6b6193b9e05bde0cbb02430d5a2b90dec18487dee8d62df8a75c1
|
Provenance
The following attestation bundles were made for xbrlkit-0.7.3-py3-none-any.whl:
Publisher:
publish.yml on RoboFinSystems/xbrlkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xbrlkit-0.7.3-py3-none-any.whl -
Subject digest:
7cf2bc505998ac4bfd57e3ea3ae0b949cda4c676cb887a588ab943835697715f - Sigstore transparency entry: 2755325052
- Sigstore integration time:
-
Permalink:
RoboFinSystems/xbrlkit@54e5ba81c25ebfce1e5630a8e7b8c6b9200ab255 -
Branch / Tag:
refs/heads/release/0.7.3 - Owner: https://github.com/RoboFinSystems
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54e5ba81c25ebfce1e5630a8e7b8c6b9200ab255 -
Trigger Event:
push
-
Statement type: