agentscope-runtime 0.1.0__py3-none-any.whl → 0.1.1__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.
Files changed (27) hide show
  1. agentscope_runtime/engine/agents/agentscope_agent/agent.py +1 -0
  2. agentscope_runtime/engine/agents/agno_agent.py +1 -0
  3. agentscope_runtime/engine/agents/autogen_agent.py +245 -0
  4. agentscope_runtime/engine/schemas/agent_schemas.py +1 -1
  5. agentscope_runtime/engine/services/memory_service.py +2 -2
  6. agentscope_runtime/engine/services/redis_memory_service.py +187 -0
  7. agentscope_runtime/engine/services/redis_session_history_service.py +155 -0
  8. agentscope_runtime/sandbox/build.py +1 -1
  9. agentscope_runtime/sandbox/custom/custom_sandbox.py +0 -1
  10. agentscope_runtime/sandbox/custom/example.py +0 -1
  11. agentscope_runtime/sandbox/manager/container_clients/__init__.py +2 -0
  12. agentscope_runtime/sandbox/manager/container_clients/docker_client.py +246 -4
  13. agentscope_runtime/sandbox/manager/container_clients/kubernetes_client.py +550 -0
  14. agentscope_runtime/sandbox/manager/sandbox_manager.py +21 -82
  15. agentscope_runtime/sandbox/manager/server/app.py +55 -24
  16. agentscope_runtime/sandbox/manager/server/config.py +28 -16
  17. agentscope_runtime/sandbox/model/container.py +3 -1
  18. agentscope_runtime/sandbox/model/manager_config.py +19 -2
  19. agentscope_runtime/sandbox/tools/tool.py +111 -0
  20. agentscope_runtime/version.py +1 -1
  21. {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/METADATA +74 -13
  22. {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/RECORD +26 -23
  23. agentscope_runtime/sandbox/manager/utils.py +0 -78
  24. {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/WHEEL +0 -0
  25. {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/entry_points.txt +0 -0
  26. {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/licenses/LICENSE +0 -0
  27. {agentscope_runtime-0.1.0.dist-info → agentscope_runtime-0.1.1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentscope-runtime
3
- Version: 0.1.0
3
+ Version: 0.1.1
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
@@ -17,14 +17,18 @@ Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
17
17
  Requires-Dist: pre-commit>=4.2.0; extra == "dev"
18
18
  Requires-Dist: jupyter-book>=1.0.4.post1; extra == "dev"
19
19
  Requires-Dist: furo>=2025.7.19; extra == "dev"
20
+ Requires-Dist: pytest-cov>=6.2.1; extra == "dev"
21
+ Requires-Dist: fakeredis>=2.31.0; extra == "dev"
22
+ Requires-Dist: sphinx-autoapi>=3.6.0; extra == "dev"
20
23
  Provides-Extra: sandbox
21
24
  Requires-Dist: docker>=7.1.0; extra == "sandbox"
22
25
  Requires-Dist: steel-sdk>=0.1.0; extra == "sandbox"
23
26
  Requires-Dist: redis>=6.0.0b2; extra == "sandbox"
24
27
  Requires-Dist: oss2>=2.19.1; extra == "sandbox"
25
- Requires-Dist: requests>=2.32.4; extra == "sandbox"
26
28
  Requires-Dist: pydantic-settings>=2.9.1; extra == "sandbox"
27
29
  Requires-Dist: dotenv>=0.9.9; extra == "sandbox"
30
+ Requires-Dist: kubernetes>=33.1.0; extra == "sandbox"
31
+ Requires-Dist: shortuuid>=1.0.13; extra == "sandbox"
28
32
  Provides-Extra: agentscope
29
33
  Requires-Dist: agentscope==1.0.0; extra == "agentscope"
30
34
  Provides-Extra: langgraph
@@ -33,17 +37,30 @@ Provides-Extra: agno
33
37
  Requires-Dist: agno>=1.7.5; extra == "agno"
34
38
  Provides-Extra: a2a
35
39
  Requires-Dist: a2a-sdk>=0.3.0; extra == "a2a"
40
+ Provides-Extra: autogen
41
+ Requires-Dist: autogen-agentchat>=0.7.4; extra == "autogen"
42
+ Requires-Dist: autogen-ext[openai]>=0.7.4; extra == "autogen"
36
43
  Dynamic: license-file
37
44
 
38
45
  <div align="center">
39
46
 
40
47
  # AgentScope Runtime
41
48
 
42
- [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
43
- [![Version](https://img.shields.io/badge/version-0.1.0-green.svg)](https://github.com/agentscope-ai/agentscope-runtime)
44
- [![License](https://img.shields.io/badge/license-Apache%202.0-yellow.svg)](LICENSE)
45
- [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
46
-
49
+ [![PyPI](https://img.shields.io/pypi/v/agentscope-runtime?label=PyPI&color=brightgreen&logo=python)](https://pypi.org/project/agentscope-runtime/)
50
+ [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg?logo=python&label=Python)](https://python.org)
51
+ [![License](https://img.shields.io/badge/license-Apache%202.0-red.svg?logo=apache&label=Liscnese)](LICENSE)
52
+ [![Code Style](https://img.shields.io/badge/code%20style-black-black.svg?logo=python&label=CodeStyle)](https://github.com/psf/black)
53
+ [![GitHub Stars](https://img.shields.io/github/stars/agentscope-ai/agentscope-runtime?style=flat&logo=github&color=yellow&label=Stars)](https://github.com/agentscope-ai/agentscope-runtime/stargazers)
54
+ [![GitHub Forks](https://img.shields.io/github/forks/agentscope-ai/agentscope-runtime?style=flat&logo=github&color=purple&label=Forks)](https://github.com/agentscope-ai/agentscope-runtime/network)
55
+ [![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg?logo=githubactions&label=Build)](https://github.com/agentscope-ai/agentscope-runtime/actions)
56
+ [![Cookbook](https://img.shields.io/badge/📚_Cookbook-English|中文-teal.svg)](https://runtime.agentscope.io)
57
+ [![DeepWiki](https://img.shields.io/badge/DeepWiki-agentscope--runtime-navy.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/agentscope-ai/agentscope-runtime)
58
+ [![A2A](https://img.shields.io/badge/A2A-Agent_to_Agent-blue.svg?label=A2A)](https://a2a-protocol.org/)
59
+ [![MCP](https://img.shields.io/badge/MCP-Model_Context_Protocol-purple.svg?logo=plug&label=MCP)](https://modelcontextprotocol.io/)
60
+ [![Discord](https://img.shields.io/badge/Discord-Join_Us-blueviolet.svg?logo=discord)](https://discord.gg/eYMpfnkG8h)
61
+ [![DingTalk](https://img.shields.io/badge/DingTalk-Join_Us-orange.svg)](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11)
62
+
63
+ [[Cookbook]](https://runtime.agentscope.io/)
47
64
  [[中文README]](README_zh.md)
48
65
 
49
66
  **A Production-Ready Runtime Framework for Intelligent Agent Applications**
@@ -81,7 +98,7 @@ Welcome to join our community on
81
98
 
82
99
  - [🚀 Quick Start](#-quick-start)
83
100
  - [📚 Cookbook](#-cookbook)
84
- - [🔌Agent Framework Integration](#-agent-framework-integration)
101
+ - [🔌 Agent Framework Integration](#-agent-framework-integration)
85
102
  - [🏗️ Deployment](#️-deployment)
86
103
  - [🤝 Contributing](#-contributing)
87
104
  - [📄 License](#-license)
@@ -96,14 +113,30 @@ Welcome to join our community on
96
113
 
97
114
  ### Installation
98
115
 
116
+ From PyPI:
117
+
99
118
  ```bash
100
- # Install dependencies
119
+ # Install core dependencies
101
120
  pip install agentscope-runtime
102
121
 
103
122
  # Install sandbox dependencies
104
123
  pip install "agentscope-runtime[sandbox]"
105
124
  ```
106
125
 
126
+ (Optional) From source:
127
+
128
+ ```bash
129
+ # Pull the source code from GitHub
130
+ git clone -b main https://github.com/agentscope-ai/agentscope-runtime.git
131
+ cd agentscope-runtime
132
+
133
+ # Install core dependencies
134
+ pip install -e .
135
+
136
+ # Install sandbox dependencies
137
+ pip install -e ".[sandbox]"
138
+ ```
139
+
107
140
  ### Basic Agent Usage Example
108
141
 
109
142
  This example demonstrates how to create a simple LLM agent using AgentScope Runtime and stream responses from the Qwen model.
@@ -164,14 +197,19 @@ with BaseSandbox() as box:
164
197
  print(box.run_shell_command(command="echo hello"))
165
198
  ```
166
199
 
200
+ > [!NOTE]
201
+ >
202
+ > Current version requires Docker or Kubernetes to be installed and running on your system. Please refer to [this tutorial](https://runtime.agentscope.io/en/sandbox.html) for more details.
203
+
167
204
  ---
168
205
 
169
206
  ## 📚 Cookbook
170
207
 
171
- - **[📖 Cookbook](/cookbook/en/intro.md)**: Comprehensive tutorials
172
- - **[💡 Concept](/cookbook/en/concept.md)**: Core concepts and architecture overview
173
- - **[🚀 Quick Start](/cookbook/en/quickstart.md)**: Quick start tutorial
174
- - **[🏠 Demo House](/cookbook/en/demohouse.md)**: Rich example projects
208
+ - **[📖 Cookbook](https://runtime.agentscope.io/en/intro.html)**: Comprehensive tutorials
209
+ - **[💡 Concept](https://runtime.agentscope.io/en/concept.html)**: Core concepts and architecture overview
210
+ - **[🚀 Quick Start](https://runtime.agentscope.io/en/quickstart.html)**: Quick start tutorial
211
+ - **[🏠 Demo House](https://runtime.agentscope.io/en/demohouse.html)**: Rich example projects
212
+ - **[📋 API Reference](https://runtime.agentscope.io/en/api/index.html)**: Complete API documentation
175
213
 
176
214
  ---
177
215
 
@@ -180,6 +218,7 @@ with BaseSandbox() as box:
180
218
  ### AgentScope Integration
181
219
 
182
220
  ```python
221
+ # pip install "agentscope-runtime[agentscope]"
183
222
  import os
184
223
 
185
224
  from agentscope.agent import ReActAgent
@@ -202,6 +241,7 @@ agent = AgentScopeAgent(
202
241
  ### Agno Integration
203
242
 
204
243
  ```python
244
+ # pip install "agentscope-runtime[agno]"
205
245
  from agno.agent import Agent
206
246
  from agno.models.openai import OpenAIChat
207
247
  from agentscope_runtime.engine.agents.agno_agent import AgnoAgent
@@ -218,9 +258,30 @@ agent = AgnoAgent(
218
258
  )
219
259
  ```
220
260
 
261
+ ### AutoGen Integration
262
+
263
+ ```python
264
+ # pip install "agentscope-runtime[autogen]"
265
+ from autogen_agentchat.agents import AssistantAgent
266
+ from autogen_ext.models.openai import OpenAIChatCompletionClient
267
+ from agentscope_runtime.engine.agents.autogen_agent import AutogenAgent
268
+
269
+ agent = AutogenAgent(
270
+ name="Friday",
271
+ model=OpenAIChatCompletionClient(
272
+ model="gpt-4",
273
+ ),
274
+ agent_config={
275
+ "system_message": "You're a helpful assistant",
276
+ },
277
+ agent_builder=AssistantAgent,
278
+ )
279
+ ```
280
+
221
281
  ### LangGraph Integration
222
282
 
223
283
  ```python
284
+ # pip install "agentscope-runtime[langgraph]"
224
285
  from typing import TypedDict
225
286
  from langgraph import graph, types
226
287
  from agentscope_runtime.engine.agents.langgraph_agent import LangGraphAgent
@@ -1,14 +1,15 @@
1
1
  agentscope_runtime/__init__.py,sha256=LMAUeUpPo2qzqh3zyZ-JJwc8GrsiT9b-yNhQMxlKmfE,84
2
- agentscope_runtime/version.py,sha256=uH1loJ9Z7js-rzD3AtGaiKy64plJ8DNE5Otkg7-erc8,47
2
+ agentscope_runtime/version.py,sha256=sf_U_KpZOWry0TU96guIQr490ZmITtjm4obgpWMHumM,47
3
3
  agentscope_runtime/engine/__init__.py,sha256=jsvYM1LlZVP4EFzsE5uu5ycgBU9CVnug7UyTzBmpX5g,213
4
4
  agentscope_runtime/engine/runner.py,sha256=HhOjfAgao-b5vzSZh6pckVhx0K32qs868dvRE3Z56TA,5686
5
5
  agentscope_runtime/engine/agents/__init__.py,sha256=xHp7FY6QM-nAhQAECi7xzrJkRkYZpAa5_zHRhO6Zogc,54
6
- agentscope_runtime/engine/agents/agno_agent.py,sha256=jw_ZbXL5Y_WiSWom2Q6WqeBE4Q5_TqC1hjQ1cPxKHnw,6674
6
+ agentscope_runtime/engine/agents/agno_agent.py,sha256=c2f575gc5ZOWGvrdjObo7IGSbM1Si0JQGxKpqtMSf14,6716
7
+ agentscope_runtime/engine/agents/autogen_agent.py,sha256=HbtvN8554FnkgMHX418sMgIM-hp7OVCUR2YJybRMKxI,7693
7
8
  agentscope_runtime/engine/agents/base_agent.py,sha256=fGf4MNKmfm_fsU2orTPLpt7TT5HkZZZYR05rhp5s7-E,782
8
9
  agentscope_runtime/engine/agents/langgraph_agent.py,sha256=05Z5js7g9Dxy-MWj0W00jOtFMNnHzSPjlP3WIIVHTtQ,1416
9
10
  agentscope_runtime/engine/agents/llm_agent.py,sha256=0hG_FRtAxmlljmI51GT7ui_7wjjHO03wckx9bNKra8Y,1356
10
11
  agentscope_runtime/engine/agents/agentscope_agent/__init__.py,sha256=lt1NJEDuBWaX1n-bqMbQR6Uol7-fFUuyeuHy8FQrzWk,97
11
- agentscope_runtime/engine/agents/agentscope_agent/agent.py,sha256=76F0Ij3nMR04elkUE4R_L5lbLygLJ_t79rnh3nijgEg,11941
12
+ agentscope_runtime/engine/agents/agentscope_agent/agent.py,sha256=Tp3OJi0r8aU1juXKF8fT9dCfaL2w3_sqQcSBuThndUM,11983
12
13
  agentscope_runtime/engine/agents/agentscope_agent/hooks.py,sha256=iX2xY3UDtiC1ilzvyHL4kLWKB4xH-iQ4o3erh5HVpXo,5444
13
14
  agentscope_runtime/engine/deployers/__init__.py,sha256=2eUo6uvloMt4AstmalkwcBgR7gPyppNqlmjld0Ztpxk,103
14
15
  agentscope_runtime/engine/deployers/base.py,sha256=0bb3zQiVE1jTMG0NCsjhcSeP7lhnbn1KPQRx1H5hues,494
@@ -25,14 +26,16 @@ agentscope_runtime/engine/llms/base_llm.py,sha256=Vvxlqom35qaSLYSyyh3hj-XsoyFxcf
25
26
  agentscope_runtime/engine/llms/qwen_llm.py,sha256=_J-PpwSrKNSmQzO6KNzJlMd5t4m47YVKXp0fl-KYQmA,1271
26
27
  agentscope_runtime/engine/misc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
28
  agentscope_runtime/engine/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- agentscope_runtime/engine/schemas/agent_schemas.py,sha256=lyYlXLn6EY7Yg_anook7mxG2TynjCmcf7Eja5UFDoHo,14653
29
+ agentscope_runtime/engine/schemas/agent_schemas.py,sha256=N4uPXeL6v6lrCy7EiFo02VbvxgfYv-2fNFAqwU1ohoI,14663
29
30
  agentscope_runtime/engine/schemas/context.py,sha256=Qd2ee4HCYNmD5VHsacrScdpNq8q2aJwsRtsrBZarI9M,1550
30
31
  agentscope_runtime/engine/services/__init__.py,sha256=SAsmwIr8etoUbqz5W1K2pH5ONlFzooXMQ0UFXTXfHwM,271
31
32
  agentscope_runtime/engine/services/base.py,sha256=g2hTc3ivj2MPjnsu5_09m6_MZ3KDHBfiYKu4F2pLA1I,2096
32
33
  agentscope_runtime/engine/services/context_manager.py,sha256=PaGeq_uK1DqOb75ViMGO_qP32W2vnw70uwY-FP1bubs,4058
33
34
  agentscope_runtime/engine/services/environment_manager.py,sha256=Bd3vmgX5KkN9gTY60o7Pozpsw0S8etpSJns63woSlDU,1347
34
35
  agentscope_runtime/engine/services/manager.py,sha256=r-TcHti8sEMXjZbwPWlG32J8iiMHUXuUJmAiwPvgn_Q,6282
35
- agentscope_runtime/engine/services/memory_service.py,sha256=ztVgjOOH5_udA5bygV1Zep6WxWJCmGILCofDsTUfljo,7881
36
+ agentscope_runtime/engine/services/memory_service.py,sha256=EHsvNPMXsH1B8LZY0zZKzYMvDHzaP18edKv9uimM98k,7889
37
+ agentscope_runtime/engine/services/redis_memory_service.py,sha256=2A6ouYghs80jby_MUcwiKfCScmYUbIcYsMlmEMynuqg,5708
38
+ agentscope_runtime/engine/services/redis_session_history_service.py,sha256=Zo7H0QtUZRKXh07JHcvtZfmEqbmidEsTGkhGfk1aLQE,5042
36
39
  agentscope_runtime/engine/services/sandbox_service.py,sha256=IzVg5BtDEfqFrVy7SnE3GDYXVXc0jzv9XIl0mFYHWDk,6082
37
40
  agentscope_runtime/engine/services/session_history_service.py,sha256=CLDMHNja6k7VrTQMkQDf24uP-aSGV5sdBjG5A0t_c64,8044
38
41
  agentscope_runtime/engine/tracing/__init__.py,sha256=DuM6Zp_IJ-ixgTTomtrMbpcYiMJOHMrJHwKIqcLzrfA,1133
@@ -41,7 +44,7 @@ agentscope_runtime/engine/tracing/local_logging_handler.py,sha256=LP-2NX7kRPhEN-
41
44
  agentscope_runtime/engine/tracing/tracing_metric.py,sha256=3qHqBRiTWijqBPLchxyERfPZCstTo8Y5LuL-eCuQas0,2115
42
45
  agentscope_runtime/engine/tracing/wrapper.py,sha256=ioeKSRJDJgcW34OfFmAq7vgE0FNEFXa_4QLSf7kUBfU,11236
43
46
  agentscope_runtime/sandbox/__init__.py,sha256=39NF3OdrBoUOje8gHI--cIgLMfY3ojm0JWYmGsEiWFU,378
44
- agentscope_runtime/sandbox/build.py,sha256=EethoUnT2P8k3UoS3m97VHsiZ8E-6hNTPD7ihOTAmZ0,6436
47
+ agentscope_runtime/sandbox/build.py,sha256=rhcsHbDkcQgS4Hxv8z2Lsjp3LnheQyCCTbm3rkv80Tw,6439
45
48
  agentscope_runtime/sandbox/constant.py,sha256=-CaSZkDPO2XQ70-PVymu4Z5Y7hlvdpPJ3zgP27MLvik,156
46
49
  agentscope_runtime/sandbox/enums.py,sha256=_2I1pl6sxNKYtxEwqDpJ43ZOP-Y4yWScBNbDLn5_d3A,1838
47
50
  agentscope_runtime/sandbox/mcp_server.py,sha256=UT3aRZqyeHqEhhm-wZ0Ilhew3eDMHzz9DCN6Qb-eKFk,6012
@@ -81,11 +84,10 @@ agentscope_runtime/sandbox/client/__init__.py,sha256=KiNsTToc1jICqCC1BcH762jZgHu
81
84
  agentscope_runtime/sandbox/client/http_client.py,sha256=YqITjeq4fySWSDr39DAG80NpRfD0--Ndupr7hMqL7RA,17954
82
85
  agentscope_runtime/sandbox/client/training_client.py,sha256=MYfI06MeyIelwjY4QllVL4exhSCMNpdMudGi2ctVL28,7675
83
86
  agentscope_runtime/sandbox/custom/__init__.py,sha256=wpu0DlzdLohYzOVM9yZloIWid3w_ME6dPtOjCZKbRZ8,463
84
- agentscope_runtime/sandbox/custom/custom_sandbox.py,sha256=3G0xn2654gTUJ65QvB1D-_sFtHDq5arSBJd4uuxIkpM,1023
85
- agentscope_runtime/sandbox/custom/example.py,sha256=NB4mzT7ce8m1qLkImRihCDjC2SifWLJt65F-jKZ44C0,983
87
+ agentscope_runtime/sandbox/custom/custom_sandbox.py,sha256=2-HZRUlZcvv-YZh9NrHBByKamhVowwZ_drGJSAwKM8c,971
88
+ agentscope_runtime/sandbox/custom/example.py,sha256=ycKmuUHghmPTUYfEQW0AyG5SHt1Ggf3_NlAP5Z6OZAQ,931
86
89
  agentscope_runtime/sandbox/manager/__init__.py,sha256=KNHc1uDaUWBH_ZnWjH5NHRBiQM_zDyi9B2xKVNtAWIg,98
87
- agentscope_runtime/sandbox/manager/sandbox_manager.py,sha256=IltdO0Ln3BAhB9543YT6CljdgnpGANrgHRX9LJGKb1c,23056
88
- agentscope_runtime/sandbox/manager/utils.py,sha256=c_Zicb8xnkp7UoPC9SN29m2H7mvREFbCExBM_8sU_Ug,1977
90
+ agentscope_runtime/sandbox/manager/sandbox_manager.py,sha256=LTaWUIerNb3xHfKe78j5T-CtYu2VFsp4NUicK-TQwMc,21276
89
91
  agentscope_runtime/sandbox/manager/collections/__init__.py,sha256=teQPF7huMB2yEX_CAFsmIJhQxH7ldHR7gr11W3jlx4o,582
90
92
  agentscope_runtime/sandbox/manager/collections/base_mapping.py,sha256=IIVNwvaGVAiL6XxV0LvUHx-JmDvUc19iOGyRyAccMaI,361
91
93
  agentscope_runtime/sandbox/manager/collections/base_queue.py,sha256=eCwb5eovwzSV83J_Nq3HX_4IQ8rjYw9wdeVRS5sRQHA,424
@@ -96,12 +98,13 @@ agentscope_runtime/sandbox/manager/collections/in_memory_set.py,sha256=7qek5ZB3f
96
98
  agentscope_runtime/sandbox/manager/collections/redis_mapping.py,sha256=CmI_C83gQlbnZWz3vwFe5rySXxND11JnB8-iZbNooxo,688
97
99
  agentscope_runtime/sandbox/manager/collections/redis_queue.py,sha256=4MCIDs7SgSfdngTvqxWWv2H-8XTpFQOmXG4-fxN20ew,792
98
100
  agentscope_runtime/sandbox/manager/collections/redis_set.py,sha256=eRCnMXc4hcDF2qyxFiNnrn2o4QjvtgDb6rEcblmV1o8,654
99
- agentscope_runtime/sandbox/manager/container_clients/__init__.py,sha256=GBHfhh-jxSWIT3XWDWzweMTpHsV3_-FwgH_AkXt0lsg,153
101
+ agentscope_runtime/sandbox/manager/container_clients/__init__.py,sha256=G5TTwLv_UgWUDwtwr6oohJXuGW3gAwxmgD1VhZH3zs8,225
100
102
  agentscope_runtime/sandbox/manager/container_clients/base_client.py,sha256=_uvxRh65lbMNXDcHjq01aYuNUrcxRlNzRtRIPMgWFGc,992
101
- agentscope_runtime/sandbox/manager/container_clients/docker_client.py,sha256=UF2418SULS2oiUgA8Atv13NT_fYVJMZ5JD1g8wt_yhw,5754
103
+ agentscope_runtime/sandbox/manager/container_clients/docker_client.py,sha256=fyxJNlDEPwd7aXdW_lsOSTLGjLrP_hJ0f_kvgD83aCo,13055
104
+ agentscope_runtime/sandbox/manager/container_clients/kubernetes_client.py,sha256=WBIuL9PC-sblg5UsB2CZdPEeT5F9VTSLktprpJ1YddA,19114
102
105
  agentscope_runtime/sandbox/manager/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
- agentscope_runtime/sandbox/manager/server/app.py,sha256=PKAD2oIGD1NDUogS64tJ86KkWwGXtY7aK6HsQYH4xoE,5714
104
- agentscope_runtime/sandbox/manager/server/config.py,sha256=_SSuP2uBKsiG2SOTfWuInxqxdbkZeOvm09TqQB_96pI,2078
106
+ agentscope_runtime/sandbox/manager/server/app.py,sha256=b2Yot9anNtYjommDLS8OxKUI-EPaw4DGMCiZM0C0DHE,6808
107
+ agentscope_runtime/sandbox/manager/server/config.py,sha256=rIRKI_GHmyt3Wty_ujUya_vSw_ij-rRkerqiQPG_yzU,2423
105
108
  agentscope_runtime/sandbox/manager/server/models.py,sha256=rCibF0HsotFcqsQVTSUoOTJCFQU3oqKvpOiWMWIRLyY,304
106
109
  agentscope_runtime/sandbox/manager/storage/__init__.py,sha256=jGmpfXV1E2X7AqkGeF1xu1EHiSTvbH3TSIviLbKBFh4,210
107
110
  agentscope_runtime/sandbox/manager/storage/data_storage.py,sha256=mGwf7LYbp_fRjLN9BZay6cm3eNziEdU6OlSBeFnIBMQ,475
@@ -109,13 +112,13 @@ agentscope_runtime/sandbox/manager/storage/local_storage.py,sha256=o6fkV-yUtBihh
109
112
  agentscope_runtime/sandbox/manager/storage/oss_storage.py,sha256=fIUxgOkOaH_1vlgWBnCM-e4UvD3xS_ycFe2yvSyXzBE,2970
110
113
  agentscope_runtime/sandbox/model/__init__.py,sha256=H7cAvnLdcZdMd0XYN04vbvdcrBqbygdVP3X13rWVJug,261
111
114
  agentscope_runtime/sandbox/model/api.py,sha256=Sjxw6DHkGa8Sp5dUU5kaajkHPj7eiX1EgFZk-zOPafM,400
112
- agentscope_runtime/sandbox/model/container.py,sha256=cVjzFYJO59kLi5TddA3SPpHY7qx8i9TMzw-XQIe2hJM,1683
113
- agentscope_runtime/sandbox/model/manager_config.py,sha256=PGZ7nbFmc61tcGUnAzv028pNJupXUuNAggV1HBOQ4HM,4862
115
+ agentscope_runtime/sandbox/model/container.py,sha256=w2X970bk0C7lLdpq0bk2BJzanVsEES6Btk1LdXWIp4I,1698
116
+ agentscope_runtime/sandbox/model/manager_config.py,sha256=utNDp1ALk0Z_p4Jelm5-mNpj6cn1wANncMpBgvvsqdw,5387
114
117
  agentscope_runtime/sandbox/tools/__init__.py,sha256=ioRqvKFLma8Vq0ePwOR5MekijpcHs2USNYA4Dnr-e6M,287
115
118
  agentscope_runtime/sandbox/tools/function_tool.py,sha256=mH4dq3M26pdk-XqxIm1wtsvQz5i8SXcP4Gz0-7_L7cQ,10309
116
119
  agentscope_runtime/sandbox/tools/mcp_tool.py,sha256=yaEwWLeuLVxlZhhCXVHMxZPCod1bwGHo8W_rNkgKOpI,6063
117
120
  agentscope_runtime/sandbox/tools/sandbox_tool.py,sha256=wHkgixb0dy6DexXbfXVOKUFfLL9QOI2H5oiQ2NntoWM,3067
118
- agentscope_runtime/sandbox/tools/tool.py,sha256=jCcKDnN9ZOjrr9BfoXmXrB2kXCxonDBpTzr65reWblE,3460
121
+ agentscope_runtime/sandbox/tools/tool.py,sha256=f2-14tP1V2Vgw5krr0q-uEM3lOAQUF6GdttqYdZkIdI,7361
119
122
  agentscope_runtime/sandbox/tools/utils.py,sha256=QksPQK-2DszaQsRw4Srug5hEwrf6hothf-Xp8a1056c,2098
120
123
  agentscope_runtime/sandbox/tools/base/__init__.py,sha256=Aboc1tFjgWriw4gqDrX5axpC_Bx469mcn8l8nbNdSXg,143
121
124
  agentscope_runtime/sandbox/tools/base/tool.py,sha256=5rCZ_SdDiRCZyQfdsWC1FPq7jwnSSbnKxyjQQK3PAS8,1347
@@ -123,9 +126,9 @@ agentscope_runtime/sandbox/tools/browser/__init__.py,sha256=gXQx3tXclYqAhPDrXb1-
123
126
  agentscope_runtime/sandbox/tools/browser/tool.py,sha256=EJ-uhHX9oIb4Q-hXQhTS-7VRJ-AdCRWXb9HVdOQ5JAc,19206
124
127
  agentscope_runtime/sandbox/tools/filesystem/__init__.py,sha256=AJK88YU0ceJe99H7T-on2tgaow4ujqGJ1jwv0sd1TtE,607
125
128
  agentscope_runtime/sandbox/tools/filesystem/tool.py,sha256=CPsl4TMf76BOSQtG1dqDcVdymciKhMknIG5FffoI2Eg,9847
126
- agentscope_runtime-0.1.0.dist-info/licenses/LICENSE,sha256=3MckDTgiTJ0E6cxo8FeamFVEFiwz3XJWsriuTtRJzxY,11337
127
- agentscope_runtime-0.1.0.dist-info/METADATA,sha256=zI2P01LcipD4fyzvXh3vZfsxlFJRsBLSXPVaNBTT-70,10291
128
- agentscope_runtime-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
129
- agentscope_runtime-0.1.0.dist-info/entry_points.txt,sha256=SGQZqgozJYj1yJtiyzqiJ2_iYmDvTl2lexxmXENY3wE,223
130
- agentscope_runtime-0.1.0.dist-info/top_level.txt,sha256=0YHketA7WcMmRmF-3lUzedeTOnP7iL77h-ekb-iG720,19
131
- agentscope_runtime-0.1.0.dist-info/RECORD,,
129
+ agentscope_runtime-0.1.1.dist-info/licenses/LICENSE,sha256=3MckDTgiTJ0E6cxo8FeamFVEFiwz3XJWsriuTtRJzxY,11337
130
+ agentscope_runtime-0.1.1.dist-info/METADATA,sha256=LA8SxGDgMW76fCCr-jisai6PiAgF5DI0XTC1QTEOprY,14732
131
+ agentscope_runtime-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
132
+ agentscope_runtime-0.1.1.dist-info/entry_points.txt,sha256=SGQZqgozJYj1yJtiyzqiJ2_iYmDvTl2lexxmXENY3wE,223
133
+ agentscope_runtime-0.1.1.dist-info/top_level.txt,sha256=0YHketA7WcMmRmF-3lUzedeTOnP7iL77h-ekb-iG720,19
134
+ agentscope_runtime-0.1.1.dist-info/RECORD,,
@@ -1,78 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- import socket
3
- import subprocess
4
- import logging
5
-
6
-
7
- logging.basicConfig(level=logging.INFO)
8
- logger = logging.getLogger(__name__)
9
-
10
-
11
- def is_port_available(port):
12
- """
13
- Check if a given port is available (not in use) on the local system.
14
-
15
- Args:
16
- port (int): The port number to check.
17
-
18
- Returns:
19
- bool: True if the port is available, False if it is in use.
20
- """
21
- with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
22
- try:
23
- s.bind(("", port))
24
- # Port is available
25
- return True
26
- except OSError:
27
- # Port is in use
28
- return False
29
-
30
-
31
- def sweep_port(port):
32
- """
33
- Sweep all processes found listening on a given port.
34
-
35
- Args:
36
- port (int): The port number.
37
-
38
- Returns:
39
- int: Number of processes swept (terminated).
40
- """
41
- try:
42
- # Use lsof to find the processes using the port
43
- result = subprocess.run(
44
- ["lsof", "-i", f":{port}"],
45
- capture_output=True,
46
- text=True,
47
- check=True,
48
- )
49
-
50
- # Parse the output
51
- lines = result.stdout.strip().split("\n")
52
- if len(lines) <= 1:
53
- # No process is using the port
54
- return 0
55
-
56
- # Iterate over each line (excluding the header) and kill each process
57
- killed_count = 0
58
- for line in lines[1:]:
59
- parts = line.split()
60
- if len(parts) > 1:
61
- pid = parts[1]
62
-
63
- # Kill the process using the PID
64
- subprocess.run(["kill", "-9", pid], check=False)
65
- killed_count += 1
66
-
67
- if not is_port_available(port):
68
- logger.warning(
69
- f"Port {port} is still in use after killing processes.",
70
- )
71
-
72
- return True
73
-
74
- except Exception as e:
75
- logger.error(
76
- f"An error occurred while killing processes on port {port}: {e}",
77
- )
78
- return False