Skip to content

Commit a6d5a37

Browse files
authored
Merge pull request #192 from Nadanne1/sync-kyc-workflow-with-upstream
Sync KYC workflow README and pyproject.toml with upstream
2 parents a0862fd + cc5559b commit a6d5a37

2 files changed

Lines changed: 34 additions & 4 deletions

File tree

llamaindex/agentcore-kyc-workflow/README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# KYC Document Verification — LlamaIndex Workflows on AWS Bedrock AgentCore
1+
# KYC Verification Agent on AWS Bedrock AgentCore
22

33
Deploy 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/)
66
running on AgentCore can automate real-world compliance tasks — extracting
77
structured data from identity documents and cross-validating them with Claude.
88

99
## What It Does
1010

1111
1. **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).
1515
2. **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

128141
Run the workflow locally without deploying to AgentCore:
@@ -132,6 +145,23 @@ Run the workflow locally without deploying to AgentCore:
132145
python 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

llamaindex/agentcore-kyc-workflow/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
requires-python = ">=3.10"
55
dependencies = [
66
"llama-index-workflows>=0.1.0",
7-
"llama-agents-agentcore==0.8.16",
7+
"llama-agents-agentcore>=0.8.16",
88
"llama-agents-server>=0.4.4",
99
"python-dotenv>=1.0.0",
1010
"llama-cloud>=2.1",

0 commit comments

Comments
 (0)