distributed-a2a 0.1.6rc2__tar.gz → 0.1.6rc4__tar.gz
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-0.1.6rc2/distributed_a2a.egg-info → distributed_a2a-0.1.6rc4}/PKG-INFO +1 -1
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a/executors.py +2 -2
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a/router.py +14 -7
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4/distributed_a2a.egg-info}/PKG-INFO +1 -1
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/pyproject.toml +1 -1
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/LICENSE +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/MANIFEST.in +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/README.md +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a/__init__.py +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a/agent.py +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a/client.py +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a/model.py +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a/registry.py +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a/server.py +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a.egg-info/SOURCES.txt +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a.egg-info/dependency_links.txt +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a.egg-info/requires.txt +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a.egg-info/top_level.txt +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/requirements.txt +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/setup.cfg +0 -0
- {distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/setup.py +0 -0
|
@@ -83,9 +83,9 @@ class RoutingAgentExecutor(AgentExecutor):
|
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
class RoutingExecutor(AgentExecutor):
|
|
86
|
-
def __init__(self, router_config: RouterConfig, routing_tool: BaseTool):
|
|
86
|
+
def __init__(self, router_config: RouterConfig, routing_tool: BaseTool) -> None:
|
|
87
87
|
super().__init__()
|
|
88
|
-
api_key = os.environ.get(router_config.
|
|
88
|
+
api_key = os.environ.get(router_config.router.llm.api_key_env)
|
|
89
89
|
self.routing_agent = StatusAgent[RoutingResponse](
|
|
90
90
|
llm_config=router_config.agent.llm,
|
|
91
91
|
system_prompt=ROUTING_SYSTEM_PROMPT,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from typing import Any
|
|
2
3
|
|
|
3
4
|
from a2a.server.apps import A2ARESTFastAPIApplication
|
|
4
5
|
from a2a.server.request_handlers import DefaultRequestHandler
|
|
5
6
|
from a2a.server.tasks import InMemoryTaskStore
|
|
6
|
-
from a2a.types import AgentCard
|
|
7
|
+
from a2a.types import AgentCard, AgentSkill
|
|
7
8
|
from fastapi import FastAPI
|
|
8
9
|
|
|
9
10
|
from .executors import RoutingExecutor
|
|
@@ -17,14 +18,20 @@ def load_router(router_dic: dict[str, Any]) -> FastAPI:
|
|
|
17
18
|
agent_card = AgentCard(
|
|
18
19
|
name="Router",
|
|
19
20
|
description="Agent to redirect to the best matching agent based on the agent card",
|
|
20
|
-
url=
|
|
21
|
+
url=router_config.router.card.url,
|
|
21
22
|
version="1.0.0",
|
|
22
|
-
default_input_modes=router_config.
|
|
23
|
-
default_output_modes=router_config.
|
|
24
|
-
skills=[
|
|
25
|
-
|
|
23
|
+
default_input_modes=router_config.router.card.default_input_modes,
|
|
24
|
+
default_output_modes=router_config.router.card.default_output_modes,
|
|
25
|
+
skills=[AgentSkill(
|
|
26
|
+
id='routing',
|
|
27
|
+
name='Agent routing',
|
|
28
|
+
description='Identifies the most suitable agent for the given task and returns the agent card',
|
|
29
|
+
tags=['agent', 'routing']
|
|
30
|
+
)],
|
|
31
|
+
preferred_transport=router_config.router.card.preferred_transport_protocol,
|
|
26
32
|
capabilities=CAPABILITIES
|
|
27
33
|
)
|
|
34
|
+
|
|
28
35
|
executor = RoutingExecutor(
|
|
29
36
|
router_config=router_config,
|
|
30
37
|
routing_tool=DynamoDbRegistryLookup(agent_card_tabel=AGENT_CARD_TABLE).as_tool()
|
|
@@ -38,4 +45,4 @@ def load_router(router_dic: dict[str, Any]) -> FastAPI:
|
|
|
38
45
|
task_store=InMemoryTaskStore() # TODO replace with dynamodb store
|
|
39
46
|
|
|
40
47
|
)).build(title=agent_card.name,
|
|
41
|
-
root_path=f"/{router_config.agent.card.name}")
|
|
48
|
+
root_path=f"/{router_config.agent.card.name}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{distributed_a2a-0.1.6rc2 → distributed_a2a-0.1.6rc4}/distributed_a2a.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|