distributed-a2a 0.1.5rc5__py3-none-any.whl → 0.1.5rc6__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/agent.py +7 -7
- distributed_a2a/executors.py +2 -1
- distributed_a2a/server.py +1 -0
- {distributed_a2a-0.1.5rc5.dist-info → distributed_a2a-0.1.5rc6.dist-info}/METADATA +1 -1
- distributed_a2a-0.1.5rc6.dist-info/RECORD +12 -0
- distributed_a2a-0.1.5rc5.dist-info/RECORD +0 -12
- {distributed_a2a-0.1.5rc5.dist-info → distributed_a2a-0.1.5rc6.dist-info}/WHEEL +0 -0
- {distributed_a2a-0.1.5rc5.dist-info → distributed_a2a-0.1.5rc6.dist-info}/licenses/LICENSE +0 -0
- {distributed_a2a-0.1.5rc5.dist-info → distributed_a2a-0.1.5rc6.dist-info}/top_level.txt +0 -0
distributed_a2a/agent.py
CHANGED
|
@@ -7,7 +7,7 @@ from langchain_core.tools import BaseTool
|
|
|
7
7
|
from langgraph.checkpoint.memory import MemorySaver
|
|
8
8
|
from pydantic import BaseModel, Field
|
|
9
9
|
|
|
10
|
-
from .model import get_model, AgentConfig
|
|
10
|
+
from .model import get_model, AgentConfig, LLMConfig
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class AgentResponse(BaseModel):
|
|
@@ -29,7 +29,7 @@ class StringResponse(AgentResponse):
|
|
|
29
29
|
|
|
30
30
|
class StatusAgent[ResponseT: AgentResponse]:
|
|
31
31
|
|
|
32
|
-
def __init__(self,
|
|
32
|
+
def __init__(self, llm_config: LLMConfig, name: str, system_prompt: str, api_key: str, is_routing: bool, tools: list[BaseTool]):
|
|
33
33
|
response_format: type[AgentResponse]
|
|
34
34
|
if is_routing:
|
|
35
35
|
response_format = RoutingResponse
|
|
@@ -38,14 +38,14 @@ class StatusAgent[ResponseT: AgentResponse]:
|
|
|
38
38
|
|
|
39
39
|
self.agent = create_agent(
|
|
40
40
|
get_model(api_key=api_key,
|
|
41
|
-
model=
|
|
42
|
-
base_url=
|
|
43
|
-
reasoning_effort=
|
|
41
|
+
model=llm_config.model,
|
|
42
|
+
base_url=llm_config.base_url,
|
|
43
|
+
reasoning_effort=llm_config.reasoning_effort),
|
|
44
44
|
tools=tools,
|
|
45
45
|
checkpointer=MemorySaver(), # TODO replace by dynamodb
|
|
46
|
-
system_prompt=
|
|
46
|
+
system_prompt=system_prompt,
|
|
47
47
|
response_format=response_format,
|
|
48
|
-
name=
|
|
48
|
+
name=name
|
|
49
49
|
)
|
|
50
50
|
|
|
51
51
|
async def __call__(self, message: str, context_id: str = None) -> ResponseT:
|
distributed_a2a/executors.py
CHANGED
|
@@ -7,7 +7,6 @@ from a2a.server.events import EventQueue
|
|
|
7
7
|
from a2a.types import TaskStatusUpdateEvent, TaskStatus, TaskState, TaskArtifactUpdateEvent, Artifact
|
|
8
8
|
from a2a.utils import new_text_artifact
|
|
9
9
|
from langchain_core.tools import BaseTool
|
|
10
|
-
from openai import api_key
|
|
11
10
|
|
|
12
11
|
from .agent import StatusAgent, RoutingResponse, StringResponse
|
|
13
12
|
from .model import AgentConfig
|
|
@@ -27,6 +26,7 @@ class RoutingAgentExecutor(AgentExecutor):
|
|
|
27
26
|
super().__init__()
|
|
28
27
|
api_key = os.environ.get(agent_config.agent.llm.api_key_env)
|
|
29
28
|
self.agent = StatusAgent[StringResponse](
|
|
29
|
+
llm_config=agent_config.agent.llm,
|
|
30
30
|
system_prompt=agent_config.agent.llm.system_prompt,
|
|
31
31
|
name="Router",
|
|
32
32
|
api_key=api_key,
|
|
@@ -34,6 +34,7 @@ class RoutingAgentExecutor(AgentExecutor):
|
|
|
34
34
|
tools=[] if tools is None else tools,
|
|
35
35
|
)
|
|
36
36
|
self.routing_agent = StatusAgent[RoutingResponse](
|
|
37
|
+
llm_config=agent_config.agent.llm,
|
|
37
38
|
system_prompt=ROUTING_SYSTEM_PROMPT,
|
|
38
39
|
name="Router",
|
|
39
40
|
api_key=api_key,
|
distributed_a2a/server.py
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
distributed_a2a/__init__.py,sha256=1q_7gRfBCGe-7sF_9YKzevyS97XQhtuFnZiYHIqaU-0,120
|
|
2
|
+
distributed_a2a/agent.py,sha256=CpIeEASjkIflGCiVo4f5c5_xUg3VwMr27l-o4cj73Mw,2597
|
|
3
|
+
distributed_a2a/client.py,sha256=2974Uw8YUuyBytwxxJJKYsWXCpEaIbGmMUHDraITxJ0,4149
|
|
4
|
+
distributed_a2a/executors.py,sha256=m8Z48r4gWYE_39wq-lS4Btk5lOsKTuS7JSYNYF2Ejaw,4171
|
|
5
|
+
distributed_a2a/model.py,sha256=yXiqEBZfQh-B_ld5klUVSUuXxninYfZ1aC9IJmmJdMg,2323
|
|
6
|
+
distributed_a2a/registry.py,sha256=197eZVR6TW0isOUE0VjWSWs7aCqbWqnBzcV8EVXAxrI,677
|
|
7
|
+
distributed_a2a/server.py,sha256=bEIew99Bh86c3ytWvnLaYSo_LovkSIq7ZxlDAtvnP_4,3123
|
|
8
|
+
distributed_a2a-0.1.5rc6.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
|
|
9
|
+
distributed_a2a-0.1.5rc6.dist-info/METADATA,sha256=BhIs7aC9jZ90qs4O-3EXdH-zIrkm2baS-qkENLpfu-I,3106
|
|
10
|
+
distributed_a2a-0.1.5rc6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
distributed_a2a-0.1.5rc6.dist-info/top_level.txt,sha256=23qJ8n5k7796BHDK7a58uuO-X4GV0EgUWcGi8NIn-0k,16
|
|
12
|
+
distributed_a2a-0.1.5rc6.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
distributed_a2a/__init__.py,sha256=1q_7gRfBCGe-7sF_9YKzevyS97XQhtuFnZiYHIqaU-0,120
|
|
2
|
-
distributed_a2a/agent.py,sha256=fW3htAZkZucuuowvROO0jcscpUMOsH-5loxBZOf6G4U,2642
|
|
3
|
-
distributed_a2a/client.py,sha256=2974Uw8YUuyBytwxxJJKYsWXCpEaIbGmMUHDraITxJ0,4149
|
|
4
|
-
distributed_a2a/executors.py,sha256=PMBAxeE3-ZY2YNiRbgzdksxrsJb4Q10kHzGjt020TEo,4104
|
|
5
|
-
distributed_a2a/model.py,sha256=yXiqEBZfQh-B_ld5klUVSUuXxninYfZ1aC9IJmmJdMg,2323
|
|
6
|
-
distributed_a2a/registry.py,sha256=197eZVR6TW0isOUE0VjWSWs7aCqbWqnBzcV8EVXAxrI,677
|
|
7
|
-
distributed_a2a/server.py,sha256=65k3_p1cS77E-_wVOD1eBb5xjRMtDQvAPthNo2BZTro,3089
|
|
8
|
-
distributed_a2a-0.1.5rc5.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
|
|
9
|
-
distributed_a2a-0.1.5rc5.dist-info/METADATA,sha256=r9PU1E1b7kHMnXJBOiDYs4hCd0P3C7OfuPM4Z-qvNx0,3106
|
|
10
|
-
distributed_a2a-0.1.5rc5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
-
distributed_a2a-0.1.5rc5.dist-info/top_level.txt,sha256=23qJ8n5k7796BHDK7a58uuO-X4GV0EgUWcGi8NIn-0k,16
|
|
12
|
-
distributed_a2a-0.1.5rc5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|