Module: AgentSandbox
- Defined in:
- lib/agent_sandbox.rb,
lib/agent_sandbox/sandbox.rb,
lib/agent_sandbox/version.rb,
lib/agent_sandbox/backends/e2b.rb,
lib/agent_sandbox/browser_tools.rb,
lib/agent_sandbox/ruby_llm_tools.rb,
lib/agent_sandbox/backends/docker.rb
Defined Under Namespace
Modules: Backends, BrowserTools, RubyLLMTools Classes: AuthError, ConnectError, Error, ExecError, ExecResult, HttpError, Sandbox, SandboxNotFound, ServerError, TimeoutError, UnsupportedOperation
Constant Summary collapse
Class Method Summary collapse
-
.browser_tools(sandbox, vision_model: nil) ⇒ Object
Browser control tools (navigate / click / fill / snapshot / …) backed by Vercel’s agent-browser CLI.
- .new(backend: :docker, **opts) ⇒ Object
- .ruby_llm_tools(sandbox) ⇒ Object
Class Method Details
.browser_tools(sandbox, vision_model: nil) ⇒ Object
Browser control tools (navigate / click / fill / snapshot / …) backed by Vercel’s agent-browser CLI. Requires the sandbox to use a browser- capable image — see docker/browser.Dockerfile.
Pass ‘vision_model:` to override the multimodal model used by `screenshot` / `read_image`. Default: ENV or “gpt-5”.
68 69 70 71 |
# File 'lib/agent_sandbox.rb', line 68 def self.browser_tools(sandbox, vision_model: nil) require "agent_sandbox/browser_tools" BrowserTools.build(sandbox, vision_model: vision_model) end |
.new(backend: :docker, **opts) ⇒ Object
51 52 53 54 |
# File 'lib/agent_sandbox.rb', line 51 def self.new(backend: :docker, **opts) klass = BACKENDS.fetch(backend) { raise Error, "unknown backend #{backend.inspect}" } Sandbox.new(klass.new(**opts)) end |
.ruby_llm_tools(sandbox) ⇒ Object
56 57 58 59 |
# File 'lib/agent_sandbox.rb', line 56 def self.ruby_llm_tools(sandbox) require "agent_sandbox/ruby_llm_tools" RubyLLMTools.build(sandbox) end |