Documentation Index
Fetch the complete documentation index at: https://docs.anyformat.ai/llms.txt
Use this file to discover all available pages before exploring further.
Agentic Parse to Markdown
A complete cookbook for the most powerful parse mode in anyformat: agentic parsing. Each block in the document is routed through a typed strategy (text / table / figure / dense-table-agent) instead of a single batched call, giving you better tables and richer figure descriptions. This recipe walks the full loop: create the workflow → upload a document → poll → retrieve markdown + confidence.What is Agentic Parsing?
Standard parsing sends every block to one LLM call with one prompt. Agentic parsing first routes each block (using a fast LLM with the page image) to the right specialised strategy:| Block type | Strategy | Why |
|---|---|---|
| Plain text | text-bytes-first | Cheap, fast — bypasses LLM entirely when source bytes are extractable |
| Tables | dense-table-agent | Tool-calling agent that handles spans, merged cells, multi-page tables |
| Figures / charts | single-call vision | LLM with image input for structured figure descriptions |
effort | Best for |
|---|---|
"low" | Simple documents, fast/cheap turnaround |
"mid" | Balanced default — recommended for most documents |
"accurate" | Highest quality on complex layouts; slowest |
Step 1 — Create the Workflow
UsePOST /v2/workflows/ with one parse node, agentic mode, no edges.
Step 2 — Upload a Document
Step 3 — Poll Until Processed
Agentic mode takes longer than standard mode — 30-90s for a typical 3-page document — because each block hits its own LLM strategy. Use webhooks (
extraction.completed event) instead of polling for production workloads.Step 4 — Read Results
The response carries the parsed markdown plus a document-level confidence score:Per-Block vs Document Confidence
Each<section> in the markdown carries its own data-confidence attribute (0-100), and the response has a top-level parse.confidence that aggregates them.
| When to use what |
|---|
parse.confidence — triage at the document level: “is this doc worth processing further, or send to manual review?” |
data-confidence per block — UI highlighting: dim or flag low-confidence regions inline so a human reviewer can focus their attention |
Mode caveat: in agentic mode, per-block strategies don’t always populate parser logprobs (e.g. the fast
text-bytes-first strategy never calls an LLM). When logprobs are absent, the score falls back to the YOLO layout-segmentation confidence — useful, but a measure of “is this region a table?” not “is the parsed content accurate?” For calibrated parser confidence comparable to extraction confidence, use mode="standard" with visual_grounding_enabled=true.Use with AI Coding Agents
Building an integration on top of anyformat? Install the anyformat agent skill so your AI coding agent (Claude Code, Cursor, etc.) knows the right endpoints, payloads, and gotchas out of the box.The anyformat agent skill is launching soon. The install command above is the planned interface — until it ships, you can copy the system prompt from the agent skill repository and paste it into your agent’s instructions.
- ✅ Recipes for typed-graph workflow creation (parse-only, linear, classify-branched, splitter)
- ✅ The right authentication header + endpoint URLs
- ✅ Polling/retry behavior for the results endpoint
- ✅ Confidence-aware processing patterns (when to trust
parse.confidence, when to look per-block) - ✅ Common pitfalls already baked in
Complete Recipe
A single pasteable script that does the whole loop:Next Steps
Create Workflow Reference
Full reference for the typed-graph endpoint
Parse-Only Workflow
Standard parse-only cookbook with the same endpoint
Add Extraction
Add an extract node after the parse step to pull structured fields
Webhooks
Skip polling — receive
extraction.completed events