Bailian Sandbox logo

Bailian Sandbox

Organization
modelstudioai
bailian-sandbox

阿里云百炼 Sandbox 沙箱实例与模版生命周期管理入口:用户要创建、查询、连接、暂停、恢复或释放百炼沙箱, 或查看内置基础镜像、上传模版挂载文件、创建、更新、查询、删除沙箱模版、查看模版构建状态时,使用 `bl sandbox`。 用户要访问已创建实例、打开 WebShell、连接 browser-use 浏览器自动化或 VNC 实时画面时,先获取连接信息,再连接数据面。 不用于宿主执行沙箱设置、E2B 官方云资源或通用文件传输。 agents.yaml 托管 Agent / Session / Environment 管理交给 bailian-managed-agent。 官方安装:`bl skill init`(与共享协议 bailian-protocol 同装)。

Overview

Publishermodelstudioai
Repositorycli
Skill namebailian-sandbox
Stars
538
Forks
36
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by modelstudioai on GitHub. Read the source before you install it.

Installation

Install the Bailian Sandbox AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/modelstudioai/cli/tree/main/skills/bailian-sandbox
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/modelstudioai/cli.git /tmp/cli
mkdir -p .claude/skills
cp -r /tmp/cli/skills/bailian-sandbox .claude/skills/bailian-sandbox
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bailian Sandbox in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bailian Sandbox on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bailian Sandbox is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Bailian Sandbox (bl sandbox)

Before running bl, read the shared bailian-protocol for consent, high-risk confirmation, version checks, authentication, and error handling. If it is missing, stop execution and prompt the user to install the full family with bl skill init.

Scope and setup

  • Manage Sandbox instances and templates through Bailian's E2B-compatible REST control plane. No E2B SDK or E2B API key is required; authentication uses the Bailian API Key as an Authorization Bearer token.
  • Resolve Base URL through the same CLI chain as Managed Agent: --base-url > DASHSCOPE_BASE_URL > login/profile base_url. Use an origin such as https://workspace.cn-beijing.maas.aliyuncs.com; the CLI strips URL paths/query/fragment and appends /api/v1/agentstudio/sandbox for lifecycle operations, or /api/v1/agentstudio/files for template file uploads. The saved API Key is reused. Profile capability fallback follows the shared protocol for both the key and Base URL.
  • If no Base URL is configured, resolve the workspace from --workspace-id, then BAILIAN_WORKSPACE_ID, then configured workspace_id, and use https://{workspace_id}.cn-beijing.maas.aliyuncs.com/api/v1/agentstudio/sandbox. With a configured Base URL, the workspace flag is optional. The service currently supports cn-beijing and requires prior Sandbox SLR authorization.
  • No agents.yaml or local IaC state is required. get / connect return instance connection information; neither opens an interactive shell or browser. For WebShell, CDP, or VNC, use that information with the runtime APIs described below. Do not invent bl sandbox exec, webshell, or browser subcommands.

Choose the operation

User intentCommand family
Discover built-in base image presetsbl sandbox official-images (offline, no authentication)
Upload a local file for template mountsbl sandbox file upload
Inspect or create instancesbl sandbox list / get / create
Connect, pause, or resume an instancebl sandbox connect / pause / resume
Release an instancebl sandbox delete
Inspect or build templatesbl sandbox template list / get / create / update
Check a submitted template buildbl sandbox template build-status
Delete a templatebl sandbox template delete

Read reference/index.md and the relevant section of reference/sandbox.md for exact flags, usage, and examples, or run the matching command with --help. Do not guess flags.

To save the origin in an isolated Profile, use bl auth login --config sandbox --api-key <key> --base-url <origin>. For a one-command override, use bl sandbox list --base-url <origin>. Custom gateways also apply to template build-status polling.

For built-in template images, discover the preset ID or Chinese name through sandbox official-images, then pass it to template create/update with --image. This fills both fromImage and imageName; --image-name alone remains a display name, not an image selector. Presets override the body's image fields; explicit --from-image / --image-name override the corresponding preset fields. Presets are pinned cn-beijing image URLs, not a live catalog or an availability guarantee for other environments. Omitting --image does not change existing defaults or update a template's image implicitly. See the generated reference for the catalog and exact flags.

