ai newsDo., 15. Okt.
EilmeldungMeta and Apple team up to make Muse AI models run better on Macs

Amazon Bedrock AgentCore automatisiert Dokumentenverarbeitung mit KI-Agenten

Ein agentic System auf Basis von Amazon Bedrock AgentCore klassifiziert, extrahiert und validiert Geschäftsdokumente weitgehend ohne manuelle Vorlagen. Neue Dokumentformate werden automatisch erlernt.

AWS ML BlogMittwoch 18:24 · 14.10.DE7 Min. Lesezeit
Bild: AWS ML Blog

IDC research shows that document-related challenges cost organizations $19,732 for each information worker annually and reduce productivity by 21.3 percent. Organizations receiving invoices from hundreds of suppliers often face layouts that vary by issuer and change without notice. Template-based systems require constant maintenance at this scale. Staff can spend up to 30 percent of their time on document-related tasks, and manual data entry error rates range from 1–4 percent. Conventional intelligent document processing (IDP) solutions address some of this burden, but they require extensive upfront configuration for each document format and break when layouts vary across vendors.

In this post, you learn how to build an agentic IDP system using Amazon Bedrock AgentCore that classifies, extracts, validates, and learns from business documents with minimal human intervention. Amazon Bedrock AgentCore is a platform to build, connect, and optimize agents at scale, with any framework or model. Your agents automatically handle new document formats, such as supplier invoices, purchase orders, insurance claims, and loan applications. By the end of this post, you can:

Many IDP pipelines require you to define templates, extraction rules, and validation logic for every document format upfront. When a new vendor sends a purchase order with a different layout, the pipeline breaks. This creates three core challenges:

An agentic approach addresses these challenges. Instead of static templates, AI agents analyze each document, generate extraction instructions, validate results, and learn from corrections automatically. Over time, your system builds a knowledge base of document formats, so you process similar documents with minimal additional configuration.

In this solution, eight specialized agents collaborate across two graph-based workflows running on Amazon Bedrock AgentCore.

The following diagram shows the multi-agent workflow graph built using Strands Agents, an open source SDK for building AI agents.

Figure 1: Multi-agent orchestration workflow graph

The following diagram shows the infrastructure architecture for the solution.

Figure 2: Agentic IDP infrastructure architecture on AWS

Follow these steps to deploy the solution infrastructure and web UI to your AWS account.

git clone https://github.com/aws-samples/agenticidp-guidance.git cd agenticidp-guidance uv venv source.venv/bin/activate uv pip install -r requirements.txt cd ui/orchestrator npm install cd../.. Deploy the stacks: uv run deploy.py --admin-email your-email@example.com This deploys six AWS CloudFormation stacks: Core (S3, Cognito, DynamoDB), Gateway (Lambda tools, AgentCore Gateway), Aurora (Amazon Aurora DSQL), Agent (AgentCore runtime, containers), UI Orchestrator (API endpoints), and Modern UI (React app on Amazon CloudFront ). Deployment takes approximately 15–20 minutes.

After deployment, you receive an email with the CloudFront URL, username, and temporary password.

Suppose you upload the first purchase order from a new retailer, Two Wheel Store. The Matcher agent searches the vector store, finds no similar document, and routes the job through the training workflow.

The Analyzer agent uses Amazon Textract to extract the raw document text:

# PURCHASE ORDER FROM: Two Wheel Store Order #: PO-2026-0102-2584 Date: 2026-01-02 ## Items Ordered AC-021 Advanced Computer Qty: 1 $75.61 Colors: cr4321 @ $75.61... SB-004 Folding Classic Qty: 8 $9634.32 Colors: cb8901 I Sizes: S @ $1204.29 TOTAL: $14931.54 The Instructions agent generates extraction prompts from the schema, and the Extractor agent produces structured JSON:

{ "po_number": "PO-2026-0102-2584", "retailer_name": "Two Wheel Store", "order_date": "2026-01-02T00:00:00Z", "line_items": [ { "sku": "AC-021", "product_name": "Advanced Computer", "quantity": 1, "unit_price": 75.61, "line_total": 75.61 }, { "sku": "SB-004", "product_name": "Folding Classic", "quantity": 8, "unit_price": 1204.29, "line_total": 9634.32 } ], "order_total": 14931.54 } The Validator agent checks the result against the schema and fails:

