Amazon Bedrock AgentCore runtime
Amazon Bedrock AgentCore is the managed container runtime that hosts the AVX supervisor agent. It handles container lifecycle, WebSocket connection management, SigV4 authentication, and session multiplexing, freeing the agent code to focus on orchestration.
Two runtime modes
AVX deploys two AgentCore runtimes from the same supervisor code base:
| Runtime mode | Transport | Use case |
|---|---|---|
|
Bidirectional voice (bidi) |
WebSocket — persistent bidirectional stream |
Amazon Connect voice, iOS/mobile companion app, hands-free driver experience |
|
Text / HTTP |
HTTP unary — request/response |
Web chat, CMS Fleet Intelligence portal |
Both runtimes share the same supervisor agent logic and tool catalog; the difference is the Strands model class (BidiNovaSonicModel for voice, BedrockModel for text) and the entry-point file.
Runtime entry point pattern
The AgentCore runtime is wired through the Strands BedrockAgentCoreApp decorator:
from bedrock_agentcore.runtime import BedrockAgentCoreApp app = BedrockAgentCoreApp() @app.entrypoint def handler(payload, context): session_id = getattr(context, 'session_id', 'default') user_message = payload.get('prompt', '') # ... agent orchestration ... return str(result) app.run()
For the bidi voice runtime the entry point uses @app.websocket instead, and the handler receives raw WebSocket frames rather than a payload dict. The BidiAgent.run(inputs, outputs) pump manages the bidirectional audio/transcript stream.
Execution role and IAM grants
The AgentCore execution role must trust bedrock-agentcore.amazonaws.com and carry grants for every AWS API the agent invokes at runtime. Key grants for AVX:
| Grant | Purpose |
|---|---|
|
|
Strands |
|
|
Bidirectional audio streaming to Nova 2 Sonic |
|
|
Cross-account RAG grounding for reference tools |
|
|
AgentCore Memory LTM reads and writes for session grounding |
|
|
Cross-region ADP data-lake queries at session-init time |
|
|
Lake Formation credential vending for S3 access gated by column/row filters |
|
|
Live vehicle state and booking writes |
Note
Foundation-model ARNs carry no account ID (arn:aws:bedrock:<region>::foundation-model/<id>). Cross-region inference-profile ARNs require the account ID (arn:aws:bedrock:<region>:<account>:inference-profile/<id>). Both forms must be present in the IAM policy for Strands ConverseStream to succeed.
Deployment
AVX uses the agentcore CLI from the AgentCore starter toolkit:
agentcore configure -e agents/supervisor/agentcore_app.py agentcore deploy --auto-update-on-conflict \ --env CMS_STAGE=staging \ --env VSA_STAGE=staging \ --env AWS_REGION=us-west-2 \ --env NOVA_SONIC_REGION=us-east-1
The --auto-update-on-conflict flag updates an existing runtime in place (idempotent by runtime name). Environment variables injected via --env are available to the handler as os.environ values. The CDK stack (vsa-staging-core) provisions the execution role and supporting infrastructure; the AgentCore runtime itself is provisioned by the CLI outside CDK.