OCR text recognition
For AI Agents: the Markdown version of this page is at https://ankole.agentbull.com/en-US/docs/ocr/index.md. The documentation index is at https://ankole.agentbull.com/en-US/llms.txt.
Send a scanned document or image to an Agent and ask for the text that you need. Because Ankole bundles local OCR inside the Agent Computer Worker, you do not need to configure an external vision Provider, an API key, or a third-party OCR service.
For example, you can ask:
Read all text in this screenshot and keep the original reading order.
Extract pages 2 to 5 from this scanned PDF. Mark any text that you cannot read with confidence.
Read this receipt and list the merchant, date, items, tax, and total.
Advanced recognition on ordinary CPUs
Ankole runs the CPU-capable PaddleOCR PP-OCRv6 medium detection and recognition models—the accuracy-focused tier of the PP-OCRv6 family. On PaddleOCR’s in-house multi-scenario benchmark, PP-OCRv6 medium improves detection Hmean by 4.6 percentage points and recognition accuracy by 5.1 percentage points over PP-OCRv5_server.
A single model covers 50 languages, including Simplified Chinese, Traditional Chinese, English, Japanese, and 46 Latin-script languages. Beyond flat document scans, it handles text in natural scenes such as screenshots, street signs, product labels, and digital displays.
Workers execute these models locally through OpenVINO on the CPU, delivering fast text recognition without a GPU. Because the model weights ship inside the Worker image, documents stay inside your deployment rather than going to an external OCR service, with no per-page fees.
Ankole selects the accurate path
Because OCR estimates characters from pixels whereas native extraction reads exact character codes, Ankole automatically chooses the most accurate method for each file:
- PDF with an embedded text layer: the Agent extracts the original text directly.
- Fully scanned PDF: the Agent runs OCR across every page.
- Mixed PDF: the Agent extracts embedded text where available and runs OCR only on scanned pages.
- DOCX, PPTX, and XLSX files: the Agent parses the native document structure rather than rasterizing pages into images.
You never have to specify which extraction method to use—simply attach the original file and describe the output you want.
What the Agent can return
From the recognized text, the Agent can return raw transcripts, cleaned prose, summaries, or structured fields. Because the OCR engine also reports bounding-box coordinates and per-line confidence scores, the Agent can preserve multi-column reading order and flag low-confidence passages on degraded scans.
For best accuracy, send a sharp, upright image at full resolution—prefer the original file over a compressed chat screenshot when dealing with fine print. You can also ask the Agent to highlight uncertain lines explicitly instead of guessing.
Use an OCR model through AIGateway
The ocr Skill also shows the Agent how to call the AIGateway OCR API. When an administrator binds an OCR model to the OCR model slot in Console → Default model profiles, the Agent can send a scanned PDF or an image to that model and get Markdown back page by page. Such a model reads the scripts and layouts that it was built for, and its provider bills each page. Without a bound OCR model, the API passes one image to a language model that accepts images.
The Agent decides for each document whether to recognize it locally, send it to the OCR API, or read an image with its own vision. You can also tell it which one to use.
Limits
- The local model does not cover scripts outside its 50 languages, including Korean, Arabic, Cyrillic, and Thai. An OCR model behind the OCR API can cover them.
- Cursive handwriting, mathematical formulas, complex tables, curved text, and blurry or heavily skewed photos can reduce recognition accuracy. Tables are extracted as positioned text lines rather than a reconstructed table grid.
- Running OCR extracts text for the Agent to use, but does not embed a searchable text layer back into the source PDF.
The ocr Skill is enabled by default. If an Agent reports that OCR is unavailable, verify that its Worker runs a current Worker image and that the ocr Skill is enabled in Agent Library.