AgentPool provides document conversion capabilities to transform various document formats (PDFs, Office documents, HTML, etc.)
into markdown text that can be processed by language models.
When passing paths to Agent.run(), documents are automatically converted if needed:
# Will convert PDF if model doesn't support it directlyawaitagent.run(Path("document.pdf"))# Multiple inputsawaitagent.run("Analyze this document:",Path("document.pdf"),"And compare it with:",Path("other.docx"))
conversion:providers:null# List of configured converter providers.default_provider:null# Name of default provider for conversions.max_size:null# Global size limit for all converters.
providers:-type:datalabpage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).languages:!!set# List of supported languages for the converter.en:nullapi_key:'!ENVENV_VAR_NAME'# DataLab API key. If None, will try env var DATALAB_API_KEY.force_ocr:false# Whether to force OCR on every page.use_llm:false# Whether to use LLM for enhanced accuracy.max_pages:null# Maximum number of pages to process.
providers:-type:doclingpage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).languages:!!set# List of supported languages for the converter.en:nullimage_scale:2.0# Scale factor for image resizing.generate_images:true# Whether to generate images.ocr_engine:rapid_ocr# OCR engine to use. Defaults to RapidOCR, which the docling extra installs.
providers:-type:docling_remotepage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).languages:!!set# List of supported languages for the converter.en:nullapi_key:'!ENVENV_VAR_NAME'# Optional API key for auth.endpoint:!!python/object:pydantic.networks.HttpUrl# Base URL of the Docling service._url:!!python/object/new:pydantic_core._pydantic_core.Url-http://localhost:5001/ocr_engine:easy_ocr# OCR engine to use.pdf_backend:dlparse_v4# PDF backend to use.table_mode:fast# Table mode to use.force_ocr:false# Whether to force OCR even on digital documents.image_scale:2.0# Scale factor for image resolution.do_table_structure:true# Extract table structure.do_code_enrichment:false# Enable code extraction.do_formula_enrichment:false# Enable formula extraction.do_picture_classification:false# Enable picture classification.do_picture_description:false# Enable picture description.
providers:-type:llmpage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).languages:!!set# List of supported languages for the converter.en:nullmodel:google-gla:gemini-3.8-flash# Identifier for an AI model, optionally including provider.system_prompt:'#Optionalsystemprompttoguideconversion.YouareaOCRenginethatcanparsePDFdocuments&imagesintomarkdownformattedtext.'user_prompt:'#Custompromptfortheconversiontask.ConvertthisPDFdocumenttomarkdownformatPreservetheoriginalformattingandstructurewherepossible.Includeanyimportanttablesorlists.Describeanyimagesyouseeinbrackets.IndicatepagebreakswithaspeciallyformattedJSONcomment,like<!--docler:page_break{"next_page":2}-->forpage2.Onlyrespondwiththecontent,nothingelse.'
providers:-type:markitdownpage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).languages:!!set# List of supported languages for the converter.en:null
providers:-type:mistralpage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).languages:!!set# List of supported languages for the converter.en:nullapi_key:'!ENVENV_VAR_NAME'# Mistral API key. If None, will try env var MISTRAL_API_KEY.
providers:-type:llamaparsepage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).languages:!!set# List of supported languages for the converter.en:nullapi_key:'!ENVENV_VAR_NAME'# LlamaParse API key. Falls back to LLAMAPARSE_API_KEY env var.adaptive_long_table:false# Whether to use adaptive long table.parse_mode:parse_page_with_llm# Legacy parse mode, used when no tier is set.tier:null# Parsing tier. Takes precedence over parse_mode when set.skip_diagonal_text:false# Whether to skip diagonal text.disable_ocr:false# Whether to disable OCR for images.continuous_mode:true# Merge tables spanning pages. Only supported with a tier.html_tables:false# Whether to output HTML tables instead of markdown.
providers:-type:azurepage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).languages:!!set# List of supported languages for the converter.en:nullendpoint:null# Azure endpoint URL. Falls back to AZURE_DOC_INTELLIGENCE_ENDPOINT envvar.api_key:'!ENVENV_VAR_NAME'# Azure API key. Falls back to AZURE_DOC_INTELLIGENCE_KEY env var.model:prebuilt-layout# Pre-trained model to use.additional_features:!!set{}# Optional add-on capabilities like BARCODES, FORMULAS, OCR_HIGH_RESOLUTION etc.
providers:-type:upstagepage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).api_key:'!ENVENV_VAR_NAME'# Upstage API key. Falls back to UPSTAGE_API_KEY env var.base_url:!!python/object:pydantic.networks.HttpUrl# API endpoint URL._url:!!python/object/new:pydantic_core._pydantic_core.Url-https://api.upstage.ai/v1/document-ai/document-parseocr:auto# OCR mode ('auto' or 'force').base64_categories:!!set# Element categories to encode in base64.figure:nullchart:null
providers:-type:markerpage_range:null# Page range(s) to extract, like "1-5,7-10" (1-based).dpi:192# DPI setting for image extraction.llm_provider:null# Language model provider to use for OCR.