1- # KYC Document Verification — LlamaIndex Workflows on AWS Bedrock AgentCore
1+ # KYC Verification Agent on AWS Bedrock AgentCore
22
33Deploy an AI-powered KYC (Know Your Customer) document verification agent to
44** AWS Bedrock AgentCore** in minutes. This example shows how
5- [ LlamaIndex Workflows] ( https://docs .llamaindex.ai/en/stable/understanding /workflows/ )
5+ [ LlamaIndex Workflows] ( https://developers .llamaindex.ai/python/llamaagents /workflows/ )
66running on AgentCore can automate real-world compliance tasks — extracting
77structured data from identity documents and cross-validating them with Claude.
88
99## What It Does
1010
11111 . ** Document Extraction** — Three identity documents (Government ID, Utility
1212 Bill, Bank Statement) are processed * in parallel* through
13- [ LlamaParse Extract] ( https://docs .llamaindex.ai/en/stable/llama_cloud/llama_extract / )
13+ [ LlamaParse Extract] ( https://developers .llamaindex.ai/python/cloud/llamaextract/getting_started / )
1414 to pull out structured fields (name, address, account details).
15152 . ** Cross-Validation** — Claude (via Amazon Bedrock) compares names and addresses
1616 across all three documents, handling abbreviations, formatting differences,
@@ -123,6 +123,19 @@ runtime at `localhost:8080` instead of the deployed agent.
123123
124124![ KYC Workflow Architecture] ( ../assets/tech-arch-kyc.png )
125125
126+ ### Async workflow + polling
127+
128+ ``` bash
129+ # Start without waiting
130+ python cli.py invoke --no-wait \
131+ --gov-id sample_docs/drivers_license.pdf \
132+ --utility-bill sample_docs/utility_bill.pdf \
133+ --bank-statement sample_docs/bank_statement.pdf
134+
135+ # Poll for result
136+ python cli.py status --handler-id < SESSION_ID>
137+ ```
138+
126139## Local Testing
127140
128141Run the workflow locally without deploying to AgentCore:
@@ -132,6 +145,23 @@ Run the workflow locally without deploying to AgentCore:
132145python workflow.py
133146```
134147
148+ Uses the sample documents in ` sample_docs/ ` and prints the KYC decision.
149+
150+ You can also launch the local AgentCore Runtime for testing:
151+
152+ ``` bash
153+ uv run python -m llama_agents.agentcore.main --local
154+ ```
155+
156+ Then, you can call the CLI with ` --local ` to target the local runtime.
157+
158+ ## IAM Roles
159+
160+ Deploy the CloudFormation stack in ` customer-iam-role.yaml ` to create:
161+
162+ - ** Deployment Role** — used by CodeBuild to build and push containers to ECR
163+ - ** Execution Role** — assumed by the AgentCore Runtime (needs ` bedrock:InvokeModel* ` for Claude)
164+
135165## Cleanup
136166
137167``` bash
0 commit comments