AWS has published a reference implementation for processing invoices, purchase orders and other changing document formats without creating a fixed template for every vendor. Eight specialized agents classify a file, extract its fields, check business rules and save successful instructions for similar documents.

For an unfamiliar layout, Amazon Textract first reads the file and an agent identifies its type and sender. If a vector search finds no close match, other agents generate extraction instructions, produce structured data and validate it against schemas in Aurora DSQL. A failed check triggers a prompt revision; successful instructions are stored for reuse. Known formats bypass that training path and go directly to extraction and validation.

In AWS’s sample, the first purchase order from a new retailer took 3 minutes 49 seconds because an agent had to learn a product-code transformation. A second file reused that rule and finished in 1 minute 30 seconds. These are tutorial examples, not measurements from a customer production system.

The deployment uses Bedrock AgentCore, S3, Lambda, DynamoDB, Cognito and several other AWS services. It requires access to supported Bedrock models and regions, Docker, Python and Node.js. AWS estimates roughly $58 per month for 10 training files and 1,000 processed documents in Northern Virginia, with model inference representing about 85 percent of that estimate. Actual accuracy and cost depend on document variability, validation rules and model choices.