Module: AgentSandbox::RubyLLMTools

Defined in:
lib/agent_sandbox/ruby_llm_tools.rb

Overview

Wraps a Sandbox as a set of RubyLLM tools so an LLM can drive it directly.

sandbox = AgentSandbox.new(backend: :docker)
chat = RubyLLM.chat(model: "claude-opus-4-7")
chat.with_tools(*AgentSandbox.ruby_llm_tools(sandbox))

Defined Under Namespace

Classes: Base, Exec, PortUrl, ReadFile, WriteFile

Class Method Summary collapse

Class Method Details

.build(sandbox) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/agent_sandbox/ruby_llm_tools.rb', line 10

def self.build(sandbox)
  [
    Exec.new(sandbox),
    WriteFile.new(sandbox),
    ReadFile.new(sandbox),
    PortUrl.new(sandbox)
  ]
end