Skip to main content
Readers transform raw content into Document objects that can be chunked, embedded, and stored in your knowledge base. Each reader handles a specific format (PDF, CSV, Markdown, etc.) and extracts text and metadata.

How Readers Work

  1. Parse: Read the raw content using format-specific logic
  2. Extract: Pull out text and metadata (page numbers, authors, etc.)
  3. Chunk: Split large content into smaller pieces (if enabled)
  4. Return: Provide a list of Document objects ready for embedding

Supported Readers

Using Readers with Knowledge

Pass a reader to knowledge.insert() to override automatic format detection:

Auto-Selection

Agno automatically selects the right reader based on file extension or URL:
When using knowledge.insert(), this happens automatically.

Configuration

Chunking

Format-Specific Options

Runtime Options

Override settings when calling read():

Async Processing

All readers support async for better performance with I/O operations:

Custom Chunking Strategy

Override the default chunking behavior:
See Chunking for available strategies.

Restricting URL Fetches

By default, a URL-fetching reader will fetch any URL passed to it. Use allowed_hosts to restrict the reader to a fixed hostname allowlist. URLs outside the list are skipped and return no documents. Matching is case-insensitive and applies to the whole hostname, so list every subdomain you want to permit.
WebsiteReader, WebSearchReader, and LLMsTxtReader also re-check the allowlist on each redirect, so an allowed host can’t redirect to a blocked one. FirecrawlReader and DoclingReader validate the initial URL only.

Error Handling

Readers return an empty list when processing fails. Check logs for debugging information:

Next Steps

PDF Reader

Extract text from PDFs

Website Reader

Crawl and index websites

Chunking

Control how content is split

Vector DB

Store processed documents