agentscope-runtime 0.2.0b1__py3-none-any.whl → 0.2.0b2__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.
@@ -1,11 +1,10 @@
1
1
  # -*- coding: utf-8 -*-
2
- # pylint: disable=too-many-branches, self-assigning-variable
3
- # pylint: disable=too-many-statements
4
-
5
- import hashlib
6
- import logging
2
+ # pylint: disable=too-many-branches,too-many-statements
7
3
  import time
4
+ import hashlib
8
5
  import traceback
6
+ import logging
7
+
9
8
  from typing import Optional, Tuple
10
9
 
11
10
  from kubernetes import client
@@ -16,14 +15,12 @@ from .base_client import BaseClient
16
15
 
17
16
  logger = logging.getLogger(__name__)
18
17
 
19
- DEFAULT_IMAGE_REGISTRY = "agentscope-registry.ap-southeast-1.cr.aliyuncs.com"
20
-
21
18
 
22
19
  class KubernetesClient(BaseClient):
23
20
  def __init__(
24
21
  self,
25
22
  config=None,
26
- image_registry: Optional[str] = DEFAULT_IMAGE_REGISTRY,
23
+ image_registry: Optional[str] = None,
27
24
  ):
28
25
  self.config = config
29
26
  namespace = self.config.k8s_namespace
@@ -157,11 +154,7 @@ class KubernetesClient(BaseClient):
157
154
  container_name = name or "main-container"
158
155
 
159
156
  # Container specification
160
- # TODO: use image from docker registry first
161
-
162
- if not self.image_registry:
163
- image = image
164
- else:
157
+ if self.image_registry:
165
158
  image = f"{self.image_registry}/{image}"
166
159
 
