Expand description
E2B code execution sandbox integration for Synaptic.
Provides E2BSandboxTool which executes code in isolated E2B cloud environments.
Each tool call creates a fresh sandbox, runs the code, and destroys the environment.
§Example
ⓘ
use synaptic_e2b::{E2BConfig, E2BSandboxTool};
use synaptic_core::Tool;
let config = E2BConfig::new("your-api-key")
.with_template("python")
.with_timeout(30);
let tool = E2BSandboxTool::new(config);
let result = tool.call(serde_json::json!({
"code": "print(sum(range(1, 101)))",
"language": "python"
})).await?;
// {"stdout": "5050\n", "stderr": "", "exit_code": 0}Structs§
- E2BConfig
- Configuration for the E2B sandbox.
- E2BSandbox
Tool - E2B sandbox tool for executing code in isolated cloud environments.