6K Star!把所有组件塞进同一个容器的 Agent 沙箱
原创
繁星
繁星
繁星AI随笔
2026年9月25日 11:55
山东
在小说阅读器读本章
去阅读
在公众号小说中沉浸阅读
给 AI Agent 搭执行环境,大概率会遇到一个琐碎又烦人的问题:
浏览器自动化跑在一套容器里,代码执行放进另一套沙箱,文件存储再单独挂第三个服务。
浏览器下载的文件,Shell 脚本拿不到。
Jupyter 生成的结果,也要多搬一步,才能交给浏览器工具使用。
今天介绍的开源项目:AIO Sandbox 正是为了解决这个问题而生。
01 项目介绍
AIO Sandbox 是一个一体化的智能体沙箱环境。
它在单个 Docker 容器中整合了浏览器、Shell、文件操作、MCP 操作和 VSCode Server。
基于云原生轻量级沙箱技术构建,为 AI Agent 和开发人员提供统一、安全的执行环境。
作者 / 组织:agent-infra。
02 项目亮点
1.统一环境:
所有组件在同一容器内运行,共享文件系统,实现无缝工作流。
2.浏览器自动化:
通过多种接口实现全面的浏览器控制:
VNC:通过远程桌面进行可视化浏览器交互。
CDP:Chrome 开发者工具协议,用于程序化控制。
MCP:高级浏览器自动化工具。
3.MCP 集成:
Browser:Web 自动化与数据抓取。
File:文件系统操作。
Shell:命令执行。
Markitdown:文档处理。
03 快速入门
1.安装:
# Pythonpip install agent-sandbox
# TypeScript/JavaScriptnpm install @agent-infra/sandbox
# Gogo get github.com/agent-infra/sandbox-sdk-go
2.使用:
# Pythonfrom agent_sandbox import Sandbox
# Initialize clientclient = Sandbox(base_url=\"http://localhost:8080\")home_dir = client.sandbox.get_context().home_dir
# Execute shell commandsresult = client.shell.exec_command(command=\"ls -la\")print(result.data.output)
# File operationscontent = client.file.read_file(file=f\"{home_dir}/.bashrc\")print(content.data.content)
# Browser automationscreenshot = client.browser.screenshot()
# TypeScriptimport { Sandbox } from '@agent-infra/sandbox';
// Initialize clientconst sandbox = new Sandbox({ baseURL: 'http://localhost:8080' });
// Execute shell commandsconst result = await sandbox.shell.exec({ command: 'ls -la' });console.log(result.output);
// File operationsconst content = await sandbox.file.read({ path: '/home/gem/.bashrc' });console.log(content);
// Browser automationconst screenshot = await sandbox.browser.screenshot();
04 结语
AIO Sandbox 的价值在于:它解决了一个非常基础的问题。
让 Agent 用到的工具们,能看见同一份文件系统。
# 开源地址:https://github.com/agent-infra/sandbox
我是繁星,关注我,获取更多好玩有趣的开源仓库!
谢谢你阅读我的文章~
我们下期再见!
版权声明
本站仅做备份收录,仅供研究与教学参考之用。
读者将信息用于其他用途的,全部法律及连带责任由读者自行承担,本站不承担任何责任。









评论