Docling is a production-grade Python library for converting diverse document formats (PDF, DOCX, PPTX, XLSX, HTML, LaTeX, EPUB, images, audio, video, email, EBCDIC, and more) into a unified, structured `DoclingDocument` representation. It is designed to serve as the document understanding layer for AI workflows, particularly Retrieval-Augmented Generation (RAG), agentic AI, and document extraction pipelines. The system provides a rich Python SDK, a Typer-based CLI (`docling convert`), a service client for remote conversion via `docling-serve`, and an MCP server. It supports multiple output formats including Markdown, JSON, HTML, DocTags, and plain text. Architecturally, Docling employs a modular pipeline system with pluggable backends for each input format and a stage-based processing model. The core pipeline (`StandardPdfPipeline`, `VlmPipeline`, `AsrPipeline`) orchestrates page-level operations (preprocessing, OCR, layout detection, table structure recognition, picture classification, reading order) and document-level enrichments (code/formula extraction, heading hierarchy, picture description). Inference engines are abstracted behind factory patterns supporting ONNX Runtime, HuggingFace Transformers, vLLM, MLX, KServe v2, and remote APIs. The library integrates with over 20 OCR engines and vision-language models, and includes a plugin system for extensibility. Key entry points include the `DocumentConverter` class, the CLI (`docling.cli.main`), and the service client (`docling.service_client`). External dependencies span PDF libraries (pypdfium2, docling-parse), ML frameworks (torch, transformers, onnxruntime), OCR engines (Tesseract, EasyOCR, RapidOCR), and cloud services (KServe, Azure, S3). The codebase is actively maintained with frequent releases, extensive test coverage, and a clear migration path from legacy components.
AutoRAG is a TypeScript-based RAG (Retrieval-Augmented Generation) agent platform with a CLI, local-first indexing, and a plugin-based datasource skill system. It provides an `AutoRAGAgent` that orchestrates document retrieval across multiple methods (BM25, vector, hybrid) and external data sources (Slack, Discord, Gmail, GitHub, KakaoTalk, Obsidian, cloud drives, etc.) via connector-backed skills. The agent uses a Pi agent loop with tools for search, memory, and feedback, and includes a web UI for datasource management. The repository also contains a legacy Python RAG pipeline (`legacy/autorag/`) with YAML-driven node-based evaluation, but the primary development is on the TypeScript version. Key architectural patterns include a parser registry with extension-based dispatch, a retrieval method registry with parallel execution and result merging, a memory subsystem with persistent feedback and insight extraction, and a portable spawn utility for cross-platform child process execution. The system is designed for privacy: remote embedding egress is rejected, and filesystem paths are kept opaque in diagnostics.