agentscope-runtime 1.0.4a1__py3-none-any.whl → 1.0.5__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 (79) hide show
  1. agentscope_runtime/adapters/agentscope/stream.py +2 -8
  2. agentscope_runtime/adapters/langgraph/stream.py +120 -70
  3. agentscope_runtime/adapters/ms_agent_framework/__init__.py +0 -0
  4. agentscope_runtime/adapters/ms_agent_framework/message.py +205 -0
  5. agentscope_runtime/adapters/ms_agent_framework/stream.py +418 -0
  6. agentscope_runtime/adapters/utils.py +6 -0
  7. agentscope_runtime/cli/commands/deploy.py +836 -1
  8. agentscope_runtime/cli/commands/stop.py +16 -0
  9. agentscope_runtime/common/container_clients/__init__.py +52 -0
  10. agentscope_runtime/common/container_clients/agentrun_client.py +6 -4
  11. agentscope_runtime/common/container_clients/boxlite_client.py +442 -0
  12. agentscope_runtime/common/container_clients/docker_client.py +0 -20
  13. agentscope_runtime/common/container_clients/fc_client.py +6 -4
  14. agentscope_runtime/common/container_clients/gvisor_client.py +38 -0
  15. agentscope_runtime/common/container_clients/knative_client.py +467 -0
  16. agentscope_runtime/common/utils/deprecation.py +164 -0
  17. agentscope_runtime/engine/__init__.py +4 -0
  18. agentscope_runtime/engine/app/agent_app.py +16 -4
  19. agentscope_runtime/engine/constant.py +1 -0
  20. agentscope_runtime/engine/deployers/__init__.py +34 -11
  21. agentscope_runtime/engine/deployers/adapter/__init__.py +8 -0
  22. agentscope_runtime/engine/deployers/adapter/a2a/__init__.py +26 -51
  23. agentscope_runtime/engine/deployers/adapter/a2a/a2a_protocol_adapter.py +23 -13
  24. agentscope_runtime/engine/deployers/adapter/a2a/a2a_registry.py +4 -201
  25. agentscope_runtime/engine/deployers/adapter/a2a/nacos_a2a_registry.py +152 -25
  26. agentscope_runtime/engine/deployers/adapter/agui/__init__.py +8 -0
  27. agentscope_runtime/engine/deployers/adapter/agui/agui_adapter_utils.py +652 -0
  28. agentscope_runtime/engine/deployers/adapter/agui/agui_protocol_adapter.py +225 -0
  29. agentscope_runtime/engine/deployers/agentrun_deployer.py +2 -2
  30. agentscope_runtime/engine/deployers/fc_deployer.py +1506 -0
  31. agentscope_runtime/engine/deployers/knative_deployer.py +290 -0
  32. agentscope_runtime/engine/deployers/pai_deployer.py +2335 -0
  33. agentscope_runtime/engine/deployers/utils/net_utils.py +37 -0
  34. agentscope_runtime/engine/deployers/utils/oss_utils.py +38 -0
  35. agentscope_runtime/engine/deployers/utils/package.py +46 -42
  36. agentscope_runtime/engine/helpers/agent_api_client.py +372 -0
  37. agentscope_runtime/engine/runner.py +13 -0
  38. agentscope_runtime/engine/schemas/agent_schemas.py +9 -3
  39. agentscope_runtime/engine/services/agent_state/__init__.py +7 -0
  40. agentscope_runtime/engine/services/memory/__init__.py +7 -0
  41. agentscope_runtime/engine/services/memory/redis_memory_service.py +15 -16
  42. agentscope_runtime/engine/services/session_history/__init__.py +7 -0
  43. agentscope_runtime/engine/tracing/local_logging_handler.py +2 -3
  44. agentscope_runtime/engine/tracing/wrapper.py +18 -4
  45. agentscope_runtime/sandbox/__init__.py +14 -6
  46. agentscope_runtime/sandbox/box/base/__init__.py +2 -2
  47. agentscope_runtime/sandbox/box/base/base_sandbox.py +51 -1
  48. agentscope_runtime/sandbox/box/browser/__init__.py +2 -2
  49. agentscope_runtime/sandbox/box/browser/browser_sandbox.py +198 -2
  50. agentscope_runtime/sandbox/box/filesystem/__init__.py +2 -2
  51. agentscope_runtime/sandbox/box/filesystem/filesystem_sandbox.py +99 -2
  52. agentscope_runtime/sandbox/box/gui/__init__.py +2 -2
  53. agentscope_runtime/sandbox/box/gui/gui_sandbox.py +117 -1
  54. agentscope_runtime/sandbox/box/mobile/__init__.py +2 -2
  55. agentscope_runtime/sandbox/box/mobile/mobile_sandbox.py +247 -100
  56. agentscope_runtime/sandbox/box/sandbox.py +102 -65
  57. agentscope_runtime/sandbox/box/shared/routers/generic.py +36 -29
  58. agentscope_runtime/sandbox/client/__init__.py +6 -1
  59. agentscope_runtime/sandbox/client/async_http_client.py +339 -0
  60. agentscope_runtime/sandbox/client/base.py +74 -0
  61. agentscope_runtime/sandbox/client/http_client.py +108 -329
  62. agentscope_runtime/sandbox/enums.py +7 -0
  63. agentscope_runtime/sandbox/manager/sandbox_manager.py +275 -29
  64. agentscope_runtime/sandbox/manager/server/app.py +7 -1
  65. agentscope_runtime/sandbox/manager/server/config.py +3 -1
  66. agentscope_runtime/sandbox/model/manager_config.py +11 -9
  67. agentscope_runtime/tools/modelstudio_memory/__init__.py +106 -0
  68. agentscope_runtime/tools/modelstudio_memory/base.py +220 -0
  69. agentscope_runtime/tools/modelstudio_memory/config.py +86 -0
  70. agentscope_runtime/tools/modelstudio_memory/core.py +594 -0
  71. agentscope_runtime/tools/modelstudio_memory/exceptions.py +60 -0
  72. agentscope_runtime/tools/modelstudio_memory/schemas.py +253 -0
  73. agentscope_runtime/version.py +1 -1
  74. {agentscope_runtime-1.0.4a1.dist-info → agentscope_runtime-1.0.5.dist-info}/METADATA +186 -73
  75. {agentscope_runtime-1.0.4a1.dist-info → agentscope_runtime-1.0.5.dist-info}/RECORD +79 -55
  76. {agentscope_runtime-1.0.4a1.dist-info → agentscope_runtime-1.0.5.dist-info}/WHEEL +0 -0
  77. {agentscope_runtime-1.0.4a1.dist-info → agentscope_runtime-1.0.5.dist-info}/entry_points.txt +0 -0
  78. {agentscope_runtime-1.0.4a1.dist-info → agentscope_runtime-1.0.5.dist-info}/licenses/LICENSE +0 -0
  79. {agentscope_runtime-1.0.4a1.dist-info → agentscope_runtime-1.0.5.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentscope-runtime
3
- Version: 1.0.4a1
3
+ Version: 1.0.5
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
@@ -28,6 +28,7 @@ Requires-Dist: jsonref
28
28
  Requires-Dist: asgiref
29
29
  Requires-Dist: click>=8.0.0
30
30
  Requires-Dist: rich>=13.0.0
31
+ Requires-Dist: ag-ui-protocol>=0.1.10
31
32
  Provides-Extra: dev
32
33
  Requires-Dist: pytest>=8.3.5; extra == "dev"
33
34
  Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
@@ -67,13 +68,18 @@ Requires-Dist: alibabacloud-credentials; extra == "ext"
67
68
  Requires-Dist: PyYAML; extra == "ext"
68
69
  Requires-Dist: agno>=2.3.8; extra == "ext"
69
70
  Requires-Dist: nacos-sdk-python>=3.0.0; extra == "ext"
71
+ Requires-Dist: agent-framework<1.0.0b260114,>=1.0.0b251120; extra == "ext"
72
+ Requires-Dist: boxlite>=0.5.2; extra == "ext"
73
+ Requires-Dist: alibabacloud-eas20210701<8.0.0,>=7.0.0; extra == "ext"
74
+ Requires-Dist: alibabacloud-aiworkspace20210204<8.0.0,>=7.0.0; extra == "ext"
70
75
  Dynamic: license-file
71
76
 
72
77
  <div align="center">
73
78
 
74
- # AgentScope Runtime v1.0
79
+ # AgentScope Runtime: A Production-grade Runtime for Agent Applications
75
80
 
76
81
  [![GitHub Repo](https://img.shields.io/badge/GitHub-Repo-black.svg?logo=github)](https://github.com/agentscope-ai/agentscope-runtime)
82
+ [![WebUI](https://img.shields.io/badge/Try_WebUI-Online-green.svg?logo=googlechrome)](http://webui.runtime.agentscope.io/)
77
83
  [![PyPI](https://img.shields.io/pypi/v/agentscope-runtime?label=PyPI&color=brightgreen&logo=python)](https://pypi.org/project/agentscope-runtime/)
78
84
  [![Downloads](https://static.pepy.tech/badge/agentscope-runtime)](https://pepy.tech/project/agentscope-runtime)
79
85
  [![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg?logo=python&label=Python)](https://python.org)
@@ -91,33 +97,75 @@ Dynamic: license-file
91
97
  [![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)
92
98
 
93
99
  [[Cookbook]](https://runtime.agentscope.io/)
100
+ [[Try WebUI]](http://webui.runtime.agentscope.io/)
94
101
  [[中文README]](README_zh.md)
95
102
  [[Samples]](https://github.com/agentscope-ai/agentscope-samples)
96
103
 
97
- **A Production-Ready Runtime Framework for Intelligent Agent Applications**
104
+ > **Core capabilities:**
105
+ >
106
+ > **Tool Sandboxing** — tool call runs inside a **hardened sandbox**
107
+ >
108
+ > **Agent-as-a-Service (AaaS) APIs** — expose agents as **streaming, production-ready APIs**
109
+ >
110
+ > **Scalable Deployment** — deploy locally, on Kubernetes, or serverless for **elastic scale**
111
+ >
112
+ > <details>
113
+ > <summary><b>Plus</b></summary>
114
+ >
115
+ > <br>
116
+ >
117
+ > **Full-stack observability** (logs / traces)
118
+ >
119
+ > **Framework compatibility** with mainstream agent frameworks
120
+ >
121
+ > </details>
122
+
123
+ </div>
98
124
 
99
- ***AgentScope Runtime** is a full-stack agent runtime that tackles two core challenges: **efficient agent deployment** and **secure sandbox execution**. It ships with foundational services such as short- and long-term memory plus agent state persistence, along with hardened sandbox infrastructure. Whether you need to orchestrate production-grade agents or guarantee safe tool interactions, AgentScope Runtime provides developer-friendly workflows with complete observability.*
125
+ ---
100
126
 
101
- *In V1.0, these services are exposed via an **adapter pattern**, enabling seamless integration with the native modules of different agent frameworks while preserving their native interfaces and behaviors, ensuring both compatibility and flexibility.*
127
+ ## Table of Contents
102
128
 
103
- </div>
129
+ > [!NOTE]
130
+ >
131
+ > **Recommended reading order:**
132
+ >
133
+ > - **I want to run an agent app in 5 minutes**: Quick Start (Agent App example) → verify with curl (SSE streaming)
134
+ > - **I care about secure tool execution / automation**: Quick Start (Sandbox examples) → sandbox image registry/namespace/tag configuration → (optional) production-grade serverless sandbox deployment
135
+ > - **I want production deployment / expose APIs**: Quick Start (Agent App example) → Quick Start (Deployment example) → Guides
136
+ > - **I want to contribute**: Contributing → Contact
137
+
138
+ - [News](#-news)
139
+ - [Key Features](#-key-features)
140
+ - [Quick Start](#-quick-start): From installation to running a minimal Agent API service. Learn the three-stage `AgentApp` development pattern: `init` / `query` / `shutdown`.
141
+ - [Prerequisites](#prerequisites): Required runtime environment and dependencies
142
+ - [Installation](#installation): Install from PyPI or from source
143
+ - [Agent App Example](#agent-app-example): How to build a streaming (SSE) Agent-as-a-Service API
144
+ - [Sandbox Example](#sandbox-example): How to safely execute Python/Shell/GUI/Browser/Filesystem/Mobile tools in an isolated sandbox
145
+ - [Deployment Example](#deployment-example): Learn to deploy with `DeployManager` locally or in a serverless environment, and access the service via A2A, Response API, or the OpenAI SDK in compatible mode
146
+ - [Guides](#-guides): A tutorial site covering AgentScope Runtime concepts, architecture, APIs, and sample projects—helping you move from “it runs” to “scalable and maintainable”.
147
+ - [Contact](#-contact)
148
+ - [Contributing](#-contributing)
149
+ - [License](#-license)
150
+ - [Contributors](#-contributors)
104
151
 
105
152
  ---
106
153
 
107
154
  ## 🆕 NEWS
108
155
 
156
+ * **[2026-01]** Added **asynchronous sandbox** implementations (`BaseSandboxAsync`, `GuiSandboxAsync`, `BrowserSandboxAsync`, `FilesystemSandboxAsync`, `MobileSandboxAsync`) enabling non-blocking, concurrent tool execution in async program. Improved `run_ipython_cell` and `run_shell_command` methods with enhanced **concurrency and parallel execution** capabilities for more efficient sandbox operations.
109
157
  * **[2025-12]** We have released **AgentScope Runtime v1.0**, introducing a unified “Agent as API” white-box development experience, with enhanced multi-agent collaboration, state persistence, and cross-framework integration. This release also streamlines abstractions and modules to ensure consistency between development and production environments. Please refer to the **[CHANGELOG](https://runtime.agentscope.io/en/CHANGELOG.html)** for full update details and migration guide.
110
158
 
111
159
  ---
112
160
 
113
161
  ## ✨ Key Features
114
162
 
115
- - **🏗️ Deployment Infrastructure**: Built-in services for agent state management, conversation history, long-term memory, and sandbox lifecycle control
116
- - **🔧 Framework-Agnostic**: Not tied to any specific agent framework; seamlessly integrates with popular open-source and custom implementations
117
- - **Developer-Friendly**: Offers `AgentApp` for easy deployment with powerful customization options
118
- - **📊 Observability**: Comprehensive tracking and monitoring of runtime operations
119
- - **🔒 Sandboxed Tool Execution**: Isolated sandbox ensures safe tool execution without affecting the system
120
- - **🛠️ Out-of-the-Box Tools & One-Click Adaptation**: Rich set of ready-to-use tools, with adapters enabling quick integration into different frameworks
163
+ - **Deployment Infrastructure**: Built-in services for agent state management, conversation history, long-term memory, and sandbox lifecycle control
164
+ - **Framework-Agnostic**: Not tied to any specific agent framework; seamlessly integrates with popular open-source and custom implementations
165
+ - **Developer-Friendly**: Offers `AgentApp` for easy deployment with powerful customization options
166
+ - **Observability**: Comprehensive tracking and monitoring of runtime operations
167
+ - **Sandboxed Tool Execution**: Isolated sandbox ensures safe tool execution without affecting the system
168
+ - **Out-of-the-Box Tools & One-Click Adaptation**: Rich set of ready-to-use tools, with adapters enabling quick integration into different frameworks
121
169
 
122
170
  > [!NOTE]
123
171
  >
@@ -125,31 +173,11 @@ Dynamic: license-file
125
173
  >
126
174
  > | Framework/Feature | Message/Event | Tool | Service |
127
175
  > | ------------------------------------------------------------ | ------------- | ---- | ------- |
128
- > | AgentScope | ✅ | ✅ | ✅ |
176
+ > | [AgentScope](https://runtime.agentscope.io/en/quickstart.html) | ✅ | ✅ | ✅ |
129
177
  > | [LangGraph](https://runtime.agentscope.io/en/langgraph_guidelines.html) | ✅ | 🚧 | 🚧 |
130
- > | AutoGen | 🚧 | ✅ | 🚧 |
131
- > | Microsoft Agent Framework | 🚧 | 🚧 | 🚧 |
178
+ > | [Microsoft Agent Framework](https://runtime.agentscope.io/en/ms_agent_framework_guidelines.html) | | ✅ | 🚧 |
132
179
  > | [Agno](https://runtime.agentscope.io/en/agno_guidelines.html) | ✅ | ✅ | 🚧 |
133
-
134
- ---
135
-
136
- ## 💬 Contact
137
-
138
- Welcome to join our community on
139
-
140
- | [Discord](https://discord.gg/eYMpfnkG8h) | DingTalk |
141
- | ------------------------------------------------------------ | ------------------------------------------------------------ |
142
- | <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="https://img.alicdn.com/imgextra/i4/O1CN014mhqFq1ZlgNuYjxrz_!!6000000003235-2-tps-400-400.png" width="100" height="100"> |
143
-
144
- ---
145
-
146
- ## 📋 Table of Contents
147
-
148
- - [🚀 Quick Start](#-quick-start)
149
- - [📚 Cookbook](#-cookbook)
150
- - [🏗️ Deployment](#️-deployment)
151
- - [🤝 Contributing](#-contributing)
152
- - [📄 License](#-license)
180
+ > | AutoGen | 🚧 | ✅ | 🚧 |
153
181
 
154
182
  ---
155
183
 
@@ -329,15 +357,29 @@ These examples demonstrate how to create sandboxed environments and execute tool
329
357
 
330
358
  > [!NOTE]
331
359
  >
332
- > 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.
360
+ > If you want to run the sandbox locally, the current version supports **Docker (optionally with gVisor)** or **[BoxLite](https://github.com/boxlite-ai/boxlite)** as the backend, and you can switch the backend by setting the environment variable `CONTAINER_DEPLOYMENT` (supported values include `docker` / `gvisor` / `boxlite` etc.; default: `docker`).
333
361
  >
334
- > If you plan to use the sandbox on a large scale in production, we recommend deploying it directly in Alibaba Cloud for managed hosting: [One-click deploy sandbox on Alibaba Cloud](https://computenest.console.aliyun.com/service/instance/create/default?ServiceName=AgentScope%20Runtime%20%E6%B2%99%E7%AE%B1%E7%8E%AF%E5%A2%83)
362
+ > For large-scale remote/production deployments, we recommend using **Kubernetes (K8s)**, **Function Compute (FC)**, or [**Alibaba Cloud Container Service for Kubernetes (ACK)**](https://computenest.console.aliyun.com/service/instance/create/default?ServiceName=AgentScope%20Runtime%20%E6%B2%99%E7%AE%B1%E7%8E%AF%E5%A2%83) as the backend. Please refer to [this tutorial](https://runtime.agentscope.io/en/sandbox/advanced.html) for more details.
363
+
364
+ > [!TIP]
365
+ > AgentScope Runtime provides **both synchronous** and **asynchronous** versions for each sandbox type
366
+
367
+ | Synchronous Class | Asynchronous Class |
368
+ | ------------------- | ------------------------ |
369
+ | `BaseSandbox` | `BaseSandboxAsync` |
370
+ | `GuiSandbox` | `GuiSandboxAsync` |
371
+ | `FilesystemSandbox` | `FilesystemSandboxAsync` |
372
+ | `BrowserSandbox` | `BrowserSandboxAsync` |
373
+ | `MobileSandbox` | `MobileSandboxAsync` |
374
+ | `TrainingSandbox` | - |
375
+ | `AgentbaySandbox` | - |
335
376
 
336
377
  #### Base Sandbox
337
378
 
338
379
  Use for running **Python code** or **shell commands** in an isolated environment.
339
380
 
340
381
  ```python
382
+ # --- Synchronous version ---
341
383
  from agentscope_runtime.sandbox import BaseSandbox
342
384
 
343
385
  with BaseSandbox() as box:
@@ -346,6 +388,16 @@ with BaseSandbox() as box:
346
388
  print(box.run_ipython_cell(code="print('hi')")) # Run Python code
347
389
  print(box.run_shell_command(command="echo hello")) # Run shell command
348
390
  input("Press Enter to continue...")
391
+
392
+ # --- Asynchronous version ---
393
+ from agentscope_runtime.sandbox import BaseSandboxAsync
394
+
395
+ async with BaseSandboxAsync() as box:
396
+ # Default image is `agentscope/runtime-sandbox-base:latest`
397
+ print(await box.list_tools()) # List all available tools
398
+ print(await box.run_ipython_cell(code="print('hi')")) # Run Python code
399
+ print(await box.run_shell_command(command="echo hello")) # Run shell command
400
+ input("Press Enter to continue...")
349
401
  ```
350
402
 
351
403
  #### GUI Sandbox
@@ -355,14 +407,26 @@ Provides a **virtual desktop** environment for mouse, keyboard, and screen opera
355
407
  <img src="https://img.alicdn.com/imgextra/i2/O1CN01df5SaM1xKFQP4KGBW_!!6000000006424-2-tps-2958-1802.png" alt="GUI Sandbox" width="800" height="500">
356
408
 
357
409
  ```python
410
+ # --- Synchronous version ---
358
411
  from agentscope_runtime.sandbox import GuiSandbox
359
412
 
360
413
  with GuiSandbox() as box:
361
414
  # By default, pulls `agentscope/runtime-sandbox-gui:latest` from DockerHub
362
- print(box.list_tools()) # List all available tools
415
+ print(box.list_tools()) # List all available tools
363
416
  print(box.desktop_url) # Web desktop access URL
364
417
  print(box.computer_use(action="get_cursor_position")) # Get mouse cursor position
365
- print(box.computer_use(action="get_screenshot")) # Capture screenshot
418
+ print(box.computer_use(action="get_screenshot")) # Capture screenshot
419
+ input("Press Enter to continue...")
420
+
421
+ # --- Asynchronous version ---
422
+ from agentscope_runtime.sandbox import GuiSandboxAsync
423
+
424
+ async with GuiSandboxAsync() as box:
425
+ # Default image is `agentscope/runtime-sandbox-gui:latest`
426
+ print(await box.list_tools()) # List all available tools
427
+ print(box.desktop_url) # Web desktop access URL
428
+ print(await box.computer_use(action="get_cursor_position")) # Get mouse cursor position
429
+ print(await box.computer_use(action="get_screenshot")) # Capture screenshot
366
430
  input("Press Enter to continue...")
367
431
  ```
368
432
 
@@ -373,14 +437,25 @@ A GUI-based sandbox with **browser operations** inside an isolated sandbox.
373
437
  <img src="https://img.alicdn.com/imgextra/i4/O1CN01OIq1dD1gAJMcm0RFR_!!6000000004101-2-tps-2734-1684.png" alt="GUI Sandbox" width="800" height="500">
374
438
 
375
439
  ```python
440
+ # --- Synchronous version ---
376
441
  from agentscope_runtime.sandbox import BrowserSandbox
377
442
 
378
443
  with BrowserSandbox() as box:
379
444
  # By default, pulls `agentscope/runtime-sandbox-browser:latest` from DockerHub
380
- print(box.list_tools()) # List all available tools
445
+ print(box.list_tools()) # List all available tools
381
446
  print(box.desktop_url) # Web desktop access URL
382
447
  box.browser_navigate("https://www.google.com/") # Open a webpage
383
448
  input("Press Enter to continue...")
449
+
450
+ # --- Asynchronous version ---
451
+ from agentscope_runtime.sandbox import BrowserSandboxAsync
452
+
453
+ async with BrowserSandboxAsync() as box:
454
+ # Default image is `agentscope/runtime-sandbox-browser:latest`
455
+ print(await box.list_tools()) # List all available tools
456
+ print(box.desktop_url) # Web desktop access URL
457
+ await box.browser_navigate("https://www.google.com/") # Open a webpage
458
+ input("Press Enter to continue...")
384
459
  ```
385
460
 
386
461
  #### Filesystem Sandbox
@@ -390,14 +465,25 @@ A GUI-based sandbox with **file system operations** such as creating, reading, a
390
465
  <img src="https://img.alicdn.com/imgextra/i3/O1CN01VocM961vK85gWbJIy_!!6000000006153-2-tps-2730-1686.png" alt="GUI Sandbox" width="800" height="500">
391
466
 
392
467
  ```python
468
+ # --- Synchronous version ---
393
469
  from agentscope_runtime.sandbox import FilesystemSandbox
394
470
 
395
471
  with FilesystemSandbox() as box:
396
472
  # By default, pulls `agentscope/runtime-sandbox-filesystem:latest` from DockerHub
397
- print(box.list_tools()) # List all available tools
473
+ print(box.list_tools()) # List all available tools
398
474
  print(box.desktop_url) # Web desktop access URL
399
475
  box.create_directory("test") # Create a directory
400
476
  input("Press Enter to continue...")
477
+
478
+ # --- Asynchronous version ---
479
+ from agentscope_runtime.sandbox import FilesystemSandboxAsync
480
+
481
+ async with FilesystemSandboxAsync() as box:
482
+ # Default image is `agentscope/runtime-sandbox-filesystem:latest`
483
+ print(await box.list_tools()) # List all available tools
484
+ print(box.desktop_url) # Web desktop access URL
485
+ await box.create_directory("test") # Create a directory
486
+ input("Press Enter to continue...")
401
487
  ```
402
488
 
403
489
  #### Mobile Sandbox
@@ -421,16 +507,32 @@ Provides a **sandboxed Android emulator environment** that allows executing vari
421
507
  - **Architecture Compatibility**:
422
508
  When running on an ARM64/aarch64 architecture (e.g., Apple M-series chips), you may encounter compatibility or performance issues. It is recommended to run on an x86_64 host.
423
509
  ```python
510
+ # --- Synchronous version ---
424
511
  from agentscope_runtime.sandbox import MobileSandbox
425
512
 
426
513
  with MobileSandbox() as box:
427
514
  # By default, pulls 'agentscope/runtime-sandbox-mobile:latest' from DockerHub
428
- print(box.list_tools()) # List all available tools
429
- print(box.mobile_get_screen_resolution()) # Get the screen resolution
430
- print(box.mobile_tap([500, 1000])) # Tap at coordinate (500, 1000)
431
- print(box.mobile_input_text("Hello from AgentScope!")) # Input text
432
- print(box.mobile_key_event(3)) # Sends a HOME key event (KeyCode: 3)
433
- screenshot_result = box.mobile_get_screenshot() # Get the current screenshot
515
+ print(box.list_tools()) # List all available tools
516
+ print(box.mobile_get_screen_resolution()) # Get the screen resolution
517
+ print(box.mobile_tap([500, 1000])) # Tap at coordinate (500, 1000)
518
+ print(box.mobile_input_text("Hello from AgentScope!")) # Input text
519
+ print(box.mobile_key_event(3)) # HOME key event
520
+ screenshot_result = box.mobile_get_screenshot() # Get screenshot
521
+ print(screenshot_result)
522
+ input("Press Enter to continue...")
523
+
524
+ # --- Asynchronous version ---
525
+ from agentscope_runtime.sandbox import MobileSandboxAsync
526
+
527
+ async with MobileSandboxAsync() as box:
528
+ # Default image is 'agentscope/runtime-sandbox-mobile:latest'
529
+ print(await box.list_tools()) # List all available tools
530
+ print(await box.mobile_get_screen_resolution()) # Get the screen resolution
531
+ print(await box.mobile_tap([500, 1000])) # Tap at coordinate (500, 1000)
532
+ print(await box.mobile_input_text("Hello from AgentScope!")) # Input text
533
+ print(await box.mobile_key_event(3)) # HOME key event
534
+ screenshot_result = await box.mobile_get_screenshot() # Get screenshot
535
+ print(screenshot_result)
434
536
  input("Press Enter to continue...")
435
537
  ```
436
538
 
@@ -501,15 +603,11 @@ Example:
501
603
  agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/runtime-sandbox-base:preview
502
604
  ```
503
605
 
504
- ---
505
-
506
606
  #### Serverless Sandbox Deployment
507
607
 
508
- AgentScope Runtime also supports serverless deployment, which is suitable for running sandboxes in a serverless environment,
509
- [Alibaba Cloud Function Compute (FC)](https://help.aliyun.com/zh/functioncompute/fc/) or [Alibaba Cloud AgentRun](https://docs.agent.run/).
608
+ AgentScope Runtime also supports serverless deployment, which is suitable for running sandboxes in a serverless environment, e.g. [Alibaba Cloud Function Compute (FC)](https://help.aliyun.com/zh/functioncompute/fc/).
510
609
 
511
- First, please refer to the [documentation](https://runtime.agentscope.io/en/sandbox/advanced.html#optional-function-compute-fc-settings) to configure the serverless environment variables.
512
- Make `CONTAINER_DEPLOYMENT` to `fc` or `agentrun` to enable serverless deployment.
610
+ First, please refer to the [documentation](https://runtime.agentscope.io/en/sandbox/advanced.html#optional-function-compute-fc-settings) to configure the serverless environment variables. Make `CONTAINER_DEPLOYMENT` to `fc` to enable serverless deployment.
513
611
 
514
612
  Then, start a sandbox server, use the `--config` option to specify a serverless environment setup:
515
613
 
@@ -519,17 +617,7 @@ runtime-sandbox-server --config fc.env
519
617
  ```
520
618
  After the server starts, you can access the sandbox server at baseurl `http://localhost:8000` and invoke sandbox tools described above.
521
619
 
522
- ## 📚 Cookbook
523
-
524
- - **[📖 Cookbook](https://runtime.agentscope.io/en/intro.html)**: Comprehensive tutorials
525
- - **[💡 Concept](https://runtime.agentscope.io/en/concept.html)**: Core concepts and architecture overview
526
- - **[🚀 Quick Start](https://runtime.agentscope.io/en/quickstart.html)**: Quick start tutorial
527
- - **[🏠 Demo House](https://runtime.agentscope.io/en/demohouse.html)**: Rich example projects
528
- - **[📋 API Reference](https://runtime.agentscope.io/en/api/index.html)**: Complete API documentation
529
-
530
- ---
531
-
532
- ## 🏗️ Deployment
620
+ ### Deployment Example
533
621
 
534
622
  The `AgentApp` exposes a `deploy` method that takes a `DeployManager` instance and deploys the agent.
535
623
 
@@ -538,7 +626,7 @@ The `AgentApp` exposes a `deploy` method that takes a `DeployManager` instance a
538
626
 
539
627
  * The deployer will automatically add common agent protocols, such as **A2A**, **Response API**.
540
628
 
541
- After deployment, users can access the service at `http://localhost:8090/process:
629
+ After deployment, users can access the service at http://localhost:8090/process:
542
630
 
543
631
  ```python
544
632
  from agentscope_runtime.engine.deployers import LocalDeployManager
@@ -550,8 +638,10 @@ deployer = LocalDeployManager(
550
638
  )
551
639
 
552
640
  # Deploy the app as a streaming service
553
- deploy_result = await app.deploy(deployer=deployer)
554
-
641
+ deploy_result = await app.deploy(
642
+ deployer=deployer,
643
+ endpoint_path="/process"
644
+ )
555
645
  ```
556
646
 
557
647
  After deployment, users can also access this service using the Response API of the OpenAI SDK:
@@ -569,12 +659,16 @@ response = client.responses.create(
569
659
  print(response)
570
660
  ```
571
661
 
572
- Besides, `DeployManager` also supports serverless deployments, such as deploying your agent app
573
- to [ModelStudio](https://bailian.console.aliyun.com/?admin=1&tab=doc#/doc/?type=app&url=2983030)
574
- or [AgentRun](https://docs.agent.run/).
662
+ Besides, `DeployManager` also supports serverless deployments, such as deploying your agent app to [ModelStudio](https://bailian.console.aliyun.com/?admin=1&tab=doc#/doc/?type=app&url=2983030).
575
663
 
576
664
  ```python
577
- from agentscope_runtime.engine.deployers import ModelStudioDeployManager
665
+ import os
666
+ from agentscope_runtime.engine.deployers.modelstudio_deployer import (
667
+ ModelstudioDeployManager,
668
+ OSSConfig,
669
+ ModelstudioConfig,
670
+ )
671
+
578
672
  # Create deployment manager
579
673
  deployer = ModelstudioDeployManager(
580
674
  oss_config=OSSConfig(
@@ -606,6 +700,22 @@ For more advanced serverless deployment guides, please refer to the [documentati
606
700
 
607
701
  ---
608
702
 
703
+ ## 📚 Guides
704
+
705
+ For a more detailed tutorial, please refer to: [![Cookbook](https://img.shields.io/badge/📚_Cookbook-English|中文-teal.svg)](https://runtime.agentscope.io)
706
+
707
+ ---
708
+
709
+ ## 💬 Contact
710
+
711
+ Welcome to join our community on
712
+
713
+ | [Discord](https://discord.gg/eYMpfnkG8h) | DingTalk |
714
+ | ------------------------------------------------------------ | ------------------------------------------------------------ |
715
+ | <img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="100" height="100"> | <img src="https://img.alicdn.com/imgextra/i4/O1CN014mhqFq1ZlgNuYjxrz_!!6000000003235-2-tps-400-400.png" width="100" height="100"> |
716
+
717
+ ---
718
+
609
719
  ## 🤝 Contributing
610
720
 
611
721
  We welcome contributions from the community! Here's how you can help:
@@ -651,9 +761,9 @@ See the License for the specific language governing permissions and
651
761
  limitations under the License.
652
762
  ```
653
763
 
654
- ## Contributors
764
+ ## Contributors
655
765
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
656
- [![All Contributors](https://img.shields.io/badge/all_contributors-29-orange.svg?style=flat-square)](#contributors-)
766
+ [![All Contributors](https://img.shields.io/badge/all_contributors-32-orange.svg?style=flat-square)](#contributors-)
657
767
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
658
768
 
659
769
  Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/emoji-key/)):
@@ -701,6 +811,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/e
701
811
  </tr>
702
812
  <tr>
703
813
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/RTsama"><img src="https://avatars.githubusercontent.com/u/100779257?v=4?s=100" width="100px;" alt="RTsama"/><br /><sub><b>RTsama</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/issues?q=author%3ARTsama" title="Bug reports">🐛</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=RTsama" title="Code">💻</a></td>
814
+ <td align="center" valign="top" width="14.28%"><a href="https://allenli178.top"><img src="https://avatars.githubusercontent.com/u/53218750?v=4?s=100" width="100px;" alt="YuYan"/><br /><sub><b>YuYan</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=allenli178" title="Documentation">📖</a></td>
815
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/rlp2006"><img src="https://avatars.githubusercontent.com/u/212365247?v=4?s=100" width="100px;" alt="Li Peng (Yuan Yi)"/><br /><sub><b>Li Peng (Yuan Yi)</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=rlp2006" title="Code">💻</a> <a href="https://github.com/agentscope-ai/agentscope-runtime/commits?author=rlp2006" title="Documentation">📖</a> <a href="#example-rlp2006" title="Examples">💡</a></td>
816
+ <td align="center" valign="top" width="14.28%"><a href="http://dorianzheng.github.io"><img src="https://avatars.githubusercontent.com/u/8065637?v=4?s=100" width="100px;" alt="dorianzheng"/><br /><sub><b>dorianzheng</b></sub></a><br /><a href="https://github.com/agentscope-ai/agentscope-runtime/pulls?q=is%3Apr+reviewed-by%3ADorianZheng" title="Reviewed Pull Requests">👀</a> <a href="#platform-DorianZheng" title="Packaging/porting to new platform">📦</a></td>
704
817
  </tr>
705
818
  </tbody>
706
819
  <tfoot>