← Home

Guide

Docling

A model can reason about a PDF it cannot open. Docling opens it — layout, tables, headings and all — and hands back Markdown or JSON the agent can actually work with. Connected over HTTPS, so the heavy parsing never runs inside your bot.

What It Does

Docling is document intelligence: it reads a file and reconstructs its structure rather than dumping a wall of text. Headings stay headings, tables stay tables, reading order survives a two-column layout. That difference is the whole point — an agent handed flattened PDF text will confidently misread a table, and an agent handed structured Markdown will not.

It accepts far more than PDFs: Word, PowerPoint, Excel, ODF, RTF, HTML, MHTML, Markdown, CSV, AsciiDoc, images, EPUB, email, and more besides. Output can be md, json, yaml, html, text, doctags or pre-cut chunks if you are feeding a retrieval pipeline.

You Supply the Server

This is a connected tool: the card asks for the URL of a Docling Serve deployment you run. Docling itself is a Python toolkit; Docling Serve is the official FastAPI service that puts it behind an HTTP API, published as container images for CPU and CUDA (an AMD ROCm variant is supported but not published, so you build that one yourself). Parsing a large scanned PDF is exactly the kind of work you do not want competing with your agent for memory, which is why this one is connected rather than installed.

Put it behind HTTPS. The connector will not accept a plain http:// endpoint, nor one carrying credentials, a query string or a fragment.

Connect It

  1. Open the dashboard, go to Tools, and pick the running bot. Tools are installed per instance, not per account.
  2. Find Docling and connect it, with your endpoint — for example https://docling-serve.example.com.
  3. If you started the service with DOCLING_SERVE_API_KEY set, choose the X-API-Key auth mode and paste that key: Docling Serve expects it on an X-Api-Key header. If you left the key unset, the service accepts unauthenticated requests and you can connect with None — but then anything that can reach the URL can use it, so lock it down at the network instead.

The steps are identical on Hermes Agent and OpenClaw.

The Endpoints That Matter

  • POST /v1/convert/source — convert something the server can fetch itself, by URL, or a base64 payload. This is the one to reach for first.
  • POST /v1/convert/file — multipart upload. Note this one is not reachable through the connector’s post-file verb: that client sends the upload under a form field named file, and Docling Serve expects files, so the request is rejected before it converts anything. For a file that only exists inside your bot, send it base64-encoded through /v1/convert/source instead.
  • POST /v1/convert/source/async and POST /v1/convert/file/async — same work, queued.
  • GET /v1/status/poll/{task_id} then GET /v1/result/{task_id} — check on an async job and collect it.
  • /docs for the OpenAPI page, /ui for the demo interface.

Use the async pair for anything big. The connector drops a call that goes 120 seconds without data, and a synchronous conversion of a long scanned document sits silent for exactly that long — kick the job off, then poll.

Driving the installed client by hand, if you want to prove the wiring:

# Hermes — convert a PDF the server fetches itself
/opt/data/tools/dashboard-api-connectors/docling/tool \
  post /v1/convert/source '{"sources":[{"kind":"http","url":"https://example.com/document.pdf"}]}'

# OpenClaw — ask for a specific output format
/home/node/.openclaw/tools/dashboard-api-connectors/docling/tool \
  post /v1/convert/source '{"options":{"to_formats":["md"]},"sources":[{"kind":"http","url":"https://example.com/report.pdf"}]}'

Both examples use /v1/convert/source deliberately. It is the route the connector can actually drive: it takes a JSON body, so lists such as to_formats work, and it accepts a base64 payload when the file only exists inside your bot. Note that conversion settings go inside an options object — put to_formats at the top level and it is silently ignored, which is easy to miss because Markdown is the default anyway.

In normal use you do not type any of that. Attach the file, ask for what you want from it, and the agent picks the route.

Docling, MarkItDown or MinerU?

  • MarkItDown installs locally and is cheap and fast. For a clean, born-digital Office file it is usually all you need, and it costs you no external service.
  • Docling is the one to use when structure matters: complex layouts, tables you intend to read numbers out of, mixed document types, or output shaped for a retrieval pipeline.
  • MinerU and PaddleOCR lead with OCR and are the better answer for scans and photographed pages.

Where It Lands in Your Bot

  • Hermes Agent: skill at /opt/data/skills/openclaw-launch-docling.
  • OpenClaw: skill at /home/node/.openclaw/workspace/skills/openclaw-launch-docling.

Troubleshooting

  • 401 on every call. The service has DOCLING_SERVE_API_KEY set and the connector is on None, or on Bearer instead of X-API-Key. A missing or wrong X-Api-Key is a 401, not a 403.
  • Timeouts on big documents. Expected on the synchronous endpoints. Switch to /v1/convert/source/async and poll.
  • The response is enormous. A response over 5 MB is refused with an error rather than truncated, so you get nothing back. Ask for one output format rather than several, or request chunks.
  • A scan comes back nearly empty. That is an OCR job. Check your deployment has OCR enabled, or send it to MinerU or PaddleOCR instead.

Try It

Connect it, give your bot a PDF with a real table in it, and ask for the table as Markdown. Compare that with what you get without the tool connected — the gap is the reason to bother.

Related: the Tools catalog, MarkItDown, MinerU, Stirling PDF, OfficeCLI.