crewai - ✅(Solved) Fix [BUG] Incompatibility between CrewAI 1.14.2 and a2a-sdk 1.0.1+ (Multiple Breaking Changes) [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
crewAIInc/crewAI#5607Fetched 2026-04-25 06:08:41
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
closed ×1commented ×1cross-referenced ×1labeled ×1

The A2A (Agent-to-Agent) module in CrewAI 1.14.2 is currently incompatible with the latest a2a-sdk (v1.0.x). Attempting to run a crew that uses A2AClientConfig results in an immediate ImportError because CrewAI references classes (like A2AClientHTTPError) that have been renamed or removed in the new SDK version. Beyond the initial import error, there appear to be further architectural changes in the SDK that prevent the crew from initializing.

Migration guide: https://github.com/a2aproject/a2a-python/blob/main/docs/migrations/v1_0/README.md

Error Message

Traceback (most recent call last): File "src/main.py", line 20, in <module> run() File "src/main.py", line 14, in run result = TestCrew().crew().kickoff(inputs=inputs) ... File "src/crew.py", line 83, in technical_architect_and_writer A2AClientConfig(...) File ".../pydantic/main.py", line 253, in init validated_self = self.pydantic_validator.validate_python(data, self_instance=self) File ".../crewai/a2a/config.py", line 53, in _get_default_update_config from crewai.a2a.updates import StreamingConfig File ".../crewai/a2a/updates/init.py", line 12, in <module> from crewai.a2a.updates.polling.handler import PollingHandler File ".../crewai/a2a/updates/polling/handler.py", line 11, in <module> from a2a.client.errors import A2AClientHTTPError ImportError: cannot import name 'A2AClientHTTPError' from 'a2a.client.errors'

Root Cause

The A2A (Agent-to-Agent) module in CrewAI 1.14.2 is currently incompatible with the latest a2a-sdk (v1.0.x). Attempting to run a crew that uses A2AClientConfig results in an immediate ImportError because CrewAI references classes (like A2AClientHTTPError) that have been renamed or removed in the new SDK version. Beyond the initial import error, there appear to be further architectural changes in the SDK that prevent the crew from initializing.

Fix Action

Fixed

PR fix notes

PR #5610: fix: Migrate crewai.a2a module to a2a-sdk v1.0.x (fixes #5607)

Description (problem / solution / changelog)

Summary

Fixes #5607 — CrewAI 1.14.2 is incompatible with a2a-sdk v1.0.1+ due to breaking API changes.

The a2a-sdk v1.0 migration introduced major breaking changes:

  • A2AClientHTTPError renamed to A2AClientError — the root cause of the reported ImportError
  • Protobuf-based types replace Pydantic modelsmodel_dump(), model_copy(), model_dump_json() no longer work
  • Enum values changed to SCREAMING_SNAKE_CASETaskState.completedTaskState.TASK_STATE_COMPLETED
  • TextPart/DataPart/FilePart removedPart now uses protobuf oneof (HasField() pattern)
  • AgentCard.url removed — URL now lives inside supported_interfaces
  • StreamResponse wraps all event types — no more bare tuples/messages
  • client.send_message() now takes SendMessageRequest — not a bare Message
  • Interceptor API changedintercept(method, ...)before(args: BeforeArgs)
  • ClientFactory.connect() removed — now ClientFactory().create_from_url()

Key changes

  1. New _compat.py compatibility layer — centralizes all migration concerns (enum aliases, Part helpers, AgentCard helpers, make_send_request, proto_to_json, etc.)
  2. Updated pyproject.tomla2a-sdk>=1.0.0,<2
  3. Updated all 15+ source files in crewai/a2a/ to use protobuf API patterns
  4. Updated existing tests to use v1.0 types and patterns
  5. Added 46 new tests in test_a2a_sdk_v1_compat.py covering imports, compat layer, Part helpers, Message helpers, AgentCard helpers, StreamResponse helpers, content type detection, and more

Review & Testing Checklist for Human

  • Verify the _compat.py helpers correctly abstract all v0.3→v1.0 differences — used across 15+ files
  • Check config.py A2AServerConfig — added arbitrary_types_allowed=True to allow protobuf types in Pydantic fields; verify config validation still works
  • Test with an actual A2A server to verify end-to-end streaming/polling/push notification flows work correctly
  • Verify push_notifications/config.pyAuthenticationInfo field changed to Any since protobuf types can't be directly used in Pydantic validators
  • Run the full test suite in CI to catch any transitive import/runtime issues

Notes

  • The pip-audit, type-checker, and tests CI failures are all pre-existing on main — not caused by this PR. Locally verified: main has 189 mypy errors vs 185 on this branch (net reduction of 4 errors).
  • All 144 tests in tests/a2a/ pass locally; the 3 VCR integration tests require a live A2A server
  • test_trust_remote_completion_status_true_returns_directly was already failing before this PR

Link to Devin session: https://app.devin.ai/sessions/ab6bb3edadb54e26a923f404b1d9cd6f

Changed files

  • lib/crewai/pyproject.toml (modified, +1/-1)
  • lib/crewai/src/crewai/a2a/_compat.py (added, +318/-0)
  • lib/crewai/src/crewai/a2a/auth/utils.py (modified, +32/-12)
  • lib/crewai/src/crewai/a2a/config.py (modified, +3/-1)
  • lib/crewai/src/crewai/a2a/extensions/registry.py (modified, +7/-24)
  • lib/crewai/src/crewai/a2a/task_helpers.py (modified, +78/-77)
  • lib/crewai/src/crewai/a2a/updates/polling/handler.py (modified, +28/-30)
  • lib/crewai/src/crewai/a2a/updates/push_notifications/config.py (modified, +2/-3)
  • lib/crewai/src/crewai/a2a/updates/push_notifications/handler.py (modified, +20/-20)
  • lib/crewai/src/crewai/a2a/updates/streaming/handler.py (modified, +175/-261)
  • lib/crewai/src/crewai/a2a/updates/streaming/params.py (modified, +5/-3)
  • lib/crewai/src/crewai/a2a/utils/agent_card.py (modified, +45/-20)
  • lib/crewai/src/crewai/a2a/utils/agent_card_signing.py (modified, +6/-1)
  • lib/crewai/src/crewai/a2a/utils/content_type.py (modified, +7/-8)
  • lib/crewai/src/crewai/a2a/utils/delegation.py (modified, +50/-55)
  • lib/crewai/src/crewai/a2a/utils/task.py (modified, +73/-41)
  • lib/crewai/src/crewai/a2a/utils/transport.py (modified, +28/-23)
  • lib/crewai/src/crewai/a2a/wrapper.py (modified, +28/-11)
  • lib/crewai/tests/a2a/test_a2a_integration.py (modified, +68/-64)
  • lib/crewai/tests/a2a/test_a2a_sdk_v1_compat.py (added, +517/-0)
  • lib/crewai/tests/a2a/utils/test_agent_card.py (modified, +15/-15)
  • lib/crewai/tests/a2a/utils/test_task.py (modified, +7/-6)
  • uv.lock (modified, +4852/-4796)

Code Example

@agent
  def technical_architect_and_writer(self) -> Agent:
    return Agent(
      config=self.agents_config['technical_architect_and_writer'],
      verbose=True,
      llm=llm_gemini,
      a2a=[
        A2AClientConfig(
            endpoint="http://localhost:8888/.well-known/agent-card.json",
            timeout=120,
            max_turns=5,
            fail_fast=False,
        )
        ],
    )

---

Traceback (most recent call last):
  File "src/main.py", line 20, in <module>
    run()
  File "src/main.py", line 14, in run
    result = TestCrew().crew().kickoff(inputs=inputs)
  ...
  File "src/crew.py", line 83, in technical_architect_and_writer
    A2AClientConfig(...)
  File ".../pydantic/main.py", line 253, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
  File ".../crewai/a2a/config.py", line 53, in _get_default_update_config
    from crewai.a2a.updates import StreamingConfig
  File ".../crewai/a2a/updates/__init__.py", line 12, in <module>
    from crewai.a2a.updates.polling.handler import PollingHandler
  File ".../crewai/a2a/updates/polling/handler.py", line 11, in <module>
    from a2a.client.errors import A2AClientHTTPError
ImportError: cannot import name 'A2AClientHTTPError' from 'a2a.client.errors'
RAW_BUFFERClick to expand / collapse

Description

The A2A (Agent-to-Agent) module in CrewAI 1.14.2 is currently incompatible with the latest a2a-sdk (v1.0.x). Attempting to run a crew that uses A2AClientConfig results in an immediate ImportError because CrewAI references classes (like A2AClientHTTPError) that have been renamed or removed in the new SDK version. Beyond the initial import error, there appear to be further architectural changes in the SDK that prevent the crew from initializing.

Migration guide: https://github.com/a2aproject/a2a-python/blob/main/docs/migrations/v1_0/README.md

Steps to Reproduce

  1. uv init

  2. uv add crewai==1.14.2 a2a-sdk

  3. Configure a Crew and a remote agent with A2AClientConfig.

  4. Attempt to run the crew.

Expected behavior

The Crew should initialize and start correctly.

Screenshots/Code snippets

  @agent
  def technical_architect_and_writer(self) -> Agent:
    return Agent(
      config=self.agents_config['technical_architect_and_writer'],
      verbose=True,
      llm=llm_gemini,
      a2a=[
        A2AClientConfig(
            endpoint="http://localhost:8888/.well-known/agent-card.json",
            timeout=120,
            max_turns=5,
            fail_fast=False,
        )
        ],
    )

Operating System

macOS Sonoma

Python Version

3.12

crewAI Version

1.14.2

crewAI Tools Version

1.14.2

Virtual Environment

Venv

Evidence

Traceback (most recent call last):
  File "src/main.py", line 20, in <module>
    run()
  File "src/main.py", line 14, in run
    result = TestCrew().crew().kickoff(inputs=inputs)
  ...
  File "src/crew.py", line 83, in technical_architect_and_writer
    A2AClientConfig(...)
  File ".../pydantic/main.py", line 253, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
  File ".../crewai/a2a/config.py", line 53, in _get_default_update_config
    from crewai.a2a.updates import StreamingConfig
  File ".../crewai/a2a/updates/__init__.py", line 12, in <module>
    from crewai.a2a.updates.polling.handler import PollingHandler
  File ".../crewai/a2a/updates/polling/handler.py", line 11, in <module>
    from a2a.client.errors import A2AClientHTTPError
ImportError: cannot import name 'A2AClientHTTPError' from 'a2a.client.errors'

Possible Solution

Short term: Update pyproject.toml in the CrewAI repository to pin a2a-sdk < 1.0.1.

Long term: Refactor crewai.a2a modules to align with the new class names and structures introduced in a2a-sdk 1.x.

Additional context

Python 3.13

extent analysis

TL;DR

Update the pyproject.toml file in the CrewAI repository to pin a2a-sdk to a version less than 1.0.1 as a short-term solution.

Guidance

  • Pin the a2a-sdk version to less than 1.0.1 in pyproject.toml to resolve the immediate import error.
  • Review the migration guide (https://github.com/a2aproject/a2a-python/blob/main/docs/migrations/v1_0/README.md) to understand the changes in the new SDK version.
  • Refactor the crewai.a2a modules to align with the new class names and structures introduced in a2a-sdk 1.x for a long-term solution.
  • Verify the fix by attempting to run the crew again after updating the pyproject.toml file.

Example

No code snippet is provided as the issue is related to version compatibility and import errors.

Notes

The provided solution is specific to the CrewAI version 1.14.2 and a2a-sdk version 1.0.x. The long-term solution requires refactoring the crewai.a2a modules, which may involve significant changes.

Recommendation

Apply the short-term workaround by pinning the a2a-sdk version to less than 1.0.1, as it provides a quick fix to the immediate import error, allowing for further investigation and refactoring of the crewai.a2a modules.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The Crew should initialize and start correctly.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING