You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add container deployment support for AgentCore Runtime (#334)
* Add container agent support
- Add Container as a build type for agents (create, add, dev, deploy, invoke, package)
- Add Dockerfile and dockerignore templates for Python container agents
- Add container dev server with Docker build, run, volume mount, and hot-reload
- Add container packaging with Docker runtime detection and validation
- Add Docker prerequisite check and runtime detection utility
- Wire userId (default: "default-user") through invoke flow for container auth
- Log userId in invoke request logs
- Upgrade vended @aws/agentcore-cdk to ^0.1.0-alpha.2
- Fix eslint require-await errors in codezip-dev-server and container packaging
- Simplify BaseRenderer to use copyAndRenderDir for container templates
* Fix CI: add missing buildType in test, revert CDK dep to alpha.1
- Add buildType: 'CodeZip' to schema-mapper test baseConfig (merge artifact)
- Revert @aws/agentcore-cdk to ^0.1.0-alpha.1 (alpha.2 not yet published;
semver ^0.1.0-alpha.1 already covers alpha.2 once available)
* fix: sequential port checks to avoid bind race condition
* test: add unit tests for container agent support
* Address PR review feedback for container support
- Add port comments to Dockerfile EXPOSE directive
- Fix container runtime null check (info.runtime !== null)
- Use path.join() in getDockerfilePath for cross-platform support
- Use CONTAINER_RUNTIMES constant instead of hardcoded array
- Change dynamic import to static import in container-dev-server
- Check ports sequentially to avoid bind race conditions
* fix: defer load_model() to first invocation for Container build compatibility
In Container builds, the Python module loads at container startup before
any request context exists. API-key-based providers use @requires_api_key
which needs a workload access token only available within request context,
causing ValueError at import time.
Defer load_model() using lazy initialization in all affected templates:
- Strands: get_or_create_agent() singleton
- LangChain/LangGraph: get_or_create_model() singleton
- Google ADK / OpenAI Agents: ensure_credentials_loaded() guard
---------
0 commit comments