Skip to main content
complydoc

Know your documents before they reach an LLM.

An open-source, offline audit for documents before they're indexed.

PyPI Tests Documentation License

Works with
LangChain · LlamaIndex · Unstructured · Haystack · Docling · LlamaParse · Azure Document Intelligence · Marker · Chonkie
Qdrant · Chroma · Pinecone · Cohere, Voyage, Mistral, Gemini and OpenAI embeddings


complydoc audit flagging a white-text clause in a contract PDF that the loaders passed to the model. The complydoc viewer: a LangChain ingestion pipeline's runs, and one run traced step by step, each loader, splitter, vector store and embedding call on a time axis with its time, cost and the identifiers it passed on, and warnings on a scanned file that loaded no text

A PDF can say one thing to a person and another to your model. White text, tiny type, an IBAN behind a black bar: it's all still in the text layer, and most loaders pass it straight through. complydoc shows you what your loaders actually extracted, page by page, flags the hidden text and the personal and financial identifiers before they're embedded, and can fail a CI check when a document breaks your policy. It also traces every ingestion step with its time and cost, and nothing leaves your machine unless you ask.

Try it in 30 seconds

A one-page contract in two columns, with one sentence in white:

uv tool install complydoc
curl -LO https://raw.githubusercontent.com/complydoc/complydoc/main/examples/hidden_clause.pdf
complydoc audit hidden_clause.pdf --compare-extractor pypdf
complydoc check hidden_clause.pdf --policy finance
complydoc ui

The audit keeps both readings and flags the white sentence, the check fails on it, and complydoc ui opens the report. On a folder of your own, complydoc ui ./documents audits it first and opens the viewer on it.

Viewer security page: the white sentence, marked high, confirmed, white text Viewer document page: complydoc and pypdf side by side, with the white sentence in the text

Six pages of the same kind, and what each loader returns from them, are in What PDF loaders let through.

Quickstart

Install with uv tool install complydoc or pip install complydoc. Observe an ingestion pipeline as it runs, every loader, splitter, embedding call and vector store a step:

import complydoc as cd

with cd.observe("contracts-ingest"):
    documents = PyMuPDF4LLMLoader("contract.pdf").load()
    chunks = splitter.split_documents(documents)
    vector_store.add_documents(chunks)

Open the run with complydoc ui. Langfuse and Phoenix is how an LLM trace points at the same run.

Compare loaders on your own documents, page by page:

from langchain_community.document_loaders import PyPDFLoader
from langchain_pymupdf4llm import PyMuPDF4LLMLoader

report = cd.compare_loaders(
    {"PyPDFLoader": PyPDFLoader, "PyMuPDF4LLMLoader": PyMuPDF4LLMLoader},
    paths="./contracts",
    page_images=True,
)
cd.write_json(report, ".complydoc/loaders.json", detail="full")
The complydoc viewer: two readers' readings of the same page side by side, with the page itself beside them

Or audit a folder from the command line, then open it all in the viewer, served from your machine:

complydoc audit ./contracts
complydoc ui

The playground has all of this ready to run.

What it shows

  • Pipeline traces: each LangChain or LlamaIndex loader, splitter and embedding call as a step, with its settings, time, tokens, cost and what it passed on.
  • Loader diffs: every loader's reading of a document side by side, line by line, with the page it came from.
  • Identifiers: personal and financial identifiers from Europe, the Americas, India and Australia, checksum-validated where a checksum exists, and masked until you choose to see them.
  • Hidden content: text a reader does not see and a model does, and passages written as instructions to a model.
  • Chunks: splitters side by side, drawn over the text, with the sentences and tables they cut.
  • Cost: text and vision tokens per page, priced across models and extraction paths.
complydoc architecture: files and loader output feed four analyses (cost, readiness, identifiers, hidden content) that produce a report and masked text, inside a network guard

In CI

complydoc check holds a folder to rules written in YAML and fails when they break. On GitHub, the repository is also an action:

- uses: complydoc/complydoc@v0.7.10
  with:
    path: documents
    policy: policy.yaml

policy can be a file, or a pack that ships with the tool: finance, legal, hr.

See GitHub Action and Policy files.

For a team

One place where everyone opens the same reports, inside your own infrastructure:

complydoc ui ./reports --host 0.0.0.0     # served to your team, read-only
docker run -p 8500:8500 -v "$PWD/reports:/reports:ro" ghcr.io/complydoc/complydoc

Reports can live in a shared folder or a bucket (--out s3://bucket/folder), each run records the repository, branch and commit it came from, and a Compose file puts the viewer behind the sign-in your organisation already has. See Run it for your team and Run it in a container.

Privacy

Outbound connections and DNS lookups are blocked for the whole run, and every report records that they were. Identifiers are masked in every output, the page text included. The only things that send data anywhere are ones you add yourself: a hosted parser or the optional typesafe and assistant extras, which run only with allow_network=True, and a bucket you name as the place to keep reports, which receives the report and never the documents. See Network isolation.

Optional extras

Reading scans and finding names are optional, because they are large. Every report says when they were missing.

Extra Size Adds
ocr ~80 MB Reads scans and images
multilingual-names ~2 GB Finds people and companies in European languages
ner ~50 MB Finds names with spaCy's small English model
s3 ~90 MB Writes reports to a bucket and serves them from one
uv tool install "complydoc[ocr,multilingual-names]"
complydoc doctor              # what is installed, and the command for anything missing

The name models are downloaded once, before a scan, never during one: complydoc doctor prints the command. Detection accuracy publishes how often each finds and misses names.

Resources

License

MIT

Metadata

Release files for complydoc 0.7.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for complydoc 0.7.10
File Size Uploaded Provenance Actions
complydoc-0.7.10.tar.gz 6.5 MB With provenance Details for complydoc-0.7.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for complydoc 0.7.10
File Interpreter ABI Platform Actions
complydoc-0.7.10-py3-none-any.whl Python 3 none any Details for complydoc-0.7.10-py3-none-any.whl

Total release size: 10.7 MB

Release files / complydoc-0.7.10.tar.gz

Download URL complydoc-0.7.10.tar.gz
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
3e992ca35f39639cf7f2d5a71deb6d853b6d60e3434e67459ef78f33769d1efe
BLAKE2b-256 checksum
How to use checksums
e40af8716090a299babc30773c8478d63e21b891936b5c254d9ff48b76c90441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / complydoc-0.7.10-py3-none-any.whl

Download URL complydoc-0.7.10-py3-none-any.whl
Size 4.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c393a65a08f16d61ab0764c3744e912c4c57d005c1e3c7ecbc86518614b49354
BLAKE2b-256 checksum
How to use checksums
914f5752d0a9590ba0a8efca7aba4617718c101029d7b78d0f4cc0498dce6b80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for complydoc 0.7.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for complydoc-0.7.10.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.10 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page