distributed-a2a 0.1.9rc11__py3-none-any.whl → 0.1.9rc12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ class RoutingAgentExecutor(AgentExecutor):
63
63
  final=False,
64
64
  context_id=context.context_id,
65
65
  task_id=context.task_id))
66
- self.reinitialize_agent_with_tools()
66
+ await self.reinitialize_agent_with_tools()
67
67
  agent_response: StringResponse = await self.agent(message=context.get_user_input(),
68
68
  context_id=context.context_id)
69
69
 
@@ -104,12 +104,16 @@ class RoutingAgentExecutor(AgentExecutor):
104
104
  context_id=context.context_id,
105
105
  task_id=context.task_id))
106
106
 
107
- def reinitialize_agent_with_tools(self):
107
+ async def reinitialize_agent_with_tools(self):
108
108
  mcp_tools = self.mcp_registry.get_mcp_tool_for_agent(self.agent_config.agent.card.name)
109
+ if not mcp_tools:
110
+ #no mcp tool found no need to reinitialize Agent
111
+ return
112
+
109
113
  logger.info(f"Agent {self.agent_config.agent.card.name} has access to the following tools: {mcp_tools}")
110
114
  tools = {tool["name"]: {"url": tool["url"], "transport": tool["protocol"]} for tool in mcp_tools}
111
115
  mcp_client = MultiServerMCPClient(tools)
112
- mcp_tools = mcp_client.get_tools()
116
+ mcp_tools = await mcp_client.get_tools()
113
117
 
114
118
  self.agent = StatusAgent[StringResponse](
115
119
  llm_config=self.agent_config.agent.llm,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: distributed_a2a
3
- Version: 0.1.9rc11
3
+ Version: 0.1.9rc12
4
4
  Summary: A library for building A2A agents with routing capabilities
5
5
  Home-page: https://github.com/Barra-Technologies/distributed-a2a
6
6
  Author: Fabian Bell
@@ -1,13 +1,13 @@
1
1
  distributed_a2a/__init__.py,sha256=gO8sTT20O6XvDRzj7B322O9v6HxV-_eIlJD1wMlPYoI,171
2
2
  distributed_a2a/agent.py,sha256=qY775N3Br2YMuaHLALU4t6MO47syuEoTtFLLPRr8TyA,2910
3
3
  distributed_a2a/client.py,sha256=3tEBqu3HKEQyOFk5vsO1YiuKP2pZx-n6SCzsJUYNcyc,4601
4
- distributed_a2a/executors.py,sha256=3W2bzoiOjPKXY5uAeUdMVjykhG6IKv5Azse7Ssa3KU8,9387
4
+ distributed_a2a/executors.py,sha256=Poj3CDo8MpTG5GDXkTTLAPZGqoh3nh0-MwJCNWG8o9U,9512
5
5
  distributed_a2a/model.py,sha256=rW9jY0OIR8L_I77zz47JQMd-ucQQnnfNw_HIS-YvrcM,3533
6
6
  distributed_a2a/registry.py,sha256=lTXdS3PHXXMPXNjZDxyNRJjhJ1uZJOxgOgpokQp7boc,2050
7
7
  distributed_a2a/router.py,sha256=l1kDn5_iYNq6QZj8JsouLC6zz5vdK-qGSpj4KODwXY8,1834
8
8
  distributed_a2a/server.py,sha256=-__c-BKzJWSXpW21NOp6faUIdjWV_o32jqv42_lPi2g,3352
9
- distributed_a2a-0.1.9rc11.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
10
- distributed_a2a-0.1.9rc11.dist-info/METADATA,sha256=VLpU5fyKmRYMj3perY0ZLfftOZsky5nJc3YnLGj5P3M,3244
11
- distributed_a2a-0.1.9rc11.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
12
- distributed_a2a-0.1.9rc11.dist-info/top_level.txt,sha256=23qJ8n5k7796BHDK7a58uuO-X4GV0EgUWcGi8NIn-0k,16
13
- distributed_a2a-0.1.9rc11.dist-info/RECORD,,
9
+ distributed_a2a-0.1.9rc12.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
10
+ distributed_a2a-0.1.9rc12.dist-info/METADATA,sha256=pKg1ngaID8_y3AX1tCe_KSt6uS-XjqQGKAtqT0qpPKo,3244
11
+ distributed_a2a-0.1.9rc12.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
12
+ distributed_a2a-0.1.9rc12.dist-info/top_level.txt,sha256=23qJ8n5k7796BHDK7a58uuO-X4GV0EgUWcGi8NIn-0k,16
13
+ distributed_a2a-0.1.9rc12.dist-info/RECORD,,