Extract text from scanned documents, invoices, receipts, and forms automatically. OE Runtime uses Azure Vision to run OCR, classifies the document type, and structures the extracted data into ready-to-use fields — no manual data entry required.
Create a file called agent.yaml inside an ocr-vision/ directory:
name: Document Reader description: Extract and analyze text from images using OCR instructions: | You are a document analysis agent. Extract text from images using OCR, then analyze, classify, and summarize the extracted content. Complete all steps fully before writing your report. steps: - name: Extract Text content: | Run OCR on the image provided via the Azure Vision connector. Extract all visible text — preserve the reading order and layout as closely as possible. Note any regions where text confidence is low. - name: Classify and Structure content: | Analyze the extracted text to determine the document type (invoice, receipt, contract, ID, form, letter, or other). Extract key structured fields based on type — e.g. for an invoice: vendor, date, line items, total. - name: Report content: | Produce a document analysis result: - Document type identified - Structured fields extracted with values - Full raw text extracted - Any low-confidence regions or unreadable sections - Suggested next action (e.g. file, process payment, follow up) connectors: - connection_name: Azure Vision connection_type: azure-vision
Create oe-config.json in the same directory:
{
"llm": {
"provider": "openai",
"model": "gpt-4o",
"apiKey": "YOUR_OPENAI_API_KEY"
},
"server": {
"enabled": false,
"port": 3333,
"apiKey": "your-secret-api-key"
},
"connectors": [
{
"connection_name": "Azure Vision",
"connection_type": "azure-vision",
"endpoint": "https://YOUR_RESOURCE.cognitiveservices.azure.com",
"apiKey": "YOUR_AZURE_VISION_KEY"
}
]
}Create an Azure Computer Vision resource at portal.azure.com and copy the endpoint and API key from the resource's Keys and Endpoint page. The free tier (F0) allows up to 5,000 OCR transactions per month.
# Run the agent oe-runtime-win.exe ocr-vision/agent.yaml --config ocr-vision/oe-config.json
# Make executable (first time only) chmod +x oe-runtime-macos # Run the agent oe-runtime-macos ocr-vision/agent.yaml --config ocr-vision/oe-config.json
# Make executable (first time only) chmod +x oe-runtime-linux # Run the agent oe-runtime-linux ocr-vision/agent.yaml --config ocr-vision/oe-config.json
macOS Gatekeeper: On first run, macOS may block the binary. Go to System Settings → Privacy & Security → click "Allow Anyway" next to oe-runtime-macos.
Add --serve to start OE Runtime as an HTTP server on port 3333:
oe-runtime-win.exe --serve --config ocr-vision/oe-config.json
Then send a request:
curl -X POST http://localhost:3333/run \
-H "Content-Type: application/json" \
-d '{"yaml": "ocr-vision/agent.yaml", "params": {}}'Or import the Postman collection (download above) to test all endpoints visually.
Download OE Runtime and run any AI agent locally or as a server — no cloud required.
Get OE Runtime →