# Repository Briefing: docling-project/docling
> Source: https://repoforai.com/repo/docling-project/docling (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/docling-project/docling
- **Official Docs / Website**: https://docling-project.github.io/docling
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (96/100 · Maintenance 35/35 · Adoption 21/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v2.156.0 (2026-12-02) — https://github.com/docling-project/docling/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, Self-Hosted, Local AI, CLI, API
- **Momentum**: 71,418 ★ total (+20 24h / +285 7d) · 5,523 forks
- **Topics**: `ai`, `convert`, `documents`, `pdf`, `tables`, `document-parser`, `document-parsing`, `docx`, `html`, `markdown`, `pdf-converter`, `pdf-to-json`
- **When to Use**: Best for: Teams ingesting mixed-format corpora, especially scans and layout-heavy PDFs, that need structured output and control over where conversion runs. Skip if: You need a vector database or an end-to-end retrieval service, or your corpus is simple enough that plain text extraction meets your retrieval needs.

## Overview
```text
### Architecture & Core Mechanics
Docling is a Python ingestion and conversion layer, not a RAG database. `docling.document_converter.DocumentConverter` accepts a file path or URL and produces a conversion result whose `document` is a `DoclingDocument`. That shared representation is the handoff between format-specific parsing and export. A pipeline can retain it as lossless JSON for downstream processing or export Markdown when the next stage expects text. Embedding, storage, and retrieval remain downstream responsibilities.

The root `pyproject.toml` defines the modular `docling-slim` package with Hatchling, while the installation example and Dockerfile install `docling`. The container uses Python 3.11 and CPU-only PyTorch. The Python SDK and CLI are direct entry points; `docling-serve` exposes conversion as an API, and an MCP server provides agent access. LangChain, LlamaIndex, Haystack, and Crew AI integrations connect conversion to downstream applications without making Docling the retrieval backend.

### Key Capabilities & Differentiators
For PDFs, Docling handles page layout, reading order, table structure, code, and formulas. OCR covers scans and other images. The CLI also exposes a vision-language model path through `--vlm-model granite_docling`. These are meaningful options when a document's columns or tables carry information that plain text extraction would flatten; validate the chosen pipeline on your own corpus rather than assuming layout or table fidelity.

Inputs extend beyond PDF to DOCX, PPTX, XLSX, HTML, EPUB, Apple iWork, email, and specialized XML such as USPTO patent records, JATS articles, and XBRL reports. Audio inputs such as WAV and MP3 use ASR. Outputs include Markdown, HTML, WebVTT, DocLang, DocTags, and lossless JSON. Choose JSON if later processing needs the structured representation; choose Markdown if ease of ingestion matters more than retaining the full structure.

### Trade-offs & Limitations
A lightweight PDF text extractor is a simpler baseline for text-native files with predictable reading order. Docling is a stronger candidate when scans, multi-column layouts, or tables affect the quality of what gets indexed. Compare reading order, table structure, and downstream chunk quality on the same sample set, not just whether each tool returned text. A managed API can shift model and worker operations to a provider; local Docling puts those responsibilities on your team but lets you decide where documents are processed.

The CPU container is a starting point, not a capacity estimate. OCR, model selection, document length, and concurrency all affect resource use; measure wall time and peak RAM on realistic batches, and measure VRAM if you select a GPU-backed path. Treat `OMP_NUM_THREADS=4` as the supplied container's starting budget, not a sizing rule. The project is MIT-licensed, but review the licenses of the model artifacts and dependencies you distribute separately.

### Hardware & Deployment Guide
Install `docling` with Python 3.10 or newer. The project lists macOS, Linux, and Windows on x86_64 and arm64; check availability for the particular backend you intend to use. The supplied Dockerfile builds on `python:3.11-slim-bookworm`, installs CPU-only PyTorch, runs `docling-tools models download` at build time, and sets `OMP_NUM_THREADS=4`. For offline deployment, stage the dependencies and model artifacts, point `DOCLING_ARTIFACTS_PATH` at the staged models, and test conversion with outbound networking disabled. Use `docling-serve` when you need an HTTP service rather than a Python worker or CLI job.

In v2.155.0, Granite Docling v2 gained 500M and 2B VLM presets with MLX support; v2.156.0 made the Granite Docling V2 500M preset the default for the VLM path. That is not a claim that every conversion uses a VLM. Pin the package and model configuration, then regression-test representative exports before upgrading if downstream chunking or indexing depends on stable output.
```

## Key Capabilities
```text
- Conversion API: `DocumentConverter.convert()` accepts local paths and URLs and returns a result containing a `DoclingDocument`.
- PDF structure: Layout, reading order, and table structure go beyond raw text extraction; OCR covers scanned pages and images.
- Export contract: Use lossless JSON to retain document structure, Markdown for text-oriented consumers, or HTML and DocTags where needed.
- Format breadth: Office files, EPUB, Apple iWork, email, and domain schemas such as JATS and XBRL share the conversion layer.
- Local runtime: The Dockerfile uses Python 3.11 and CPU-only PyTorch, prefetches model artifacts, and sets `OMP_NUM_THREADS=4`.
- Integration choices: Use the Python SDK or CLI directly, `docling-serve` for an API, or the MCP server for agent access.
```

## Quick Start / Clone
```bash
pip install docling
```
