Document pipeline: Nextcloud → anydoc / pdf-inspector → Docling → Tika → Gotenberg → Stirling → Paperless → Onyx → Coneshare
ClawQL does not run one hidden daemon that magically pipes bytes through all services. Instead, it loads bundled OpenAPI specs for Nextcloud, Docling (layout parse), Apache Tika, Gotenberg, Stirling-PDF, Paperless-ngx, Onyx, and ConeShare into the same search / execute index as the rest of your providers. You (or an agent) choose which operations to call and in what order—that composition is the document pipeline.
The usual production story is: intake from Nextcloud WebDAV → optional fast convert (anydoc via MCP convert_document, or pdf-inspector via inspect_pdf) → layout OCR (Docling, when scanned/forms) → extract heterogeneous files (Tika) → normalize to stable PDFs (Gotenberg) → redact/remediate (Stirling) → archive with metadata (Paperless self-hosted optional, or ClawQL archive layer — Nextcloud + Postgres + Onyx — default / hosted) → index for enterprise search (Onyx) → sync processed artifacts back to Nextcloud → share via secure links / VDR (Coneshare). Canonical recipe: DEFAULT_IDP_PIPELINE in clawql-documents — see IDP pipeline hub. Product design: IDP Platform · Full-stack Helm: clawql-idp-helm.md · Slack runbook: slack-first-idp-runbook.md.
Intro essays (background): Tika · Gotenberg · Stirling · Paperless · Onyx. Matrix: Bundled specs, providers/README.md. Helm / topology: Helm, Docker Desktop observability.
What the eight-vendor document stack is
| Vendor | Role in the stack |
|---|---|
| Nextcloud | Collaboration storage — WebDAV intake/outbox, OCS shares (nextcloud-onboarding.md) |
| Docling | Layout-aware parse — tables, forms, W-2-style fields (docling-onboarding.md); Helm documentPipeline.docling (opt-in) |
| Tika | Detection + text + metadata extraction from many binary and office formats — the normalization primitive before chunking or conversion (introducing-clawql-tika.md). |
| Gotenberg | API-first conversion to PDF (LibreOffice + Chromium routes) so downstream steps see a consistent artifact (introducing-clawql-gotenberg.md). |
| Stirling | Self-hosted PDF toolkit — split, merge, compress, rotate, PII redaction — remediation between conversion and archive (introducing-clawql-stirling.md). |
| Paperless | DMS / archive — ingest, OCR, tags, correspondents, searchable vault of record (introducing-clawql-paperless.md). |
| Onyx | Enterprise retrieval — connectors, hybrid search, permissions; optional ingestion via onyx::upsert_ingestion_doc (introducing-clawql-onyx.md, onyx-knowledge-tool.md). |
| Coneshare | Secure sharing / VDR — share links, data rooms, viewer webhook → vault (coneshare-onboarding.md) |
MCP surface: ingest_external_knowledge (vault Markdown / URL) and knowledge_search_onyx (when CLAWQL_ENABLE_ONYX=1) sit beside raw execute. Optional IDP tools: run_idp_pipeline (CLAWQL_ENABLE_IDP_PIPELINE=1), convert_document (CLAWQL_ENABLE_ANYDOC=1), inspect_pdf (CLAWQL_ENABLE_PDF_INSPECTOR=1), classify_document (CLAWQL_ENABLE_IDP_CLASSIFIER=1), extract_document (CLAWQL_ENABLE_LANGEXTRACT=1). See External ingest & knowledge lake, Onyx enterprise search, Documents plugin, and mcp-tools.md.
Recommended IDP data flow
[Nextcloud IDP/inbox …]
│ WebDAV download
▼
[PDF / binary / Office / email …]
│ optional: convert_document (anydoc) — Office/PDF/CSV → GFM
│ inspect_pdf (pdf-inspector) — TextBased → local Markdown
│ Scanned / Mixed / OCR needed → Docling OCR
▼
[optional: Docling layout parse (forms, W-2, OCR pages)]
│
▼
│ Tika: detect + extract text/metadata (non-PDF or fallback)
▼
[optional: Office/HTML → PDF]
│ Gotenberg: deterministic PDF artifact
▼
[PDF cleanup + PII redaction]
│ Stirling: remediation profile per tenant policy
▼
[archive + tags + correspondent + OCR in DMS]
│ Paperless: system of record + human workflows
▼
[optional: push same text/metadata into enterprise index]
│ Onyx: ingestion API + knowledge_search_onyx for assistants
▼
[sync processed file back to Nextcloud]
│ WebDAV upload to IDP/processed/…
▼
[secure share link / data room]
│ Coneshare: VDR + viewer webhook → vault/audit
▼
Users / agents query with permissions enforced by Onyx
Why not “Onyx before Paperless”? You can call Onyx search at any time, but durable filing, legal retention, and human classification usually belong in Paperless first; Onyx then indexes what you want searchable across the org. The bundled onyx::upsert_ingestion_doc path is documented as post-Paperless for that reason (onyx-knowledge-tool.md § 5).
anydoc convert (optional, in-process)
- Use when inputs are Office, CSV, or text PDFs and you want a fast local GFM Markdown path before Docling (Firecrawl anydoc).
- In ClawQL: MCP
convert_documentwhenCLAWQL_ENABLE_ANYDOC=1— no sidecar;@firecrawl/anydocruns insideclawql-documents. Returns optionalmarkdownandroute:local_markdown|docling_ocr|tika_fallback. - Paths:
path=must fall underCLAWQL_ANYDOC_FILE_ROOTS(falls back toCLAWQL_PDF_INSPECTOR_FILE_ROOTS, then cwd); or passbase64. - Helm:
enableAnydoc: true(env only — no Deployment). - Guide: anydoc-onboarding.md.
pdf-inspector route (optional, in-process)
- Use when inputs are PDFs and you want a fast local classify + Markdown path before spending Docling CPU on every file (Firecrawl pdf-inspector).
- In ClawQL: MCP
inspect_pdfwhenCLAWQL_ENABLE_PDF_INSPECTOR=1— no sidecar;@firecrawl/pdf-inspectorruns insideclawql-documents. Returnspdf_type, optionalmarkdown, androute:local_markdown|docling_ocr|hybrid_docling. - Paths:
path=must fall underCLAWQL_PDF_INSPECTOR_FILE_ROOTS(default: process cwd); or passbase64. - Helm:
enablePdfInspector: true(env only — no Deployment). - Guide: pdf-inspector-onboarding.md.
Nextcloud collaboration storage
- Use when operators or upstream systems drop files in a shared folder (
IDP/inbox/…) and agents should download, then upload processed output toIDP/processed/…. - In ClawQL:
NEXTCLOUD_BASE_URL,NEXTCLOUD_USERNAME,NEXTCLOUD_APP_PASSWORD;search/executeon WebDAV + OCS (nextcloud-onboarding.md). - Helm:
idpCollaboration.enabled+nextcloud.enabled— enabled invalues-docker-desktop.yamlfor local dev.
Docling layout parse (optional)
- Use when inputs are forms, W-2s, scanned pages, or complex layouts — especially after
inspect_pdfreturnsdocling_ocr/hybrid_docling. - In ClawQL:
DOCLING_BASE_URL(+ optionalDOCLING_API_KEY);search/executeon bundled Docling Serve OpenAPI (docling-onboarding.md). - Helm:
documentPipeline.docling.enabled: true(large CPU image — opt-in).
Classify and extract (optional MCP tools)
classify_document(CLAWQL_ENABLE_IDP_CLASSIFIER=1) — document-type label + confidence viaCLASSIFIER_BASE_URLor local heuristic. Helm:enableIdpClassifier+documentPipeline.classifier.extract_document(CLAWQL_ENABLE_LANGEXTRACT=1) — schema-grounded LangExtract fields withchar_interval(+ optional HTML path). Helm:enableLangextract+documentPipeline.langextract. Compose reference:docling-classifier.compose.yml.- Guides: fine-tuned-classifier.md · langextract-onboarding.md.
Tika text and metadata extraction
- Use when inputs are mixed formats (PDF, DOCX, EML, …) and you need plain text + metadata before routing to conversion or ML steps.
- In ClawQL: bundled spec
providers/tika/openapi.yaml; setTIKA_BASE_URL(andCLAWQL_BEARER_TOKENif your Tika server requires it per Bundled specs).searchfor operations like “put document”, “detect”, “parse”, thenexecutewith the rightoperationIdand multipart or body fields your spec exposes. - Caveats: complex PDF layout and scanned pages still need OCR strategy outside vanilla Tika extraction (introducing-clawql-tika.md § limitations) — prefer
convert_document/inspect_pdf→ Docling for those.
Gotenberg normalize to PDF
- Use when you receive Office or HTML artifacts and want a single PDF representation for Stirling/Paperless.
- In ClawQL:
GOTENBERG_BASE_URL+CLAWQL_BEARER_TOKENas needed;searchthenexecuteon Chromium or LibreOffice routes from the bundled Gotenberg spec (introducing-clawql-gotenberg.md). - Caveats: heavy CPU; fidelity vs desktop Office can differ — plan capacity and spot-check templates.
Stirling PDF remediation
- Use when PDFs are oversized, rotated wrong, merged incorrectly, or need split/compress before archival quality is acceptable (introducing-clawql-stirling.md).
- In ClawQL:
STIRLING_BASE_URL+STIRLING_API_KEYasX-API-KEY;executeon the bundled Stirling paths (refresh spec from/v3/api-docswhen developing — providers/README.md). - Caveats: broad tool surface — govern which operations each workflow may call.
Paperless archive and search
- Use when you need long-lived storage, metadata taxonomy, and human-friendly browse/filter UX (introducing-clawql-paperless.md).
- In ClawQL:
PAPERLESS_BASE_URL+PAPERLESS_API_TOKEN(Authorization: Token …);search/executeon document consumption, listing, and metadata APIs (paperless-onboarding.md). - Pairing: after
executereturns a new documentid, optionally callonyx::upsert_ingestion_docwith a stablepaperless-{id}semantic identifier (onyx-knowledge-tool.md § Post-Paperless) or enable the Ouroboros hookCLAWQL_OUROBOROS_ONYX_AFTER_PAPERLESSfor automated follow-up when you run spec-first loops (Ouroboros tools).
Onyx enterprise retrieval and ingestion
- Use when the audience is the whole company (Slack, Drive, Confluence, …) and answers must respect ACLs (introducing-clawql-onyx.md).
- In ClawQL:
ONYX_BASE_URL+ Bearer token; optionalknowledge_search_onyxfor ergonomicquery→search_query;execute("onyx::upsert_ingestion_doc", …)for pushing Paperless-linked text into the index (Onyx enterprise search). - Flink / connectors: continuous sync into Onyx is a deployment concern (#119, Flink Onyx sync) — ClawQL exposes the API surface, not the connector daemons themselves.
Coneshare secure sharing and VDR
- Use when archived documents need external review under audit — secure share links, virtual data rooms, viewer analytics.
- In ClawQL:
CONESHARE_BASE_URL,CONESHARE_API_TOKEN;CLAWQL_ENABLE_CONESHARE=1registersPOST /idp/coneshare/webhookfor viewer events → vault/audit (coneshare-onboarding.md). - Helm:
idpCollaboration.coneshare.externalUrlfor production coneshare-compose stacks; lab co-deploy is optional.
Orchestrating with search and execute
convert_document(when enabled) for Office/PDF/CSV → GFM, orinspect_pdffor PDF-type routing.searchwith a natural-languagequery(“split pdf with stirling”, “upload document paperless”) to listoperationIdcandidates.executewithoperationId,args, and optionalfieldsto keep responses small (Using search and execute).classify_document/extract_documentfor typed routing and grounded fields.memory_ingest(oringest_external_knowledge) for operator notes linking document ids across vendors — useenterpriseCitationswhen mixing in Onyx hits (clawql-memory).notifyfor human-visible milestones when a long pipeline step finishes (Schedule & notify workflows).
No single tool replaces thinking through state: pass explicit file buffers or URLs each vendor accepts, and handle errors between steps (e.g. Gotenberg 413 → Stirling never runs).
Documents feature flag and environment
CLAWQL_ENABLE_DOCUMENTS(default on): when set to0, ClawQL drops document/IDP vendors fromall-providersand hides document MCP tools — the default stack (no spec env) does not include Tika, Paperless, etc. anyway. See Concepts and configuration § Feature tiers. You can still setCLAWQL_BUNDLED_PROVIDERSto list only the document vendors you want.- IDP specialist flags:
CLAWQL_ENABLE_ANYDOC,CLAWQL_ENABLE_PDF_INSPECTOR,CLAWQL_ENABLE_IDP_CLASSIFIER,CLAWQL_ENABLE_LANGEXTRACT,CLAWQL_ENABLE_IDP_PIPELINE— each default off. - Per-service base URLs and tokens live in
.env.exampleand IDP pipeline hub — refresh committed specs withnpm run fetch-provider-specswhen your upstream exposes/openapi.jsonor Paperless/api/schema/(providers/README.md § refresh). - Helm: umbrella
charts/clawql-idp+values-idp-full.yaml, or baseenableDocuments/enableAnydoc/enablePdfInspector/enableIdpClassifier/enableLangextract/documentPipeline+idpCollaboration+onyx— Helm.
Related posts guides and references
| Topic | Link |
|---|---|
| IDP Platform | /vision/idp-platform — self-hosted vs hosted, archive layer design |
| IDP pipeline hub | idp-pipeline.md |
| Documents plugin | /plugins/documents |
| Umbrella Helm | clawql-idp-helm.md |
| pdf-inspector | pdf-inspector-onboarding.md |
| anydoc | anydoc-onboarding.md |
| Docling | docling-onboarding.md |
| LangExtract | langextract-onboarding.md |
| Classifier | fine-tuned-classifier.md |
| Nextcloud | nextcloud-onboarding.md |
| Coneshare | coneshare-onboarding.md |
| Tika deep dive | introducing-clawql-tika.md |
| Gotenberg | introducing-clawql-gotenberg.md |
| Stirling | introducing-clawql-stirling.md |
| Paperless | introducing-clawql-paperless.md |
| Onyx | introducing-clawql-onyx.md |
| MCP tool matrix | mcp-tools.md |
| Ecosystem overview | clawql-ecosystem.md |