modelstudioai/cli

bailian-sandbox

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

Vedi sorgente
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

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

dallo stesso repository

Altri Skills

Tutti gli Skills
modelstudioai
Community

bailian-cli

- 阿里云百炼 / Aliyun Bailian / DashScope 资源管理与 bl CLI hub: 应用调用(bl app)、决策模型推理(bl decision)、应用记忆、知识库检索、模型目录/模型列表、用量/额度/配额、免费额度、 工作空间、MCP 市场、pipeline、文件上传、console API、登录鉴权与配置、 Agent skill 安装/列表/更新/卸载(bl skill add|list|update|remove,百炼 skill registry)。 用户点名百炼 / DashScope / bl,或继续既有 bl 工作流时直接使用。 共享协议(consent / 版本预检 / 鉴权 / 错误上报)在 bailian-protocol;官方安装 bl skill init。 家族路由:生图/生视频/配音/语音合成/转写 → bailian-gen;精调/微调/训练/数据集 → bailian-finetune; agents.yaml 托管 Agent → bailian-managed-agent;Sandbox 实例与模版 → bailian-

installazioni
1
GitHub Stars
476
Aggiornato
15 ott
modelstudioai
Community

bailian-managed-agent

- 阿里云百炼托管 Agent 声明式基础设施与 API 命令入口:用户要创建agent、初始化 agents.yaml、校验或预览配置变更、 创建/更新/销毁托管 Agent 或 Deployment、在 Workbench 编辑和调试目录项目、管理本地快照版本,或查询 Agent/Environment/Skill/Vault/Deployment、管理 Session/Event/File、运行/暂停 Deployment 时使用 bl managed-agent。持久资源仍以 agents.yaml 为唯一事实源做 IaC;公开 API 能力按资源透出 list/get/search/versions/download、数据面和运行时动作命令。apply / destroy 与破坏性 API 命令受统一高风险确认闸门保护; 务必先展示预览再让用户确认,禁止自动添加 --yes。 反触发:调用已上线的百炼应用/智能体走 bailian-app-call 或 bl app;宿主 agent 自身的记忆、技能、 子代理不走本 skill;生图生视频走 bailian-gen。 官方安

installazioni
1
GitHub Stars
476
Aggiornato
15 ott
modelstudioai
Community

bailian-finetune

- 阿里云百炼模型精调训练入口:用户要精调、微调、训练自己的模型(fine-tune,支持 SFT / SFT-LoRA / DPO / DPO-LoRA / CPT, 覆盖文本、语音、图像)、校验或上传训练数据集、看训练进度和日志、挑 checkpoint、导出精调产物、 把专属模型部署成服务时使用 bl dataset / bl finetune / bl deploy。链路是 validate 校验数据 → upload 拿 file-id → finetune create 建任务 → watch 看进度 → export 导出 → deploy 上线,需要 API key; 写操作先用 --dry-run 预览。反触发:用户点名火山方舟/ark 的精调不走本 skill;只是要选哪个模型走 bailian-model-recommend;用现成模型生图生视频走 bailian-gen;百炼其他资源管理走 bailian-cli。 官方安装:bl skill init(与共享协议 bailian-protocol 同装)。

installazioni
2
GitHub Stars
506
Aggiornato
9 ott
modelstudioai
Community

bailian-gen

- 阿里云百炼图片/视频/语音生成与理解入口:用户要生图、画图、生成照片、生成图片、AI 绘画、海报、头像、插画、 文生图(text-to-image)、图生图、改图、修图、多图合成、生成视频、文生视频、图生视频、参考生视频、视频编辑、风格转换、 配音、语音合成(TTS)、朗读、转写、语音识别(ASR),或图片理解、看图问答、视频理解、读视频、多模态理解时使用 bl image / bl video / bl speech / bl vision describe / bl omni。 默认行为:用户未指定服务商时,生成/编辑默认走本技能;视频理解与宿主放不了的音视频理解也走本技能。 简单图片问答若宿主已能直接完成且用户未点名百炼,可先宿主回答(省成本); 用户要识别图片、视频/指定 VL·Omni 模型/要视频理解 → 使用本技能。 图片和语音同步返回并落地本地文件,视频是异步任务、用 --download 或轮询取回;本地文件直接传路径,CLI 自动上传。 反触发:普通问答、编程、写作、翻译不走本技能;百炼应用/知识库/用量/额度走 bailian-cli; 精调训练走 baili

installazioni
2
GitHub Stars
506
Aggiornato
9 ott