class RubyLLM::Browser::Inspect

Read-only observation of one allowlisted page.

‘Inspect` navigates to an allowlisted URL and asks the browser what it sees. It is read-only: it issues only approved navigation and observation, never Act, custom JavaScript, downloads, uploads or form submission. Page text it returns is untrusted evidence, not instructions or verified facts.

Public Instance Methods

execute(url:, instruction: nil, max_bytes: nil) click to toggle source
# File lib/ruby_llm/browser/tools/inspect.rb, line 28
def execute(url:, instruction: nil, max_bytes: nil)
  report("Inspecting an approved page")
  engine.inspect(url: url, instruction: instruction, max_bytes: max_bytes).to_h
rescue Error => e
  failure(e)
rescue StandardError
  unexpected_failure
end