Strands Agents SDK on Amazon Bedrock AgentCore. Hierarchical orchestration via agent-as-tool pattern.
agents/
├── supervisor/ # Supervisor Agent — orchestrates all sub-agents
├── chunking/ # Chunking Agent — splits PDF into logical chunks
├── extraction/ # Extraction Agent(s) — parallel field extraction per chunk
├── mapping/ # Mapping Agent — merges extractions into output JSON
├── validation/ # Validation Agent — schema validation and fix-up
├── shared/ # Shared tools, prompts, schemas, S3/DB utilities
└── infra/ # CDK/SAM — AgentCore agent definitions, Bedrock KBs, Prompt Management, Guardrails, SSM parameters
Supervisor
├── 1. Chunking Agent (chunk_size, pages_per_chunk, PDF path)
├── 2. Extraction Agent(s) (parallel — one per chunk, with field definitions)
├── 3. Mapping Agent (extraction results + output schema)
└── 4. Validation Agent (mapped JSON + output schema)
- Runtime: Amazon Bedrock AgentCore
- LLM Routing: LiteLLM Gateway on ECS Fargate
- Guardrails: Amazon Bedrock Guardrails
- Prompt Management: Amazon Bedrock Prompt Management
- Schema Knowledge: Amazon Bedrock Knowledge Bases
Each agent that runs locally or on AgentCore needs a .env file. Create one from the provided template:
cd agents/supervisor
cp .env.example .env
# Edit .env and fill in your valuesKey variables to configure (see the root README for full details):
| Variable | Description | How to get it |
|---|---|---|
LLM_GATEWAY_URL |
Internal ALB endpoint | From LLM Gateway CDK output (AlbDnsName), prefixed with http:// for internal VPC traffic |
LLM_GATEWAY_API_KEY |
Gateway API key (local dev) | The LITELLM_ADMIN_KEY you generated for the LLM Gateway |
AWS_ACCOUNT_ID |
Your AWS account ID | Your 12-digit account ID |
In production on AgentCore, the agent reads the API key from AWS Secrets Manager. The secret is created automatically by the LLM Gateway CDK stack (document-processing/llm-gateway/admin-key). Set the LLM_GATEWAY_API_KEY_SECRET_ARN environment variable to the ARN from the LLM Gateway CDK output.
The .bedrock_agentcore.yaml file is generated by the AgentCore CLI during agentcore init and contains your account-specific resource ARNs. It is git-ignored. See .bedrock_agentcore.example.yaml for the expected structure with placeholder values.