Summary
Migrate the A2A runtime integration (src/bedrock_agentcore/runtime/a2a.py) to support a2a-sdk v1.x. The SDK currently only works with a2a-sdk 0.3.x; #438 reported that v1.0+ breaks at import time, and PR (cap fix) pins a2a-sdk[http-server]>=0.3,<1.0 as a stopgap. This issue tracks lifting that cap by porting to the new v1.x server API.
Background
a2a-sdk v1.0.0 (March 2026) redesigned the server API. Verified against a2a-sdk 1.1.0:
What a2a.py uses today (0.3.x) |
Status in v1.x |
a2a.server.apps (module) |
❌ removed — replaced by a2a.server.routes |
a2a.server.apps.A2AStarletteApplication |
❌ removed — app model replaced (create_jsonrpc_routes, add_a2a_routes_to_fastapi) |
a2a.server.apps.CallContextBuilder |
❌ removed — replaced by a2a.server.routes.ServerCallContextBuilder / DefaultServerCallContextBuilder |
a2a.types.DataPart |
❌ moved — now under a2a.compat.v0_3.types |
a2a.server.request_handlers.DefaultRequestHandler |
✅ still present |
a2a.server.tasks.InMemoryTaskStore |
✅ still present |
a2a.server.context.ServerCallContext |
✅ still present |
a2a.types.AgentCard / AgentCapabilities / AgentSkill |
✅ still present |
Scope of work
- Rewrite
build_a2a_app() to construct the app via the v1.x a2a.server.routes API instead of A2AStarletteApplication.add_routes_to_app().
- Replace
BedrockCallContextBuilder's base (CallContextBuilder) with the v1.x ServerCallContextBuilder interface, preserving the Bedrock header/baggage extraction behavior.
- Audit all
a2a.* imports in a2a.py against v1.x and update moved symbols.
- Decide on the support window: either move the floor to
>=1.0 (drop 0.3.x), or support both 0.3.x and 1.x behind a version check. Recommendation to be settled in the PR.
- Update the
a2a extra pin in pyproject.toml accordingly and refresh uv.lock.
- Update
src/bedrock_agentcore/runtime/a2a.py docstrings/README A2A examples.
- Add/adjust tests to cover the v1.x code path.
Acceptance criteria
pip install "bedrock-agentcore[a2a]" with a2a-sdk v1.x installed starts the server via serve_a2a without ModuleNotFoundError.
- A2A server starts on port 9000 and serves the agent card +
/ping.
- Tests pass against the supported a2a-sdk version(s).
Related
Summary
Migrate the A2A runtime integration (
src/bedrock_agentcore/runtime/a2a.py) to support a2a-sdk v1.x. The SDK currently only works with a2a-sdk0.3.x; #438 reported that v1.0+ breaks at import time, and PR (cap fix) pinsa2a-sdk[http-server]>=0.3,<1.0as a stopgap. This issue tracks lifting that cap by porting to the new v1.x server API.Background
a2a-sdk v1.0.0 (March 2026) redesigned the server API. Verified against a2a-sdk
1.1.0:a2a.pyuses today (0.3.x)a2a.server.apps(module)a2a.server.routesa2a.server.apps.A2AStarletteApplicationcreate_jsonrpc_routes,add_a2a_routes_to_fastapi)a2a.server.apps.CallContextBuildera2a.server.routes.ServerCallContextBuilder/DefaultServerCallContextBuildera2a.types.DataParta2a.compat.v0_3.typesa2a.server.request_handlers.DefaultRequestHandlera2a.server.tasks.InMemoryTaskStorea2a.server.context.ServerCallContexta2a.types.AgentCard/AgentCapabilities/AgentSkillScope of work
build_a2a_app()to construct the app via the v1.xa2a.server.routesAPI instead ofA2AStarletteApplication.add_routes_to_app().BedrockCallContextBuilder's base (CallContextBuilder) with the v1.xServerCallContextBuilderinterface, preserving the Bedrock header/baggage extraction behavior.a2a.*imports ina2a.pyagainst v1.x and update moved symbols.>=1.0(drop 0.3.x), or support both 0.3.x and 1.x behind a version check. Recommendation to be settled in the PR.a2aextra pin inpyproject.tomlaccordingly and refreshuv.lock.src/bedrock_agentcore/runtime/a2a.pydocstrings/README A2A examples.Acceptance criteria
pip install "bedrock-agentcore[a2a]"with a2a-sdk v1.x installed starts the server viaserve_a2awithoutModuleNotFoundError./ping.Related