> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-codex-docs-audit-20260719-0149.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Docling Reader

> Convert Docling-supported documents, images, audio, and video into knowledge documents.

Pass `DoclingReader` to `Knowledge.insert()` to parse supported formats with Docling.

```python docling_reader.py theme={null}
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.docling_reader import DoclingReader
from agno.models.openai import OpenAIResponses
from agno.vectordb.pgvector import PgVector

db_url = "postgresql+psycopg://ai:ai@localhost:5532/ai"

knowledge = Knowledge(
    vector_db=PgVector(
        table_name="docling_documents",
        db_url=db_url,
    ),
)

agent = Agent(
    model=OpenAIResponses(id="gpt-5.2"),
    knowledge=knowledge,
    search_knowledge=True,
)

if __name__ == "__main__":
    knowledge.insert(
        name="Thai Recipes",
        url="https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf",
        reader=DoclingReader(output_format="markdown"),
    )
    agent.print_response(
        "How do I make chicken and galangal in coconut milk soup?",
        markdown=True,
    )
```

## Supported Input Groups

| Group     | Examples                                             |
| --------- | ---------------------------------------------------- |
| Documents | PDF, DOCX, PPTX, Markdown, HTML, AsciiDoc, and LaTeX |
| Data      | CSV, XLSX, XML, and Docling JSON                     |
| Images    | PNG, JPEG, TIFF, BMP, and WebP                       |
| Audio     | WAV, MP3, M4A, AAC, OGG, and FLAC                    |
| Video     | MP4, AVI, and MOV                                    |

## Run the Agent

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U "agno[docling]" openai pgvector psycopg sqlalchemy
    ```

    Audio and video conversion also require:

    ```bash theme={null}
    uv pip install -U openai-whisper
    ```

    Install `ffmpeg` with your operating system's package manager. See [FFmpeg downloads](https://ffmpeg.org/download.html) for platform packages.
  </Step>

  <Step title="Export the API key">
    ```bash theme={null}
    export OPENAI_API_KEY=your_openai_api_key_here
    ```
  </Step>

  <Snippet file="run-pgvector-step.mdx" />

  <Step title="Run the agent">
    ```bash theme={null}
    python docling_reader.py
    ```
  </Step>
</Steps>

## Reader Parameters

<Snippet file="docling-reader-reference.mdx" />

<Warning>
  In v2.7.4, `Knowledge.insert(url=..., reader=DoclingReader(allowed_hosts=...))` downloads extension-bearing URLs before calling the reader. Validate the URL before ingestion because the reader's allowlist does not guard this path.
</Warning>

`DoclingReader.async_read()` runs the synchronous conversion in a worker thread.

## Next Steps

| Task                      | Guide                                                    |
| ------------------------- | -------------------------------------------------------- |
| Compare available readers | [Readers Overview](/knowledge/concepts/readers/overview) |
| Configure chunking        | [Chunking](/knowledge/concepts/chunking/overview)        |
| Parse PDFs with pypdf     | [PDF Reader](/knowledge/concepts/readers/pdf-reader)     |
