# AI document processing

> AI agents read invoices, purchase orders, contracts, forms and emails, extract the fields you need, validate them, and write them into your systems.

Source: https://deepfounder.ai/use-cases/ai-document-processing/ · DeepFounder AI (MVPFCTRY LLC) · Free AI audit, pilots from 2 weeks · hello@deepfounder.ai

## Documents it handles

- Invoices and receipts: vendor, totals, line items, tax, due dates
- Purchase orders and bills of lading: items, quantities, references
- Contracts: parties, dates, renewal terms, key clauses
- Application and intake forms, including scans and photos
- Emails with attachments, where the document arrives

castor ingests 50+ formats, including PDF, Word, Excel, PowerPoint, HTML and images.

## How the flow works

1. **Intake:** watch a mailbox, a folder or an upload endpoint.
2. **Extraction:** the model reads the document and returns structured fields.
3. **Validation:** checks against rules and your data, for example totals add up or the vendor exists.
4. **Write-back:** create or update records in your ERP, accounting or CRM system.
5. **Exceptions:** anything uncertain goes to a review queue with the document and the extracted values side by side.

## Why AI instead of templates

Template-based OCR breaks when a vendor changes its layout. A language model reads the document the way a person does, so new layouts work without a new template. Rules still check the output.

## Sensitive documents

Contracts and financial records often cannot leave the company. With a local model, extraction runs on your own hardware. See [private AI](/services/private-ai-self-hosted-llm/).

## FAQ

### How accurate is it?
It depends on document quality and field type. We measure accuracy on your real documents during the pilot and route low-confidence items to review.

### Can it handle handwriting and scans?
Clear scans and photos work with vision-capable models. Poor-quality handwriting is routed to review.

### What systems can it write to?
Any system with an API, a database we can access, or an MCP server.
