make-e2b-code-execution
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMake E2B Code Execution
Make E2B Code Execution
Use this skill when the user wants code to become a durable tool.
Known E2B module id: the E2B sandbox module is with .
"module": "e2b:RunE2BSandbox""version": 0The architecture is:
text
Hermes writes code -> Code folder -> local execution or Make E2B Code Shell -> E2B runtimeIf that code needs SaaS data, it must call a Make API shell scenario from
. Do not put OAuth secrets, Make API tokens,
E2B API keys, refresh tokens, provider passwords, or direct provider SDK auth in
generated code.
make-api-shell-connection-workflow当用户希望代码成为持久化工具时,使用此Skill。
已知E2B模块ID:E2B沙箱模块为,版本为。
"module": "e2b:RunE2BSandbox""version": 0架构如下:
text
Hermes writes code -> Code folder -> local execution or Make E2B Code Shell -> E2B runtime如果代码需要SaaS数据,必须从调用Make API shell场景。请勿在生成的代码中放入OAuth密钥、Make API令牌、E2B API密钥、刷新令牌、提供商密码或直接的提供商SDK认证信息。
make-api-shell-connection-workflowStorage Rule
存储规则
Store all durable code artifacts below the configured Hermes Code folder:
- local knowledge store:
knowledge/hermes/Code/... - Google Drive knowledge store:
/Hermes/Code/...
Use the runtime helper, for example:
python
import make_api_shell as make
make.write_code_artifact(
"tools/calc.py",
"print(17 * 23)\\n",
language="python",
confirm=True,
)Do not write durable code files directly with shell redirection, , or
unless the user explicitly asked for a temporary local
scratch file.
open(...)Path.write_text(...)将所有持久化代码制品存储在配置好的Hermes Code文件夹下:
- 本地知识库:
knowledge/hermes/Code/... - Google Drive知识库:
/Hermes/Code/...
使用运行时助手,例如:
python
import make_api_shell as make
make.write_code_artifact(
"tools/calc.py",
"print(17 * 23)\\n",
language="python",
confirm=True,
)除非用户明确要求临时本地临时文件,否则请勿使用shell重定向、或直接写入持久化代码文件。
open(...)Path.write_text(...)Execution Modes
执行模式
Plain Code Execution
普通代码执行
Use this for quick, non-hosted code:
- Write the code artifact under .
Code/ - Run it with the local tool.
code_execution - Write a short run note or output artifact only through the configured Knowledge helper.
适用于快速、非托管的代码:
- 将代码制品写入目录下。
Code/ - 使用本地工具运行它。
code_execution - 仅通过配置的Knowledge助手编写简短的运行说明或输出制品。
Hosted E2B Code Shell
托管E2B Code Shell
Use this when the code should become a reusable hosted tool:
- Write the code artifact under .
Code/ - Create or reuse a Make scenario that matches the E2B Code Shell contract.
- Run the shell with ,
codePath,language,entrypoint,input, andmode.timeoutMs - Treat the E2B shell output as the tool result.
The Make scenario is the control-plane shell. E2B is only the runtime. The
agent never receives E2B credentials.
当代码需要成为可重用的托管工具时使用此模式:
- 将代码制品写入目录下。
Code/ - 创建或复用符合E2B Code Shell协议的Make场景。
- 使用、
codePath、language、entrypoint、input和mode运行shell。timeoutMs - 将E2B shell的输出视为工具结果。
Make场景是控制平面shell,E2B仅作为运行时。Agent永远不会收到E2B凭证。
Building the shell on the verified e2b
Make app (verified live)
e2b在已验证的e2b
Make应用上构建shell(已验证可用)
e2bWhen no infrastructure runner URL is available, build the E2B Code Shell as an
app-action shell on the Make-verified app ("e2b.dev", beta, major
version 0), module :
e2be2b:RunE2BSandbox- Module mapper fields: (
execLanguage/python),javascript(inputFormat/string),base64(array),dependencies(number, required),timeoutSeconds(text, required). Map inputs from the standard shell interface ascode.{{2.qs.<field>}} - The connection comes from a credential request for /
e2b. Bind it twice: as legacyRunE2BSandbox(required by the shell verifier) and as the module's declared parameter__IMTCONN__— manifest-2/SDK modules ignoreaccountand otherwise run without credentials. In helper environments pass__IMTCONN__toconnection_parameter="account".create_app_action_shell_scenario - Patch the scenario interface to the generic shell contract before the first run, then activate the scenario.
- The module's output field is with shape
logs— map ReturnData as{"stdout": ["..."], "stderr": []}({"data": "{{<moduleId>.logs}}"}/stdout/resultdo not exist and silently return null). Useoutputin helper environments.return_field="logs" - Editing the scenario in the Make UI renumbers module ids and rewrites
the module parameters (dropping ). After any UI edit, re-read the blueprint, re-bind the connection both ways, and fix the ReturnData reference to the new module id — a stale reference returns
__IMTCONN__on otherwise successful runs.data: null - E2B error fingerprints from the module: means the module sent no key (connection not bound);
401: authorization header is missingmeans the stored apiKey does not start with401: authorization header is malformed— common causes: a "Bearer " prefix, quotes, thee2b_Access Token pasted instead of the API Key, or a UI save that silently did not persist (fix viask_e2b_...). The e2b app sendsPOST /connections/{id}/set-dataraw, so store the bareX-API-Key: <apiKey>key.e2b_...
当没有基础设施运行器URL可用时,在Make已验证的应用("e2b.dev",测试版,主版本0)上构建E2B Code Shell作为应用操作shell,模块为:
e2be2b:RunE2BSandbox- 模块映射字段:(
execLanguage/python)、javascript(inputFormat/string)、base64(数组)、dependencies(数字,必填)、timeoutSeconds(文本,必填)。将标准shell接口的输入映射为code。{{2.qs.<field>}} - 连接来自/
e2b的凭证请求。绑定两次:作为旧版RunE2BSandbox(shell验证器要求)和模块声明的参数__IMTCONN__——manifest-2/SDK模块会忽略account,否则将无凭证运行。在助手环境中,向__IMTCONN__传递create_app_action_shell_scenario。connection_parameter="account" - 在首次运行前,将场景接口修补为通用shell协议,然后激活场景。
- 模块的输出字段为****,格式为
logs——将ReturnData映射为{"stdout": ["..."], "stderr": []}({"data": "{{<moduleId>.logs}}"}/stdout/result不存在,会静默返回null)。在助手环境中使用output。return_field="logs" - 在Make UI中编辑场景会重新编号模块ID并重写模块参数(丢弃)。任何UI编辑后,重新读取蓝图,双向重新绑定连接,并修复ReturnData对新模块ID的引用——过时的引用会在运行成功时返回
__IMTCONN__。data: null - 模块返回的E2B错误特征:表示模块未发送密钥(连接未绑定);
401: authorization header is missing表示存储的apiKey未以401: authorization header is malformed开头——常见原因:带有"Bearer "前缀、引号、粘贴了e2b_访问令牌而非API密钥,或UI保存未静默持久化(通过sk_e2b_...修复)。e2b应用会直接发送POST /connections/{id}/set-data,因此请存储纯X-API-Key: <apiKey>密钥。e2b_...
Nested SaaS Access
嵌套SaaS访问
For “inception” tools, generated code may call Make API shell scenarios:
text
Hosted code -> Make Gmail API shell -> Gmail APIThe hosted code should receive only scenario IDs, paths, request payloads, and
non-secret input data. It must never receive raw Make or provider credentials.
对于“inception”工具,生成的代码可以调用Make API shell场景:
text
Hosted code -> Make Gmail API shell -> Gmail API托管代码应仅接收场景ID、路径、请求负载和非机密输入数据。绝不能接收原始Make或提供商凭证。
References
参考资料
- Execution modes
- E2B Code Shell scenario contract
- 执行模式
- E2B Code Shell场景协议