agentex-sdk 0.2.2__py3-none-any.whl → 0.2.3__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 CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "agentex"
4
- __version__ = "0.2.2" # x-release-please-version
4
+ __version__ = "0.2.3" # x-release-please-version
@@ -4,7 +4,6 @@ from typing import Any
4
4
  from temporalio.common import RetryPolicy
5
5
 
6
6
  from agentex import AsyncAgentex
7
- from agentex.lib.adk.utils._modules.client import create_async_agentex_client
8
7
  from agentex.lib.core.services.adk.acp.acp import ACPService
9
8
  from agentex.lib.core.temporal.activities.activity_helpers import ActivityHelpers
10
9
  from agentex.lib.core.temporal.activities.adk.acp.acp_activities import (
@@ -41,7 +40,7 @@ class ACPModule:
41
40
  acp_activities (Optional[ACPActivities]): Optional pre-configured ACP activities. If None, will be auto-initialized.
42
41
  """
43
42
  if acp_service is None:
44
- agentex_client = create_async_agentex_client()
43
+ agentex_client = AsyncAgentex()
45
44
  tracer = AsyncTracer(agentex_client)
46
45
  self._acp_service = ACPService(agentex_client=agentex_client, tracer=tracer)
47
46
  else:
@@ -3,7 +3,6 @@ from datetime import timedelta
3
3
  from temporalio.common import RetryPolicy
4
4
 
5
5
  from agentex import AsyncAgentex
6
- from agentex.lib.adk.utils._modules.client import create_async_agentex_client
7
6
  from agentex.lib.core.services.adk.agent_task_tracker import AgentTaskTrackerService
8
7
  from agentex.lib.core.temporal.activities.activity_helpers import ActivityHelpers
9
8
  from agentex.lib.core.temporal.activities.adk.agent_task_tracker_activities import (
@@ -34,7 +33,7 @@ class AgentTaskTrackerModule:
34
33
  agent_task_tracker_service: AgentTaskTrackerService | None = None,
35
34
  ):
36
35
  if agent_task_tracker_service is None:
37
- agentex_client = create_async_agentex_client()
36
+ agentex_client = AsyncAgentex()
38
37
  tracer = AsyncTracer(agentex_client)
39
38
  self._agent_task_tracker_service = AgentTaskTrackerService(
40
39
  agentex_client=agentex_client, tracer=tracer
@@ -1,7 +1,6 @@
1
1
  from datetime import timedelta
2
2
  from typing import Optional
3
3
 
4
- from agentex.lib.adk.utils._modules.client import create_async_agentex_client
5
4
  from agentex.lib.core.temporal.activities.adk.agents_activities import AgentsActivityName, GetAgentParams
6
5
  from temporalio.common import RetryPolicy
7
6
 
@@ -29,7 +28,7 @@ class AgentsModule:
29
28
  agents_service: Optional[AgentsService] = None,
30
29
  ):
31
30
  if agents_service is None:
32
- agentex_client = create_async_agentex_client()
31
+ agentex_client = AsyncAgentex()
33
32
  tracer = AsyncTracer(agentex_client)
34
33
  self._agents_service = AgentsService(agentex_client=agentex_client, tracer=tracer)
35
34
  else:
@@ -3,7 +3,6 @@ from datetime import timedelta
3
3
  from temporalio.common import RetryPolicy
4
4
 
5
5
  from agentex import AsyncAgentex
6
- from agentex.lib.adk.utils._modules.client import create_async_agentex_client
7
6
  from agentex.lib.core.services.adk.events import EventsService
8
7
  from agentex.lib.core.temporal.activities.activity_helpers import ActivityHelpers
9
8
  from agentex.lib.core.temporal.activities.adk.events_activities import (
@@ -33,7 +32,7 @@ class EventsModule:
33
32
  events_service: EventsService | None = None,
34
33
  ):
35
34
  if events_service is None:
36
- agentex_client = create_async_agentex_client()
35
+ agentex_client = AsyncAgentex()
37
36
  tracer = AsyncTracer(agentex_client)
38
37
  self._events_service = EventsService(
39
38
  agentex_client=agentex_client, tracer=tracer
@@ -3,7 +3,6 @@ from datetime import timedelta
3
3
  from temporalio.common import RetryPolicy
4
4
 
5
5
  from agentex import AsyncAgentex
6
- from agentex.lib.adk.utils._modules.client import create_async_agentex_client
7
6
  from agentex.lib.core.adapters.streams.adapter_redis import RedisStreamRepository
8
7
  from agentex.lib.core.services.adk.messages import MessagesService
9
8
  from agentex.lib.core.services.adk.streaming import StreamingService
@@ -38,7 +37,7 @@ class MessagesModule:
38
37
  messages_service: MessagesService | None = None,
39
38
  ):
40
39
  if messages_service is None:
41
- agentex_client = create_async_agentex_client()
40
+ agentex_client = AsyncAgentex()
42
41
  stream_repository = RedisStreamRepository()
43
42
  streaming_service = StreamingService(
44
43
  agentex_client=agentex_client,
@@ -5,7 +5,6 @@ from pydantic import BaseModel
5
5
  from temporalio.common import RetryPolicy
6
6
 
7
7
  from agentex import AsyncAgentex
8
- from agentex.lib.adk.utils._modules.client import create_async_agentex_client
9
8
  from agentex.lib.core.services.adk.state import StateService
10
9
  from agentex.lib.core.temporal.activities.activity_helpers import ActivityHelpers
11
10
  from agentex.lib.core.temporal.activities.adk.state_activities import (
@@ -37,7 +36,7 @@ class StateModule:
37
36
  state_service: StateService | None = None,
38
37
  ):
39
38
  if state_service is None:
40
- agentex_client = create_async_agentex_client()
39
+ agentex_client = AsyncAgentex()
41
40
  tracer = AsyncTracer(agentex_client)
42
41
  self._state_service = StateService(
43
42
  agentex_client=agentex_client, tracer=tracer
@@ -1,7 +1,6 @@
1
1
  from temporalio.common import RetryPolicy
2
2
 
3
3
  from agentex import AsyncAgentex
4
- from agentex.lib.adk.utils._modules.client import create_async_agentex_client
5
4
  from agentex.lib.core.adapters.streams.adapter_redis import RedisStreamRepository
6
5
  from agentex.lib.core.services.adk.streaming import (
7
6
  StreamingService,
@@ -35,7 +34,7 @@ class StreamingModule:
35
34
  """
36
35
  if streaming_service is None:
37
36
  stream_repository = RedisStreamRepository()
38
- agentex_client = create_async_agentex_client()
37
+ agentex_client = AsyncAgentex()
39
38
  self._streaming_service = StreamingService(
40
39
  agentex_client=agentex_client,
41
40
  stream_repository=stream_repository,
@@ -3,7 +3,6 @@ from datetime import timedelta
3
3
  from temporalio.common import RetryPolicy
4
4
 
5
5
  from agentex import AsyncAgentex
6
- from agentex.lib.adk.utils._modules.client import create_async_agentex_client
7
6
  from agentex.lib.core.services.adk.tasks import TasksService
8
7
  from agentex.lib.core.temporal.activities.activity_helpers import ActivityHelpers
9
8
  from agentex.lib.core.temporal.activities.adk.tasks_activities import (
@@ -32,7 +31,7 @@ class TasksModule:
32
31
  tasks_service: TasksService | None = None,
33
32
  ):
34
33
  if tasks_service is None:
35
- agentex_client = create_async_agentex_client()
34
+ agentex_client = AsyncAgentex()
36
35
  tracer = AsyncTracer(agentex_client)
37
36
  self._tasks_service = TasksService(
38
37
  agentex_client=agentex_client, tracer=tracer
@@ -6,7 +6,6 @@ from typing import Any
6
6
  from temporalio.common import RetryPolicy
7
7
 
8
8
  from agentex import AsyncAgentex
9
- from agentex.lib.adk.utils._modules.client import create_async_agentex_client
10
9
  from agentex.lib.core.services.adk.tracing import TracingService
11
10
  from agentex.lib.core.temporal.activities.activity_helpers import ActivityHelpers
12
11
  from agentex.lib.core.temporal.activities.adk.tracing_activities import (
@@ -39,7 +38,7 @@ class TracingModule:
39
38
  tracing_activities (Optional[TracingActivities]): Optional pre-configured tracing activities. If None, will be auto-initialized.
40
39
  """
41
40
  if tracing_service is None:
42
- agentex_client = create_async_agentex_client()
41
+ agentex_client = AsyncAgentex()
43
42
  tracer = AsyncTracer(agentex_client)
44
43
  self._tracing_service = TracingService(tracer=tracer)
45
44
  else:
@@ -2,7 +2,6 @@ import asyncio
2
2
  import base64
3
3
  import inspect
4
4
  import json
5
- import os
6
5
  from collections.abc import AsyncGenerator, Awaitable, Callable
7
6
  from contextlib import asynccontextmanager
8
7
  from typing import Any
@@ -14,7 +13,7 @@ from fastapi.responses import StreamingResponse
14
13
  from pydantic import TypeAdapter, ValidationError
15
14
 
16
15
  # from agentex.lib.sdk.fastacp.types import BaseACPConfig
17
- from agentex.lib.environment_variables import EnvironmentVariables, refreshed_environment_variables
16
+ from agentex.lib.environment_variables import EnvironmentVariables
18
17
  from agentex.lib.types.acp import (
19
18
  PARAMS_MODEL_BY_METHOD,
20
19
  RPC_SYNC_METHODS,
@@ -391,16 +390,8 @@ class BaseACPServer(FastAPI):
391
390
  registration_url, json=registration_data, timeout=30.0
392
391
  )
393
392
  if response.status_code == 200:
394
- agent = response.json()
395
- agent_id, agent_name = agent["id"], agent["name"]
396
-
397
- os.environ["AGENT_ID"] = agent_id
398
- os.environ["AGENT_NAME"] = agent_name
399
- refreshed_environment_variables.AGENT_ID = agent_id
400
- refreshed_environment_variables.AGENT_NAME = agent_name
401
-
402
393
  logger.info(
403
- f"Successfully registered agent '{agent_name}' with Agentex server with acp_url: {full_acp_url}. Registration data: {registration_data}"
394
+ f"Successfully registered agent '{env_vars.AGENT_NAME}' with Agentex server with acp_url: {full_acp_url}. Registration data: {registration_data}"
404
395
  )
405
396
  return # Success, exit the retry loop
406
397
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: agentex-sdk
3
- Version: 0.2.2
3
+ Version: 0.2.3
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=9l4awzDo0H4hmmCOlgavow683f4hzG__e6Tv4BF93Lw,159
14
+ agentex/_version.py,sha256=gaveMH33nXDCGMmyPCNNYeNapFs-32mlnSES-b86nfA,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,15 +29,15 @@ agentex/lib/environment_variables.py,sha256=FbJ-tm_thJs5Fv1q4-oY4CED4DNlwCeu3v4x
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=0D9HLwBO3SX4eEsx1BY9G90jyvTABmaxdOzANg1rmzQ,9027
33
- agentex/lib/adk/_modules/agent_task_tracker.py,sha256=fXMDs1zgAC6n8EmWTU5_trs79EGVBCEPxd5eBOZmdE0,7022
34
- agentex/lib/adk/_modules/agents.py,sha256=VlT_PXnyb3Knh-nx1rfflD9N6gjp5O0_6Z_QL5SCThU,2788
35
- agentex/lib/adk/_modules/events.py,sha256=RHQZ4ircC60zdm1chRzo3cdt7LNqDoJfPLNJXEz4BH0,5262
36
- agentex/lib/adk/_modules/messages.py,sha256=1LxexTBif7HXltN3b1u6A5upXuXuq6ZkFAdIrbSv2zo,10636
37
- agentex/lib/adk/_modules/state.py,sha256=z2Zh1JB3qJo-4BsVABnFZIeDWWKQDbcOw6itl0hU_E4,10730
38
- agentex/lib/adk/_modules/streaming.py,sha256=lbRQBmySsx63wKiHeR5ueNW_6DJckCNStQ0wQynC4r4,3095
39
- agentex/lib/adk/_modules/tasks.py,sha256=q3IBdnwVXrv9Ht7z4jkm8RWOpzU9n3VKgrX3FTNXSZ8,4220
40
- agentex/lib/adk/_modules/tracing.py,sha256=A_kH332f_DFVfMftPHGEg3oi4RFcwDXohg7xtvWUuTY,7344
32
+ agentex/lib/adk/_modules/acp.py,sha256=0cNsHYCMvMA6GfWpPg4SSbBTFLP8PPx_SXZIoizswUU,8934
33
+ agentex/lib/adk/_modules/agent_task_tracker.py,sha256=B6Rwh-_rHzCJrTVWcteVT9l1acSj9WJtQ6NhLgJ9now,6929
34
+ agentex/lib/adk/_modules/agents.py,sha256=Rhv2hf2eADfsmSj3Y2CBgoGLfsavgyv14_6cMK_qUJY,2695
35
+ agentex/lib/adk/_modules/events.py,sha256=FxJHmENDBzYIcXtWuuDp86tLxbffLGju3qbVih2an_s,5169
36
+ agentex/lib/adk/_modules/messages.py,sha256=vYJ4i-69aOYXf-9phN_fMEtqwvp5HL9cW1Kf2vpRxEs,10543
37
+ agentex/lib/adk/_modules/state.py,sha256=F4svy-QPVKs0xfb6lz9eMKpb6ibbdUK2thwv94wuL4Y,10637
38
+ agentex/lib/adk/_modules/streaming.py,sha256=XpLvIz-MA_SDOw-sIuPS8hFhN-jaGcOxN-LEd1F9pDg,3002
39
+ agentex/lib/adk/_modules/tasks.py,sha256=ch-EFsVdc9bkU2tQMm30JVZUlP48ai7pKIOhUkPPABw,4127
40
+ agentex/lib/adk/_modules/tracing.py,sha256=sNpG7WNMdWpscjUMGFFthJ1gqxm0_gOkf2yrMulcliM,7251
41
41
  agentex/lib/adk/providers/__init__.py,sha256=KPWC8AYsl8lPgpFoRXlGwzozb-peKLAzV_DcTWXBsz4,306
42
42
  agentex/lib/adk/providers/_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  agentex/lib/adk/providers/_modules/litellm.py,sha256=YUHZ_m0kL9wEG5pX9x4BeyioiDjOa2anCWk6uo6-vqQ,9393
@@ -45,7 +45,6 @@ agentex/lib/adk/providers/_modules/openai.py,sha256=h7G3y4Gd2wF3XuYEi_aQXORxZhtH
45
45
  agentex/lib/adk/providers/_modules/sgp.py,sha256=Me5TeU7OPjPBVeEw7a-DQnYcJ3fbGi3liYbuW5CGiLE,3131
46
46
  agentex/lib/adk/utils/__init__.py,sha256=7f6ayV0_fqyw5cwzVANNcZWGJZ-vrrYtZ0qi7KKBRFs,130
47
47
  agentex/lib/adk/utils/_modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- agentex/lib/adk/utils/_modules/client.py,sha256=ujttuam5Kd0CRcbsI1BLrQ7dhcAP68xaXyWXx34imR0,357
49
48
  agentex/lib/adk/utils/_modules/templating.py,sha256=YPm2bY_iBv9jWf0lncRGUpBZyq_QHBCRlM-XbHjauRc,3502
50
49
  agentex/lib/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
50
  agentex/lib/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -177,7 +176,7 @@ agentex/lib/sdk/config/local_development_config.py,sha256=b1AZsOVo1RoHKbk8Nm5nC8
177
176
  agentex/lib/sdk/config/project_config.py,sha256=CGH_r9KbnSFMj2CnBkZnfg41L2o0TeVNz6MwBDKPT_U,3642
178
177
  agentex/lib/sdk/fastacp/__init__.py,sha256=UvAdexdnfb4z0F4a2sfXROFyh9EjH89kf3AxHPybzCM,75
179
178
  agentex/lib/sdk/fastacp/fastacp.py,sha256=K4D7a9EiJfCgWp2hrE_TbpZBaF4Uc46MfndZK3F9mA0,3061
180
- agentex/lib/sdk/fastacp/base/base_acp_server.py,sha256=60xo9GGe4vfb2Sj2Oi_BzjrnBVTjhBYnmhKyNHUc2zg,17524
179
+ agentex/lib/sdk/fastacp/base/base_acp_server.py,sha256=gsbBb8-zNu991vTh6_f5KjR_NC8Knoyy1YTsPAPN2KQ,17066
181
180
  agentex/lib/sdk/fastacp/impl/agentic_base_acp.py,sha256=fWLX9_mxmX502EBXoymUz1Tu1vEppshS48-aOSpuvlM,2600
182
181
  agentex/lib/sdk/fastacp/impl/sync_acp.py,sha256=8FEDfBxI31NoVLX9nyckQ8QwA0UV4svC3fhGKgXBIwk,3862
183
182
  agentex/lib/sdk/fastacp/impl/temporal_acp.py,sha256=ZLqjzBBVrXJCXD2bFlrcDkFvpsXZp3thC2rTwZ6xNaY,3737
@@ -288,8 +287,8 @@ agentex/types/messages/batch_create_params.py,sha256=trUV75ntEVnxYhd1FIWub6dHBaN
288
287
  agentex/types/messages/batch_create_response.py,sha256=yaSLTw2MWWpHF23BGO1Xy9js38_7EIqHAuiLha8VSfc,278
289
288
  agentex/types/messages/batch_update_params.py,sha256=Ug5CThbD49a8j4qucg04OdmVrp_gApgpw0hg6NLsR3g,433
290
289
  agentex/types/messages/batch_update_response.py,sha256=TbSBe6SuPzjXXWSj-nRjT1JHGBooTshHQQDa1AixQA8,278
291
- agentex_sdk-0.2.2.dist-info/METADATA,sha256=WHWvOaMDaUS5QYUJ3PiQaU1uH2zvw7PP2IzpoxoyHYg,14110
292
- agentex_sdk-0.2.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
293
- agentex_sdk-0.2.2.dist-info/entry_points.txt,sha256=V7vJuMZdF0UlvgX6KiBN7XUvq_cxF5kplcYvc1QlFaQ,62
294
- agentex_sdk-0.2.2.dist-info/licenses/LICENSE,sha256=Q1AOx2FtRcMlyMgQJ9eVN2WKPq2mQ33lnB4tvWxabLA,11337
295
- agentex_sdk-0.2.2.dist-info/RECORD,,
290
+ agentex_sdk-0.2.3.dist-info/METADATA,sha256=hoWAam811pyQl421I9RIHGvrZc3O8lVUWaTZbd-y4UQ,14110
291
+ agentex_sdk-0.2.3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
292
+ agentex_sdk-0.2.3.dist-info/entry_points.txt,sha256=V7vJuMZdF0UlvgX6KiBN7XUvq_cxF5kplcYvc1QlFaQ,62
293
+ agentex_sdk-0.2.3.dist-info/licenses/LICENSE,sha256=Q1AOx2FtRcMlyMgQJ9eVN2WKPq2mQ33lnB4tvWxabLA,11337
294
+ agentex_sdk-0.2.3.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- import os
2
-
3
- from agentex import AsyncAgentex
4
- from agentex.lib.environment_variables import refreshed_environment_variables
5
-
6
-
7
- def create_async_agentex_client(**kwargs):
8
- agent_id = refreshed_environment_variables.AGENT_ID
9
- default_headers = {
10
- "x-agent-identity": agent_id
11
- }
12
- return AsyncAgentex(default_headers=default_headers, **kwargs)