Connect to an instance

For requests to access a running instance, open WebShell, control a browser, or show its live desktop, read assets/instance-connections.md. It contains the connection workflow, API payloads, verification steps, and official documentation links.

  • Obtain fresh JSON with bl sandbox get --sandbox-id <id> --show-credentials --output json. Use envdAccessToken as X-Access-Token; the control-plane Bailian API Key is a different credential.
  • WebShell uses the returned envdUrl and envd PTY RPCs. The official browser template uses port 3000 on {port}-{sandboxID}.{domain} for CDP and VNC. These ports and paths come from the template contract, not fields returned by get; do not apply them to other images without checking their documentation.
  • When the user asks to open or access the instance, complete the connection and verify a terminal command or rendered browser page. Returning connection JSON or a successful health check alone does not complete that request. A local proxy URL is a host-side access page, not a URL returned by the Sandbox API.

Operational boundaries

  • Mutating commands act on remote resources. Only perform the requested operation and scope; read-only discovery does not authorize creating, pausing, resuming, or deleting resources.
  • Instance and template deletion are high-risk. Follow the shared protocol: show the exact target and risk, then wait for explicit confirmation before adding --yes. Treat requires_confirmation as a stop signal, not a reason to retry automatically.
  • Connection credentials are redacted by default. A request to connect to or access the instance needs the tokens: use --show-credentials for that operation, capture the result privately, and keep tokens out of chat summaries, logs, URLs, and committed files.
  • Template create/update wait by polling the build-status endpoint, not template details. --async returns after the submission response with templateID / buildID; it does not mean the build is ready. Use those IDs with template build-status to check completion.
  • Global --timeout limits HTTP requests and total template-build polling. --instance-timeout sets instance lifetime; these are different limits. A polling timeout does not prove the remote build failed or stopped; check its status before submitting another build.
  • --body accepts a JSON object inline or through @path; explicit flags override body fields. For local template mounts, first use bl sandbox file upload: it sends multipart file and fixed source=sandbox_template directly to /api/v1/agentstudio/files with the Bailian API Key. Use the returned id as mntConfig[].originFileId, with mountPath and optional originFileName, in template create/update --body. The upload and template must use the same workspace. This is not the temporary OSS upload from bl file upload or a transfer into a running instance.
  • File upload returns immediately after the upload response and does not poll security review. status=checking is not ready to mount; only use files whose status is available. --quiet returns the File ID only; inspect the normal/JSON response for status. Upload alone does not authorize creating a template or instance.

Common hand-offs

Refer to sibling skills by name: read them if installed; otherwise use the command's --help or prompt bl skill init.

  • Managed Agent / Session / Environment resources or agents.yaml IaC → bailian-managed-agent (bl managed-agent --help).
  • Workspace discovery or CLI login/configuration → bailian-cli (bl workspace --help / bl auth --help / bl config --help).

references

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Bailian Sandbox AI skill do?

阿里云百炼 Sandbox 沙箱实例与模版生命周期管理入口:用户要创建、查询、连接、暂停、恢复或释放百炼沙箱, 或查看内置基础镜像、上传模版挂载文件、创建、更新、查询、删除沙箱模版、查看模版构建状态时,使用 `bl sandbox`。 用户要访问已创建实例、打开 WebShell、连接 browser-use 浏览器自动化或 VNC 实时画面时,先获取连接信息,再连接数据面。 不用于宿主执行沙箱设置、E2B 官方云资源或通用文件传输。 agents.yaml 托管 Agent / Session / Environment 管理交给 bailian-managed-agent。 官方安装:`bl skill init`(与共享协议 bailian-protocol 同装)。

Why use Bailian Sandbox on TypingMind?

Because you install it once and use it with any model. Bailian Sandbox is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bailian Sandbox in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/modelstudioai/cli/tree/main/skills/bailian-sandbox. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Bailian Sandbox?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bailian Sandbox?

As many as you like. As long as a model supports skills, you can use Bailian Sandbox with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bailian Sandbox AI skill free?

Yes. It is published on GitHub by modelstudioai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