Use Sandbox Agent & Skills (Public Preview)
Sandbox Agent & Skills provides built-in enhanced capabilities for the AgentRun Sandbox. When enabled, the sandbox automatically mounts a built-in Agent and a set of out-of-the-box Skills—no custom toolchain development required. The built-in Agent handles task routing and orchestration. It exposes its capabilities to external Agents through the MCP protocol and supports tasks such as code writing and execution, web browsing, Office document processing, and file operations.
This process involves model calls. It is free during the public preview period.
Scenarios
Pain point | Solution with Sandbox Agent & Skills |
Long context in the main Agent degrades inference quality. | Offload independent subtasks to the sandbox. The main Agent receives only the results. |
Teams repeatedly develop document and browser Skills for each project. | Pre-installed Skills for common formats such as DOCX, PDF, and PPTX are ready to use. |
Skills scripts pollute the main Agent’s runtime environment. | Skills run in an isolated sandbox and are fully separated from the main Agent. |
Malicious prompts or executable scripts could compromise the main environment. | The sandbox provides an isolation boundary to avoid security risks. |
Typical use cases:
Instruct the Agent to read and summarize a PDF contract and then generate a revised Word version.
Instruct the Agent to scrape competitor web pages and populate a workbook.
Offload heavy tasks, such as document processing and code execution, to the sandbox. This allows the main Agent to focus on business logic.
Prerequisites
You have activated the AgentRun service and completed account authorization. If you use a RAM role, ensure that it has permissions for Function Compute and AgentRun.
You are using the new console interface (after logging in, select Try the new console).
Procedure
Step 1: Create a sandbox with Agent & Skills enabled
Log on to the AgentRun console. In the navigation pane on the left, click .
Click Create Sandbox Template. In the dialog box, select a sandbox type.
Note: Agent & Skills supports the Code Interpreter Sandbox, the Browser Sandbox, and the AIO Sandbox. The AIO Sandbox integrates both code interpreter and browser environments. Because it handles both code execution and web operations, it is the recommended option.
On the Create Sandbox page, configure the following settings:
Configuration item
Description
Name
Letters and numbers only. No Chinese characters.
Resource configuration
Select CPU and memory based on your workload. Default: 2 vCPUs and 4 GB for Code Interpreter Sandbox; 4 vCPUs and 8 GB for Browser and AIO Sandboxes.
Runtime environment
Default runtime (recommended): Preconfigured multi-language environment—ready to use. Or choose Custom runtime to use a container image.
Browser type
Chromium (default). Required only for Browser and AIO Sandboxes.
Resolution
1280×1024 (default).
Execution role
Grants Function Compute permission to access other Alibaba Cloud services. For example, to access OSS, attach the AliyunOSSFullAccess policy.
Credential configuration
Select an existing credential or use anonymous access.
In the Agent and Skills section, turn on Enable Agent and Skills.
Code Interpreter Sandbox: Includes a Coding Agent optimized for code generation, code refactoring and improvements, and code review.
Browser Sandbox / AIO Sandbox: Includes an Agent that handles web browsing, browser automation, Office document processing (Word, PDF, PowerPoint), and file operations.
Expand Advanced Configuration as needed, and then click Create Sandbox.
Step 2: Start the MCP service and get the endpoint
After the sandbox is created, click Details in the bottom-right corner of the sandbox card on the sandbox list page.
On the sandbox details page, click the Integration & Examples tab.
In the MCP Integration section, click Start Service.
After the service starts, the page displays MCP service started and the following information:
Item
Content
Protocol
Streamable HTTP
Service endpoint
https://<account ID>.agentrun-data.<region>.aliyuncs.com/templates/<sandbox name>/mcpSupported tools
Built-in tools for browser automation, file system operations, and Office document processing.
Click the Configure MCP Server subtab. Copy the standard MCP configuration example:
{ "mcpServers": { "<sandbox name>": { "url": "https://<account ID>.agentrun-data.<region>.aliyuncs.com/templates/<sandbox name>/mcp" } } }
Step 3: Call the sandbox from your Agent using MCP
Configure the MCP service endpoint in your Agent or orchestration tool. Your Agent can then call all built-in sandbox tools through the MCP protocol.
You can use any client that is compatible with the MCP Streamable HTTP protocol:
DeepChat: An open-source AI chat client with visual MCP server configuration. Download: github.com/ThinkInAIXYZ/deepchat
Setup guide:
In DeepChat, go to MCP Settings and click Add.
On the Add Server page, click Skip to manual configuration.
Server type: Select Streamable HTTP Request (HTTP).
Base URL: Enter the sandbox URL.
(Format:
https://<account ID>.agentrun-data.<region>.aliyuncs.com/templates/<sandbox name>/mcp)
Other MCP-compatible Agents, such as Claude Desktop and Cursor.
Orchestration frameworks such as Dify, n8n, and LangChain.
Built-in Skills list
Built-in Skill | Description | Supported sandbox types |
Create, edit, and analyze Word documents. Supports revision tracking, comments, format preservation, and text extraction. | All | |
PDF toolkit. Supports text/table extraction, creation, merge/split, and form handling. | All | |
Create, edit, and analyze presentations. Supports content edits, layout adjustments, and comments. | All | |
Create, edit, and analyze workbooks. Supports formulas, formatting, data analytics, and visualization. | All | |
Write internal communication documents such as status reports, leadership updates, and newsletters. | All | |
Expert guide to building high-quality MCP servers. Supports Python (FastMCP) and Node.js/TypeScript. | All | |
Create production-ready frontend interfaces, including web components, pages, and applications. | All | |
filesystem | File system toolkit. Supports content search (grep/find/glob), batch file operations, and directory management. | All |
browseruse-expert | Browser automation expert. Uses structured accessibility trees to browse websites, fill forms, scrape data, and take screenshots. | Browser Sandbox / AIO Sandbox |
Stop the MCP service
On the sandbox page, click Stop Service to stop the MCP service. The sandbox template remains unchanged. You can restart it when needed.
Best practices
Limit the number of tools: Using fewer tools improves inference quality. Enable only the Skills that are relevant to the current task. Avoid mounting too many tools at once.
Consider AIO Sandbox performance: The AIO Sandbox includes browser capability. Its built-in Agent may automatically invoke browser tools, which can result in slightly longer response times compared to the Code Interpreter Sandbox. If your task does not involve web operations, consider using the Code Interpreter Sandbox instead.
Sandbox idle timeout: Sandbox instances automatically shut down after 30 minutes of inactivity. You can adjust this timeout when you create the template (the default sandbox TTL is 6 hours). After a sandbox shuts down, a new call automatically restarts it.