Available Nodes
| Node | Description | Provider |
|---|---|---|
| parse | Convert documents to DocumentIR using OCR or VLM | OCR or VLM |
| extract | Extract structured data matching a JSON Schema | VLM or LLM |
| split | Identify document boundaries in multi-doc PDFs | VLM |
| categorize | Classify documents into predefined categories | VLM |
| chunk | Split documents into chunks for RAG/embeddings | None |
| combine | Merge results from parallel processing | None |
| output | Control which data is returned from a flow | None |
Import
All nodes are exported from@docloai/flows:
Basic Usage
Nodes are functions that return configured node objects. Use them withcreateFlow().step():
Node Types
Provider Nodes
Nodes that require an AI provider to process documents:- parse - Requires OCR or VLM provider
- extract - Requires VLM (for images/PDFs) or LLM (for text)
- split - Requires VLM provider
- categorize - Requires VLM provider
Utility Nodes
Nodes that transform data without calling external providers:- chunk - Splits DocumentIR into smaller pieces
- combine - Merges results from parallel operations
- output - Selects and transforms final output
Common Patterns
Direct VLM Extraction
Fastest path for simple documents:OCR → LLM Extraction
Most accurate path for text-heavy documents:Split → Process Each
Handle multi-document PDFs:Categorize → Route
Route to different schemas:Consensus Support
Most provider nodes support consensus voting for improved accuracy:Node Execution
Each node execution produces:- Output: The transformed data
- Metrics: Duration, cost, token usage