validation_status: INVALID error: 'SB-004' does not match '^AB-[A-Z]{2}-\d{3}$' The vendor’s SKU format ( SB-004 ) doesn’t match Acme Bikes’ internal format ( AB-SB-004 ). The Instructions Fixer agent diagnoses the mismatch and adds an explicit SKU transformation rule to the extraction prompt: prefix vendor SKUs with AB-. On the second pass, the seven line items validate successfully, and the Save Instructions agent persists the refined prompt to the vector store. End-to-end time for this first run: 3 minutes 49 seconds.

When a second purchase order from Two Wheel Store arrives, the Matcher agent finds the stored instructions from the first run with a confidence score of 3.946 (threshold: 3.7) and routes the job through the automation workflow:

The dashboard includes a chat interface for troubleshooting:

The system improves over time through two feedback loops:

When changing models, use AgentCore Evaluations, a capability of Amazon Bedrock AgentCore, to confirm that extraction quality remains acceptable. The solution already uses AgentCore Observability, so it has the required instrumentation.

You pay only for what you use, because the solution runs on serverless and on-demand resources with no idle costs. For a workload of 10 training documents and 1,000 processed documents each month in US East (N. Virginia), the estimated cost is approximately $58 per month. Foundation model (FM) inference through Amazon Bedrock represents approximately 85 percent of the total cost, at roughly $0.055 per document. Actual cost depends largely on the models assigned to each agent. Model choices are centralized in agents/orchestratorgraph/utils/config.py, so you can use lower-cost models for simpler tasks and stronger models where needed. For detailed pricing, refer to the Amazon Bedrock pricing page.

You get a purchase order processing use case with a synthetic bike company dataset, a pre-built JSON schema, and a validation Lambda function that checks extracted data against product and vendor records in a mock ERP database. To process your own documents, you must replace the included schemas and validation logic with your own.

Create a JSON schema that defines the fields you want to extract for each document type. The sample purchase order schema in agents/orchestratorgraph/doc_schema/purchase_order_schema.json provides a reference. Your schema should specify field names, data types, and whether each field is explicitly stated in the document or inferred from context.

The included validator checks purchase order data against synthetic vendor and product tables in Aurora DSQL. Your production implementation requires a validation process tailored to your business rules. For example:

To add a new validator, create a Lambda function that accepts extracted JSON and returns a pass/fail result with detailed error messages, then register it as a tool in AgentCore Gateway. Refer to gateway/tools/po_validator_tool/ for the implementation pattern.

The agent prompts in agents/orchestratorgraph/prompts/ reference purchase order terminology. Update these prompts to reflect your document types and extraction requirements. The Orchestrator agent, Validator agent, and Instructions agent each contain document-type-specific language that you should adapt.

Keep these recommendations in mind as you train and operate your agentic IDP system.

Important: Before running cleanup, export the data you want to retain. The destroy.py script permanently deletes processed documents (S3), job history (DynamoDB), validation data (Aurora DSQL), and learned extraction instructions (vector store).

To avoid ongoing charges, remove the deployed resources:

uv run destroy.py Verify that the six CloudFormation stacks are deleted on the console: AgenticIDP-Core-Dev, AgenticIDP-Gateway-Dev, AgenticIDP-Aurora-Dev, AgenticIDP-Agent-Dev, AgenticIDP-UIOrchestr-Dev, and AgenticIDP-ModernUI-Dev.

In this post, you learned how to build a self-improving document processing system using Amazon Bedrock AgentCore, where specialized AI agents collaborate to classify, extract, validate, and learn from business documents. This agentic approach adapts to new document formats automatically and improves accuracy over time through feedback loops, replacing manual template configuration with autonomous learning.

To learn more about the services and patterns used in this post, refer to the following resources:

For expert guidance on building document processing solutions, AWS Professional Services and AWS Partners can help.

Erik is a Solutions Architect at AWS serving customers in Georgia. He is passionate about applying cloud technologies and machine learning to solve real life problem. When he is not designing cloud solutions, Erik enjoys travel, cooking, and cycling.

Vivek is a Solution Architect at Amazon Web Services, where he helps organizations architect and implement cutting-edge cloud solutions. With a deep passion for Generative AI, Machine Learning, and Serverless technologies, he specializes in helping customers harness these innovations to drive business transformation. He finds particular satisfaction in collaborating with customers to turn their ambitious technological visions into reality.

Sourabh is a Senior Solutions Architect with over 8 years of experience developing cloud solutions that drive better business outcomes for organizations worldwide. He specializes in architecting and implementing robust cloud software solutions, with extensive experience working alongside global Fortune 500 teams across diverse time zones and cultures.

Originaltitel: Build self-improving document processing using Amazon Bedrock AgentCoreQuelle: AWS ML Blog (AWS ML Blog). Original öffnen