Skip to main content

Document Intelligence

This example processes synthetic invoices and a purchase order through explicit ingestion, classification, extraction, reconciliation, and reporting activities. It verifies totals and duplicate invoice identifiers rather than stopping after text extraction.

Document Intelligence. Nodes in the same column can run in parallel once their dependencies complete.

Inputs

  • Versioned semi-structured invoices
  • Purchase-order fixture

Outputs

  • Document inventory
  • Classifications
  • Extracted fields and line items
  • Reconciliation JSON and CSV
  • Aggregate report

Provenance to preserve

  • Source hashes
  • Document-to-record mapping
  • Balance checks
  • Duplicate checks
  • Gross total
PUBLISHED ON AKÔFLOW HUB

Explore this workflow and its measured results

The interactive DAG, version and execution summary below come directly from the public Hub publication.

Open full experiment ↗
Import this exact version and download the research data

In Desktop, choose Create workflow → Import from Hub and paste this immutable URI:

akoflow://hub/publications/85d4152f-da21-4d6b-84d0-6cc937d8b96e/versions/1

Run this example locally

Read the bundled business documents, classify them, extract structured fields, reconcile invoice lines, and publish a checked report. Every stage performs local data processing and passes its files to the next activity.

Install Go and Python 3.12 or newer.

git clone https://github.com/UFFeScience/akoflow-examples.git &&
cd akoflow-examples &&
git checkout --detach showcase-hub-v1 &&
cd document-ai/document-intelligence &&
./prepare.sh &&
./run.sh

Run the block from the directory where you keep your repositories. If you already cloned the repository, enter this example's directory and run ./prepare.sh && ./run.sh.

Preparation downloads the Go module and any declared Python packages once. The workload then runs locally with offline input data. Every meaningful step is a separate process; independent activities run in parallel after their dependencies complete.

Read outputs/manifest.json for the generated artifacts, outputs/dag-validation.json for dependency waves, and outputs/stage-<activity>.json for each activity's observed result. A failed stage stops the run and prevents a successful final manifest.

Expected outputs: ingested.json, classified.json, extracted.json, reconciliation.json, invoice-summary.csv, report.json.

Run the same activities in Desktop

Start your local AkôFlow daemon with Docker available and configure AKOFLOW_API_TOKEN in your shell. From this example's directory, run:

go run ../../tools/daemon-local -root ../.. -example document-ai/document-intelligence

This command validates the daemon connection, builds the declared image, registers the local environment and workflow, and submits a real run. The daemon owns execution and file transfers. Open the printed run ID in Desktop to inspect each activity.

Execution evidence

Latest validated Docker execution: 5 / 5 activities completed. Open the measured run, logs, metrics and output downloads in Hub. The documentation screenshots below are historical reference captures; they are separate from the latest Hub execution.

Read the historical documentation execution record · Local output manifest

Open full resolution ↗Document Intelligence: observed activity DAG
The reference activity graph from the documentation capture. Click to see the complete image.

Each stage also ran through the standalone local command. Read the dependency and artifact validation.