Skip to content

CLI scaffold generates template incompatible with latest a2a-sdk: ModuleNotFoundError: No module named 'a2a.server.apps' #1096

@BEASTSHRIRAM

Description

@BEASTSHRIRAM

Description

Bug Description

AgentCore CLI scaffold generates a main.py template that uses
a2a.server.apps.A2AStarletteApplication which does not exist
in the latest a2a-sdk versions, causing an immediate crash on
agentcore dev.

Environment

  • OS: Windows 11
  • Python: 3.13
  • bedrock-agentcore: 1.8.0
  • a2a-sdk: 0.2.x

Additional Context

  • a2a.server.apps module does not exist in current a2a-sdk
  • Earlier error also seen: ImportError: cannot import name 'new_task' from 'a2a.utils'
  • Both errors indicate scaffold template is pinned to an older
    a2a-sdk API that has since changed
  • pyproject.toml specifies a2a-sdk >= 0.2.0 but
    the imported modules don't exist in that version

Suggested Fix

Either:

  1. Pin a2a-sdk to the exact version compatible with current
    scaffold template
  2. Update scaffold template imports to match latest a2a-sdk API
  3. Add version compatibility check in agentcore init command

Steps to Reproduce

Steps to Reproduce

  1. agentcore init MyAgent
  2. cd into project
  3. agentcore dev

Expected Behavior

Expected Behavior

agentcore dev should run successfully after scaffolding.

Actual Behavior

Error

ModuleNotFoundError: No module named 'a2a.server.apps'
File "bedrock_agentcore\runtime\a2a.py", line 207, in build_a2a_app
    from a2a.server.apps import A2AStarletteApplication
Image

CLI Version

0.13.0

Operating System

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions