agentex-sdk 0.4.8__py3-none-any.whl → 0.4.9__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.
- agentex/_version.py +1 -1
- agentex/lib/adk/_modules/acp.py +7 -6
- agentex/lib/core/services/adk/acp/acp.py +1 -0
- agentex/lib/core/temporal/activities/__init__.py +4 -1
- agentex/lib/core/temporal/activities/adk/acp/acp_activities.py +2 -2
- {agentex_sdk-0.4.8.dist-info → agentex_sdk-0.4.9.dist-info}/METADATA +1 -1
- {agentex_sdk-0.4.8.dist-info → agentex_sdk-0.4.9.dist-info}/RECORD +10 -10
- {agentex_sdk-0.4.8.dist-info → agentex_sdk-0.4.9.dist-info}/WHEEL +0 -0
- {agentex_sdk-0.4.8.dist-info → agentex_sdk-0.4.9.dist-info}/entry_points.txt +0 -0
- {agentex_sdk-0.4.8.dist-info → agentex_sdk-0.4.9.dist-info}/licenses/LICENSE +0 -0
agentex/_version.py
CHANGED
agentex/lib/adk/_modules/acp.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
from datetime import timedelta
|
2
|
-
from typing import Any
|
2
|
+
from typing import Any, List
|
3
3
|
|
4
|
+
from agentex.types import Event
|
4
5
|
from temporalio.common import RetryPolicy
|
5
6
|
|
6
7
|
from agentex import AsyncAgentex
|
@@ -58,7 +59,7 @@ class ACPModule:
|
|
58
59
|
start_to_close_timeout: timedelta = timedelta(seconds=5),
|
59
60
|
heartbeat_timeout: timedelta = timedelta(seconds=5),
|
60
61
|
retry_policy: RetryPolicy = DEFAULT_RETRY_POLICY,
|
61
|
-
):
|
62
|
+
) -> Task:
|
62
63
|
"""
|
63
64
|
Create a new task.
|
64
65
|
|
@@ -111,7 +112,7 @@ class ACPModule:
|
|
111
112
|
start_to_close_timeout: timedelta = timedelta(seconds=5),
|
112
113
|
heartbeat_timeout: timedelta = timedelta(seconds=5),
|
113
114
|
retry_policy: RetryPolicy = DEFAULT_RETRY_POLICY,
|
114
|
-
):
|
115
|
+
) -> Event:
|
115
116
|
"""
|
116
117
|
Send an event to a task.
|
117
118
|
|
@@ -152,8 +153,8 @@ class ACPModule:
|
|
152
153
|
|
153
154
|
async def send_message(
|
154
155
|
self,
|
155
|
-
task_id: str,
|
156
156
|
content: TaskMessageContent,
|
157
|
+
task_id: str | None = None,
|
157
158
|
agent_id: str | None = None,
|
158
159
|
agent_name: str | None = None,
|
159
160
|
trace_id: str | None = None,
|
@@ -161,7 +162,7 @@ class ACPModule:
|
|
161
162
|
start_to_close_timeout: timedelta = timedelta(seconds=5),
|
162
163
|
heartbeat_timeout: timedelta = timedelta(seconds=5),
|
163
164
|
retry_policy: RetryPolicy = DEFAULT_RETRY_POLICY,
|
164
|
-
):
|
165
|
+
) -> List[TaskMessage]:
|
165
166
|
"""
|
166
167
|
Send a message to a task.
|
167
168
|
|
@@ -209,7 +210,7 @@ class ACPModule:
|
|
209
210
|
start_to_close_timeout: timedelta = timedelta(seconds=5),
|
210
211
|
heartbeat_timeout: timedelta = timedelta(seconds=5),
|
211
212
|
retry_policy: RetryPolicy = DEFAULT_RETRY_POLICY,
|
212
|
-
):
|
213
|
+
) -> Task:
|
213
214
|
"""
|
214
215
|
Cancel a task.
|
215
216
|
|
@@ -116,6 +116,7 @@ class ACPService:
|
|
116
116
|
raise ValueError("Either agent_name or agent_id must be provided")
|
117
117
|
|
118
118
|
task_messages: List[TaskMessage] = []
|
119
|
+
logger.info(f"json_rpc_response: {json_rpc_response}")
|
119
120
|
if isinstance(json_rpc_response.result, list):
|
120
121
|
for message in json_rpc_response.result:
|
121
122
|
task_message = TaskMessage.model_validate(message)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import httpx
|
1
2
|
from agentex.lib.adk.utils._modules.client import create_async_agentex_client
|
2
3
|
from scale_gp import SGPClient, SGPClientError
|
3
4
|
|
@@ -59,7 +60,9 @@ def get_all_activities(sgp_client=None):
|
|
59
60
|
|
60
61
|
llm_gateway = LiteLLMGateway()
|
61
62
|
stream_repository = RedisStreamRepository()
|
62
|
-
agentex_client = create_async_agentex_client(
|
63
|
+
agentex_client = create_async_agentex_client(
|
64
|
+
timeout=httpx.Timeout(timeout=1000),
|
65
|
+
)
|
63
66
|
tracer = AsyncTracer(agentex_client)
|
64
67
|
|
65
68
|
# Services
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from enum import Enum
|
2
|
-
from typing import Any
|
2
|
+
from typing import Any, List
|
3
3
|
|
4
4
|
from temporalio import activity
|
5
5
|
|
@@ -61,7 +61,7 @@ class ACPActivities:
|
|
61
61
|
)
|
62
62
|
|
63
63
|
@activity.defn(name=ACPActivityName.MESSAGE_SEND)
|
64
|
-
async def message_send(self, params: MessageSendParams) -> TaskMessage:
|
64
|
+
async def message_send(self, params: MessageSendParams) -> List[TaskMessage]:
|
65
65
|
return await self._acp_service.message_send(
|
66
66
|
agent_id=params.agent_id,
|
67
67
|
agent_name=params.agent_name,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: agentex-sdk
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.9
|
4
4
|
Summary: The official Python library for the agentex API
|
5
5
|
Project-URL: Homepage, https://github.com/scaleapi/agentex-python
|
6
6
|
Project-URL: Repository, https://github.com/scaleapi/agentex-python
|
@@ -11,7 +11,7 @@ agentex/_resource.py,sha256=S1t7wmR5WUvoDIhZjo_x-E7uoTJBynJ3d8tPJMQYdjw,1106
|
|
11
11
|
agentex/_response.py,sha256=Tb9zazsnemO2rTxWtBjAD5WBqlhli5ZaXGbiKgdu5DE,28794
|
12
12
|
agentex/_streaming.py,sha256=FNGJExRCF-vTRUZHFKUfoAWFhDGOB3XbioVCF37Jr7E,10104
|
13
13
|
agentex/_types.py,sha256=KyKYySGIfHPod2hho1fPxssk5NuVn8C4MeMTtA-lg80,6198
|
14
|
-
agentex/_version.py,sha256=
|
14
|
+
agentex/_version.py,sha256=uP-Bz46kvosoPnuC2x255N_8qwRibejXkKPv4P-Gg9Q,159
|
15
15
|
agentex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
agentex/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
17
|
agentex/_utils/_logs.py,sha256=LUjFPc3fweSChBUmjhQD8uYmwQAmFMNDuVFKfjYBQfM,777
|
@@ -29,7 +29,7 @@ agentex/lib/environment_variables.py,sha256=6iWpCEURbahnLxZIjvJGES-zs7euUI8bxVXF
|
|
29
29
|
agentex/lib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
30
|
agentex/lib/adk/__init__.py,sha256=-PpVfEvYr_HD7TnxUWU8RCW2OnxfwpPxTW97dKTnqvI,1082
|
31
31
|
agentex/lib/adk/_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
|
-
agentex/lib/adk/_modules/acp.py,sha256=
|
32
|
+
agentex/lib/adk/_modules/acp.py,sha256=kC8VzbpLoCm9INGOS_6JmzdXVU5w8TFg6dkAekHVoFw,9125
|
33
33
|
agentex/lib/adk/_modules/agent_task_tracker.py,sha256=fXMDs1zgAC6n8EmWTU5_trs79EGVBCEPxd5eBOZmdE0,7022
|
34
34
|
agentex/lib/adk/_modules/agents.py,sha256=VlT_PXnyb3Knh-nx1rfflD9N6gjp5O0_6Z_QL5SCThU,2788
|
35
35
|
agentex/lib/adk/_modules/events.py,sha256=RHQZ4ircC60zdm1chRzo3cdt7LNqDoJfPLNJXEz4BH0,5262
|
@@ -128,7 +128,7 @@ agentex/lib/core/services/adk/streaming.py,sha256=keZyy7CixM2_3tf2THv-X4gGOOSAk0
|
|
128
128
|
agentex/lib/core/services/adk/tasks.py,sha256=XEX0u4skq81Fn-gjTzSE_-Iv_mKySZHchpotxAsnJwg,2618
|
129
129
|
agentex/lib/core/services/adk/tracing.py,sha256=w4mnIoq5m5iwlkDN_NOUjhi6hUpD958cYn1QR6hFgB8,1156
|
130
130
|
agentex/lib/core/services/adk/acp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
131
|
-
agentex/lib/core/services/adk/acp/acp.py,sha256=
|
131
|
+
agentex/lib/core/services/adk/acp/acp.py,sha256=s5dUYTFTIlkvD0x5g5FYVt9Z9Zt2KEHsWya30dRpO0w,7993
|
132
132
|
agentex/lib/core/services/adk/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
133
133
|
agentex/lib/core/services/adk/providers/litellm.py,sha256=EKzus_xohNW-85V5hwvd1WqUd3ebv2wc9vDIWO2t1Mw,10044
|
134
134
|
agentex/lib/core/services/adk/providers/openai.py,sha256=Ad7iFQDg1iz8KjswO16lzjpzEJCz5FtyXV-fB6qMPLk,39535
|
@@ -136,7 +136,7 @@ agentex/lib/core/services/adk/providers/sgp.py,sha256=9gm-sPNQ_OSTaBzL0onerKhokP
|
|
136
136
|
agentex/lib/core/services/adk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
137
137
|
agentex/lib/core/services/adk/utils/templating.py,sha256=eaXSFq31Y9p5pRD6J6SL4QdTFtxy81dilbF2XXc2JYQ,1889
|
138
138
|
agentex/lib/core/temporal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
139
|
-
agentex/lib/core/temporal/activities/__init__.py,sha256
|
139
|
+
agentex/lib/core/temporal/activities/__init__.py,sha256=BWFKs8eFogUHvUyRwGNTpi3QA3KX78XegOzI4cCbZrs,7697
|
140
140
|
agentex/lib/core/temporal/activities/activity_helpers.py,sha256=vvQv0rCyrIbnm2gFSQRgCIwIUlKf0jwmI15XEDTNz8A,1014
|
141
141
|
agentex/lib/core/temporal/activities/adk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
142
142
|
agentex/lib/core/temporal/activities/adk/agent_task_tracker_activities.py,sha256=cqND3YrRybE9Li4fw-oLfTyKzcI9M0lGBhoCq37vThc,2668
|
@@ -148,7 +148,7 @@ agentex/lib/core/temporal/activities/adk/streaming_activities.py,sha256=PEXeFU9m
|
|
148
148
|
agentex/lib/core/temporal/activities/adk/tasks_activities.py,sha256=hQjdD-TfSzxsiW9eiJ5ZTvY0Ieu0tE950_Zk2PUVc9g,1442
|
149
149
|
agentex/lib/core/temporal/activities/adk/tracing_activities.py,sha256=RF8nSBA9x6Ui7_MD9He5ljlH_xZduIhx_JUTEyKdCxA,1523
|
150
150
|
agentex/lib/core/temporal/activities/adk/acp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
151
|
-
agentex/lib/core/temporal/activities/adk/acp/acp_activities.py,sha256=
|
151
|
+
agentex/lib/core/temporal/activities/adk/acp/acp_activities.py,sha256=yWgL99R3rYF2o_A38B92IsJPSdCWFN0DT6DtNEGY9YA,2693
|
152
152
|
agentex/lib/core/temporal/activities/adk/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
153
153
|
agentex/lib/core/temporal/activities/adk/providers/litellm_activities.py,sha256=Ix92XZIQIbhf-_fOWkUZDxZ1UUCOF0kOwxbcRYBzBQA,2583
|
154
154
|
agentex/lib/core/temporal/activities/adk/providers/openai_activities.py,sha256=SLypk8i8hB98hPPcj8rWQwb_Sr4NXoMcfFUV7-dsauU,11096
|
@@ -300,8 +300,8 @@ agentex/types/messages/batch_update_params.py,sha256=Ug5CThbD49a8j4qucg04OdmVrp_
|
|
300
300
|
agentex/types/messages/batch_update_response.py,sha256=TbSBe6SuPzjXXWSj-nRjT1JHGBooTshHQQDa1AixQA8,278
|
301
301
|
agentex/types/shared/__init__.py,sha256=IKs-Qn5Yja0kFh1G1kDqYZo43qrOu1hSoxlPdN-85dI,149
|
302
302
|
agentex/types/shared/delete_response.py,sha256=8qH3zvQXaOHYQSHyXi7UQxdR4miTzR7V9K4zXVsiUyk,215
|
303
|
-
agentex_sdk-0.4.
|
304
|
-
agentex_sdk-0.4.
|
305
|
-
agentex_sdk-0.4.
|
306
|
-
agentex_sdk-0.4.
|
307
|
-
agentex_sdk-0.4.
|
303
|
+
agentex_sdk-0.4.9.dist-info/METADATA,sha256=Z4iJELn7KSCCX8g9yo-rvJskP_2euQ-2CW6VXvOFjIE,15094
|
304
|
+
agentex_sdk-0.4.9.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
305
|
+
agentex_sdk-0.4.9.dist-info/entry_points.txt,sha256=V7vJuMZdF0UlvgX6KiBN7XUvq_cxF5kplcYvc1QlFaQ,62
|
306
|
+
agentex_sdk-0.4.9.dist-info/licenses/LICENSE,sha256=Q1AOx2FtRcMlyMgQJ9eVN2WKPq2mQ33lnB4tvWxabLA,11337
|
307
|
+
agentex_sdk-0.4.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|