Agentic mode adds a vision-language model review layer to catch errors that single-pass OCR misses. You enable it per content type using scopes.
Basic Usage
result = client.parse.run(
input=upload.file_id,
enhance={
"agentic": [
{"scope": "text"},
{"scope": "table"},
{"scope": "figure", "advanced_chart_agent": True}
]
}
)
Each scope is independent. Enable only what you need.
Agentic modes are available in the Python SDK, Node.js SDK, and via cURL. The Go SDK does not yet support agentic modes.
Text Scope
Adds a second OCR pass using a vision-language model to correct text extraction errors.
enhance={"agentic": [{"scope": "text"}]}
What it fixes:
- Handwritten notes and signatures
- Small or faded text
- Special characters and mathematical notation
- Mixed fonts and styles
Custom prompts apply only to form regions (key-value fields like βName: John Doeβ), not body text:
enhance={"agentic": [{"scope": "text", "prompt": "Extract all dates in MM/DD/YYYY format"}]}
Table Scope
Uses a VLM to reconstruct table structure after initial extraction.
enhance={"agentic": [{"scope": "table"}]}
What it fixes:
- Merged cells (rowspan/colspan)
- Nested or multi-level headers
- Tables with missing or faint borders
- Rotated text in cells
Custom prompts guide the reconstruction:
enhance={"agentic": [{"scope": "table", "prompt": "Preserve currency symbols. Align rows by date."}]}
Enables enhanced figure processing. Without additional options, it uses more powerful models and better classifies figures as charts vs. images.
enhance={"agentic": [{"scope": "figure"}]}
To extract numerical data from charts as structured tables, enable advanced_chart_agent:
enhance={"agentic": [{"scope": "figure", "advanced_chart_agent": True}]}
| Option | What it does |
|---|
advanced_chart_agent | Extracts numerical values as structured tables |
prompt | Custom instructions for figure processing |
For details on chart types and the extraction pipeline, see Chart Extraction.
Separate from the figure scope, summarize_figures generates text descriptions of images and figures:
enhance={"summarize_figures": True} # This is the default
This is lightweight and on by default. It makes visual content searchable but doesnβt extract numerical data.
To disable it:
enhance={"summarize_figures": False}
When to Use What
| Situation | Configuration |
|---|
| Clean, digital-native PDFs | Skip agentic entirely |
| Documents with handwriting | {"scope": "text"} |
| Complex financial tables | {"scope": "table"} |
| Charts you need searchable | Default summarize_figures is enough |
| Charts you need data from | {"scope": "figure", "advanced_chart_agent": True} |
| All of the above | Combine all three scopes |
Cost and Latency
Each scope adds processing time and cost. For cost-sensitive workloads:
table scope alone handles the most common accuracy issues
text scope is most valuable for handwritten content
figure scope with advanced_chart_agent is expensive, so use only when you need numerical data from charts