167
160
  container = client.V1Container(
@@ -5,8 +5,8 @@ from typing import Optional, Type
5
5
 
6
6
  from agno.agent import Agent as AgAgent
7
7
  from agno.models.base import Model
8
- from agno.run.response import (
9
- RunResponseContentEvent,
8
+ from agno.run.agent import (
9
+ RunContentEvent,
10
10
  ToolCallStartedEvent,
11
11
  ToolCallCompletedEvent,
12
12
  )
@@ -163,12 +163,6 @@ class AgnoAgent(Agent):
163
163
  # the agent
164
164
  _agent = self.build(ag_context)
165
165
 
166
- resp = await _agent.arun(
167
- ag_context.new_message,
168
- messages=ag_context.memory,
169
- stream=True,
170
- )
171
-
172
166
  text_message = Message(
173
167
  type=MessageType.MESSAGE,
174
168
  role="assistant",
@@ -178,8 +172,12 @@ class AgnoAgent(Agent):
178
172
 
179
173
  text_delta_content = TextContent(delta=True)
180
174
  is_text_delta = False
181
- async for event in resp:
182
- if isinstance(event, RunResponseContentEvent):
175
+ async for event in _agent.arun(
176
+ ag_context.new_message,
177
+ session_state=ag_context.memory,
178
+ stream=True,
179
+ ):
180
+ if isinstance(event, RunContentEvent):
183
181
  is_text_delta = True
184
182
  text_delta_content.text = event.content
185
183
  text_delta_content = text_message.add_delta_content(
@@ -51,7 +51,7 @@ class TablestoreMemoryService(MemoryService):
51
51
  self,
52
52
  tablestore_client: AsyncTablestoreClient,
53
53
  search_strategy: SearchStrategy = SearchStrategy.FULL_TEXT,
54
- embedding_model: Optional[Embeddings] = DashScopeEmbeddings(),
54
+ embedding_model: Optional[Embeddings] = None,
55
55
  vector_dimension: int = 1536,
56
56
  table_name: Optional[str] = "agentscope_runtime_memory",
57
57
  search_index_schema: Optional[List[tablestore.FieldSchema]] = (
@@ -63,6 +63,9 @@ class TablestoreMemoryService(MemoryService):
63
63
  vector_metric_type: VectorMetricType = VectorMetricType.VM_COSINE,
64
64
  **kwargs: Any,
65
65
  ):
66
+ if embedding_model is None:
67
+ embedding_model = DashScopeEmbeddings()
68
+
66
69
  self._search_strategy = search_strategy
67
70
  self._embedding_model = (
68
71
  embedding_model # the parameter is None, don't store vector.
@@ -300,45 +300,3 @@ class BFCLSandbox(TrainingSandbox):
300
300
  bearer_token,
301
301
  sandbox_type,
302
302
  )
303
-
304
-
305
- @SandboxRegistry.register(
306
- build_image_uri("runtime-sandbox-webshop", arm64_compatible=False),
307
- sandbox_type=SandboxType.WEBSHOP,
308
- runtime_config={"shm_size": "5.06gb"},
309
- security_level="medium",
310
- timeout=30,
311
- description="webshop Sandbox",
312
- )
313
- class WebShopSandbox(TrainingSandbox):
314
- """
315
- Training Sandbox class for managing and executing training-related tasks.
316
-
317
- This class provides methods to create, manage, and interact with
318
- training environment instances using specialized tool calls.
319
- """
320
-
321
- def __init__(
322
- self,
323
- sandbox_id: Optional[str] = None,
324
- timeout: int = 3000,
325
- base_url: Optional[str] = None,
326
- bearer_token: Optional[str] = None,
327
- sandbox_type: SandboxType = SandboxType.WEBSHOP,
328
- ):
329
- """
330
- Initialize the Training Sandbox.
331
-
332
- Args:
333
- sandbox_id (Optional[str]): Unique identifier for the sandbox.
334
- timeout (int): Maximum time allowed for sandbox operations.
335
- base_url (Optional[str]): Base URL for sandbox API.
336
- bearer_token (Optional[str]): Authentication token for API access.
337
- """
338
- super().__init__(
339
- sandbox_id,
340
- timeout,
341
- base_url,
342
- bearer_token,
343
- sandbox_type,
344
- )
@@ -68,4 +68,3 @@ class SandboxType(DynamicEnum):
68
68
  GUI = "gui"
69
69
  APPWORLD = "appworld"
70
70
  BFCL = "bfcl"
71
- WEBSHOP = "webshop"
@@ -1,2 +1,2 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = "v0.2.0b1"
2
+ __version__ = "v0.2.0b2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentscope-runtime
3
- Version: 0.2.0b1
3
+ Version: 0.2.0b2
4
4
  Summary: A production-ready runtime framework for agent applications, providing secure sandboxed execution environments and scalable deployment solutions with multi-framework support.
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -30,10 +30,11 @@ Requires-Dist: furo>=2025.7.19; extra == "dev"
30
30
  Requires-Dist: pytest-cov>=6.2.1; extra == "dev"
31
31
  Requires-Dist: fakeredis>=2.31.0; extra == "dev"
32
32
  Requires-Dist: sphinx-autoapi>=3.6.0; extra == "dev"
33
+ Requires-Dist: pytest-mock>=3.15.1; extra == "dev"
33
34
  Provides-Extra: langgraph
34
35
  Requires-Dist: langgraph>=0.5.3; extra == "langgraph"
35
36
  Provides-Extra: agno
36
- Requires-Dist: agno<2.0.0,>=1.7.5; extra == "agno"
37
+ Requires-Dist: agno>=2.0.0; extra == "agno"
37
38
  Provides-Extra: autogen
38
39
  Requires-Dist: autogen-agentchat>=0.7.4; extra == "autogen"
39
40
  Requires-Dist: autogen-ext[openai]>=0.7.4; extra == "autogen"
@@ -524,7 +525,7 @@ limitations under the License.
524
525
 
525
526
  ## Contributors ✨
526
527
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
527
- [![All Contributors](https://img.shields.io/badge/all_contributors-14-orange.svg?style=flat-square)](#contributors-)
528
+ [![All Contributors](https://img.shields.io/badge/all_contributors-15-orange.svg?style=flat-square)](#contributors-)
528
529
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
529
530
 
530
531
  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
@@ -552,6 +553,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
552
553
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/Sodawyx"><img src="https://avatars.githubusercontent.com/u/34974468?v=4?s=100" width="100px;" alt="Yuxuan Wu"/><br /><sub><b>Yuxuan Wu</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=Sodawyx" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=Sodawyx" title="Documentation">📖</a></td>
553
554
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/TianYu92"><img src="https://avatars.githubusercontent.com/u/12960468?v=4?s=100" width="100px;" alt="Fear1es5"/><br /><sub><b>Fear1es5</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3ATianYu92" title="Bug reports">🐛</a></td>
554
555
  </tr>
556
+ <tr>
557
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/ms-cs"><img src="https://avatars.githubusercontent.com/u/43086458?v=4?s=100" width="100px;" alt="zhiyong"/><br /><sub><b>zhiyong</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=ms-cs" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3Ams-cs" title="Bug reports">🐛</a></td>
558
+ </tr>
555
559
  </tbody>
556
560
  <tfoot>
557
561
  <tr>
@@ -1,5 +1,5 @@
1
1
  agentscope_runtime/__init__.py,sha256=LMAUeUpPo2qzqh3zyZ-JJwc8GrsiT9b-yNhQMxlKmfE,84
2
- agentscope_runtime/version.py,sha256=8g2WlvxcMQcKNVtMNHlWLYtwX1Wxug8adENjO7j_r2U,49
2
+ agentscope_runtime/version.py,sha256=mutocz89mUpOBw6d0U9YceMbOgyUV-udkRPCsE6KWjM,49
3
3
  agentscope_runtime/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  agentscope_runtime/common/collections/__init__.py,sha256=teQPF7huMB2yEX_CAFsmIJhQxH7ldHR7gr11W3jlx4o,582
5
5
  agentscope_runtime/common/collections/base_mapping.py,sha256=IIVNwvaGVAiL6XxV0LvUHx-JmDvUc19iOGyRyAccMaI,361
@@ -15,12 +15,12 @@ agentscope_runtime/common/container_clients/__init__.py,sha256=47DEQpj8HBSa-_TIm
15
15
  agentscope_runtime/common/container_clients/agentrun_client.py,sha256=nibFHR5N3tfNDcREi_2obm09a6GZoXV3iZkYq3NsLvY,40672
16
16
  agentscope_runtime/common/container_clients/base_client.py,sha256=_uvxRh65lbMNXDcHjq01aYuNUrcxRlNzRtRIPMgWFGc,992
17
17
  agentscope_runtime/common/container_clients/docker_client.py,sha256=eP7NcUWdTuV1wwF9FeuQCZBDrVOUVRiKOcz3GYD4K-o,7724
18
- agentscope_runtime/common/container_clients/kubernetes_client.py,sha256=ul7NPKCRb2cWwFsuvEfph4xJvSN4VCmzsohdr4FHfZM,39788
18
+ agentscope_runtime/common/container_clients/kubernetes_client.py,sha256=8_X091fbcR97_chFVMiWNDj5QmkBPG3tkS5zlXs-OCk,39550
19
19
  agentscope_runtime/engine/__init__.py,sha256=L7hR6q4VqS6UkHYL8zLSstD7ly4mwxojqlD311Drgq8,418
20
20
  agentscope_runtime/engine/runner.py,sha256=cy049XBOJamuoOuWYlWW4nLfLmvbj9TLX1-sib2b1yg,8396
21
21
  agentscope_runtime/engine/agents/__init__.py,sha256=xHp7FY6QM-nAhQAECi7xzrJkRkYZpAa5_zHRhO6Zogc,54
22
22
  agentscope_runtime/engine/agents/agentscope_agent.py,sha256=eMwbpk6xU-8ZBNNWr2-WULwhPaGwcJmsXFuPC6Emyc0,17453
23
- agentscope_runtime/engine/agents/agno_agent.py,sha256=ORv0ivIk4yxQDdKLtwvjjW27FxGGb10vBwITEyfLiqA,6754
23
+ agentscope_runtime/engine/agents/agno_agent.py,sha256=Mq3NHGQsjQHVT6Y6d3GRrjS8GMk1tXWlC2RDFX3AHg4,6713
24
24
  agentscope_runtime/engine/agents/autogen_agent.py,sha256=bpPLpCAz34QD3suJyc4KT3spR5h0ZlvS_FsSlHkU2K0,7844
25
25
  agentscope_runtime/engine/agents/base_agent.py,sha256=fGf4MNKmfm_fsU2orTPLpt7TT5HkZZZYR05rhp5s7-E,782
26
26
  agentscope_runtime/engine/agents/langgraph_agent.py,sha256=05Z5js7g9Dxy-MWj0W00jOtFMNnHzSPjlP3WIIVHTtQ,1416
@@ -84,7 +84,7 @@ agentscope_runtime/engine/services/reme_personal_memory_service.py,sha256=Cmd0Fp
84
84
  agentscope_runtime/engine/services/reme_task_memory_service.py,sha256=d1QV9e1ifAQIO4Kr-Q9gzx7OhKH_CkUhuyygHRLprWo,338
85
85
  agentscope_runtime/engine/services/sandbox_service.py,sha256=WJp9dZSHYm3eJkw7EoLLj9LgTCjnvrH6xxhWucIKYbI,6038
86
86
  agentscope_runtime/engine/services/session_history_service.py,sha256=C77KwRclXbnMDE3iT5WHglRFYI0aSwDg4EChJCgknzQ,8088
87
- agentscope_runtime/engine/services/tablestore_memory_service.py,sha256=UX3daPzkvFs6YXs-7KirAe_TtD8zXJKKE49rkL4W5y0,10486
87
+ agentscope_runtime/engine/services/tablestore_memory_service.py,sha256=MRDSAsMGuXtpQ_IQRld-TaUj6UUwNpUHXuCFqVgdmFk,10558
88
88
  agentscope_runtime/engine/services/tablestore_rag_service.py,sha256=uGx8I8OGFJPBQs_lTd8Ew-OXMEivEODHA1i9yiFh3Ns,5188
89
89
  agentscope_runtime/engine/services/tablestore_session_history_service.py,sha256=peCon6o4Ryyiu3E2AQDgbB8NFsdPi4tIZK4TEiuvFUA,10353
90
90
  agentscope_runtime/engine/services/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -100,7 +100,7 @@ agentscope_runtime/engine/tracing/wrapper.py,sha256=n6x2tDOBmWxO7oobQnjTbi1LBj8j
100
100
  agentscope_runtime/sandbox/__init__.py,sha256=2q36ii6765TpuRET1cHwd69HgOEXjxxCpKD8d-Mrahs,440
101
101
  agentscope_runtime/sandbox/build.py,sha256=RAZkV0rFp24BNmJBZiMYAQ4KafUAELO3V1Ys6Afodwc,8451
102
102
  agentscope_runtime/sandbox/constant.py,sha256=NzpxJ1hBDkP9J_c45FsG3iDgBkfEkIlkSKjc4X78tiU,1011
103
- agentscope_runtime/sandbox/enums.py,sha256=pccPle1bXihQrZHfgN4XKRKHmBNhJA7P2XT4jgT0HWI,1896
103
+ agentscope_runtime/sandbox/enums.py,sha256=xwDao512RlmgkuxYsOeEblNtzgKpPvggA8x8sDHdBr8,1872
104
104
  agentscope_runtime/sandbox/mcp_server.py,sha256=UT3aRZqyeHqEhhm-wZ0Ilhew3eDMHzz9DCN6Qb-eKFk,6012
105
105
  agentscope_runtime/sandbox/registry.py,sha256=3ukwbTOjSINWH7DIOmG1iPgze5nb-zXl2X8M7_AeBwg,4190
106
106
  agentscope_runtime/sandbox/utils.py,sha256=l0gpIM3KjPMlVUtrhOia3Se4HbA4U_MuylySjpoHdrY,3970
@@ -134,7 +134,7 @@ agentscope_runtime/sandbox/box/training_box/__init__.py,sha256=vG2MQviqdmIUSjHmH
134
134
  agentscope_runtime/sandbox/box/training_box/base.py,sha256=iUPsfA8oiGDR3BMVU7qisvO-UT8HtCx78ayW67DQ0WQ,3307
135
135
  agentscope_runtime/sandbox/box/training_box/env_service.py,sha256=YoMswhQrX8VmE202tpFq-bQo6gOd2oemBhTG_MD9Rwg,22616
136
136
  agentscope_runtime/sandbox/box/training_box/registry.py,sha256=6fTMZvJbakhEqkaO61K-wIfX6uau7g4nFP63bQ7jiNI,1362
137
- agentscope_runtime/sandbox/box/training_box/training_box.py,sha256=b4FS8KPbVCIKeqP0bunekFzLopeCphQBLnH3ADA9jg0,10186
137
+ agentscope_runtime/sandbox/box/training_box/training_box.py,sha256=duX1QNaXz8lOjjXP5Uw1wykw91YVklhRMlcnZw8NvEA,8877
138
138
  agentscope_runtime/sandbox/box/training_box/environments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
139
139
  agentscope_runtime/sandbox/box/training_box/environments/appworld/appworld_env.py,sha256=FJc0eb6bnKL6lxx_4EKWr7kmKLi2jLsykNstecXEqkc,27786
140
140
  agentscope_runtime/sandbox/box/training_box/environments/bfcl/bfcl_dataprocess.py,sha256=jkg8wDwDXdZZU7q777tnyqc-C9hRlPF0pffJ4DX5upQ,7352
@@ -175,9 +175,9 @@ agentscope_runtime/sandbox/tools/filesystem/__init__.py,sha256=AJK88YU0ceJe99H7T
175
175
  agentscope_runtime/sandbox/tools/filesystem/tool.py,sha256=CPsl4TMf76BOSQtG1dqDcVdymciKhMknIG5FffoI2Eg,9847
176
176
  agentscope_runtime/sandbox/tools/gui/__init__.py,sha256=agr8SMmuLbtk7aTMhnD-b70bbYbYI-ymPS5yPw6HRyM,91
177
177
  agentscope_runtime/sandbox/tools/gui/tool.py,sha256=8gLZgEMJDiGoob56ptnvnjh19dWw40XsDL93AGWplto,4064
178
- agentscope_runtime-0.2.0b1.dist-info/licenses/LICENSE,sha256=3MckDTgiTJ0E6cxo8FeamFVEFiwz3XJWsriuTtRJzxY,11337
179
- agentscope_runtime-0.2.0b1.dist-info/METADATA,sha256=sPub-MnF6Pmmbt83R-t816-zxuxEAihMnxwfNT45vzM,29126
180
- agentscope_runtime-0.2.0b1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
181
- agentscope_runtime-0.2.0b1.dist-info/entry_points.txt,sha256=K8Tb95DEHzRW3AxsZAXghmqeDcPpO7n7rNmU5glfmaU,298
182
- agentscope_runtime-0.2.0b1.dist-info/top_level.txt,sha256=0YHketA7WcMmRmF-3lUzedeTOnP7iL77h-ekb-iG720,19
183
- agentscope_runtime-0.2.0b1.dist-info/RECORD,,
178
+ agentscope_runtime-0.2.0b2.dist-info/licenses/LICENSE,sha256=3MckDTgiTJ0E6cxo8FeamFVEFiwz3XJWsriuTtRJzxY,11337
179
+ agentscope_runtime-0.2.0b2.dist-info/METADATA,sha256=uqi9YzYRssV3vZ1rrrGoun5ZGL47LdrzxaD3WxUuBWM,29643
180
+ agentscope_runtime-0.2.0b2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
181
+ agentscope_runtime-0.2.0b2.dist-info/entry_points.txt,sha256=K8Tb95DEHzRW3AxsZAXghmqeDcPpO7n7rNmU5glfmaU,298
182
+ agentscope_runtime-0.2.0b2.dist-info/top_level.txt,sha256=0YHketA7WcMmRmF-3lUzedeTOnP7iL77h-ekb-iG720,19
183
+ agentscope_runtime-0.2.0b2.dist-info/RECORD,,