mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
This commit adds async versions of A2A functions to support calling from async contexts without creating new event loops. Changes: - Add afetch_agent_card() async function in utils.py - Add aexecute_a2a_delegation() async function in utils.py - Add async helper functions in wrapper.py: - _afetch_card_from_config() - _afetch_agent_cards_concurrently() - _aexecute_task_with_a2a() - _ahandle_agent_response_and_continue() - _adelegate_to_a2a() - Update wrap_agent_with_a2a_instance() to wrap both execute_task and aexecute_task methods - Add comprehensive tests for async A2A execution Fixes #4162 Co-Authored-By: João <joao@crewai.com>