distributed-a2a 0.1.9rc11__py3-none-any.whl → 0.1.9rc13__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.
- distributed_a2a/executors.py +9 -5
- distributed_a2a/router.py +0 -1
- {distributed_a2a-0.1.9rc11.dist-info → distributed_a2a-0.1.9rc13.dist-info}/METADATA +1 -1
- {distributed_a2a-0.1.9rc11.dist-info → distributed_a2a-0.1.9rc13.dist-info}/RECORD +7 -7
- {distributed_a2a-0.1.9rc11.dist-info → distributed_a2a-0.1.9rc13.dist-info}/WHEEL +0 -0
- {distributed_a2a-0.1.9rc11.dist-info → distributed_a2a-0.1.9rc13.dist-info}/licenses/LICENSE +0 -0
- {distributed_a2a-0.1.9rc11.dist-info → distributed_a2a-0.1.9rc13.dist-info}/top_level.txt +0 -0
distributed_a2a/executors.py
CHANGED
|
@@ -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,
|
|
@@ -122,7 +126,7 @@ class RoutingAgentExecutor(AgentExecutor):
|
|
|
122
126
|
|
|
123
127
|
|
|
124
128
|
class RoutingExecutor(AgentExecutor):
|
|
125
|
-
def __init__(self, router_config: RouterConfig
|
|
129
|
+
def __init__(self, router_config: RouterConfig) -> None:
|
|
126
130
|
super().__init__()
|
|
127
131
|
api_key = os.environ.get(router_config.router.llm.api_key_env)
|
|
128
132
|
if api_key is None:
|
|
@@ -134,7 +138,7 @@ class RoutingExecutor(AgentExecutor):
|
|
|
134
138
|
name=router_config.router.card.name,
|
|
135
139
|
api_key=api_key,
|
|
136
140
|
is_routing=True,
|
|
137
|
-
tools=[
|
|
141
|
+
tools=[]
|
|
138
142
|
)
|
|
139
143
|
|
|
140
144
|
async def cancel(self, context: RequestContext, event_queue: EventQueue) -> None:
|
distributed_a2a/router.py
CHANGED
|
@@ -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=
|
|
4
|
+
distributed_a2a/executors.py,sha256=CBjCZiM2YNSZslyZPqdHLDNFLbqeCNDYDSnVm6GJ3wY,9476
|
|
5
5
|
distributed_a2a/model.py,sha256=rW9jY0OIR8L_I77zz47JQMd-ucQQnnfNw_HIS-YvrcM,3533
|
|
6
6
|
distributed_a2a/registry.py,sha256=lTXdS3PHXXMPXNjZDxyNRJjhJ1uZJOxgOgpokQp7boc,2050
|
|
7
|
-
distributed_a2a/router.py,sha256=
|
|
7
|
+
distributed_a2a/router.py,sha256=Uk8TQdcwbH5a30lfDm0iA0B1usQg3x6A4BnK-UbDy4A,1742
|
|
8
8
|
distributed_a2a/server.py,sha256=-__c-BKzJWSXpW21NOp6faUIdjWV_o32jqv42_lPi2g,3352
|
|
9
|
-
distributed_a2a-0.1.
|
|
10
|
-
distributed_a2a-0.1.
|
|
11
|
-
distributed_a2a-0.1.
|
|
12
|
-
distributed_a2a-0.1.
|
|
13
|
-
distributed_a2a-0.1.
|
|
9
|
+
distributed_a2a-0.1.9rc13.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
|
|
10
|
+
distributed_a2a-0.1.9rc13.dist-info/METADATA,sha256=2AIngK6hTX74qrOP_UrigWCfYAeO70_tc-SdZnX9Bso,3244
|
|
11
|
+
distributed_a2a-0.1.9rc13.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
12
|
+
distributed_a2a-0.1.9rc13.dist-info/top_level.txt,sha256=23qJ8n5k7796BHDK7a58uuO-X4GV0EgUWcGi8NIn-0k,16
|
|
13
|
+
distributed_a2a-0.1.9rc13.dist-info/RECORD,,
|
|
File without changes
|
{distributed_a2a-0.1.9rc11.dist-info → distributed_a2a-0.1.9rc13.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|