Skip to content
Pine Computer Request access
Menu

Blog

Cookbook 06: Computer in a new country

Set the country for a Pine Computer and retrieve a New York property tax bill. Compare the recorded Singapore and US runs with Ruby code.

By The Pine Computer team · Updated

Cookbook 06: Computer in a new country

An accounting firm in Singapore keeps the books for clients in New York. This program fetches a property’s latest tax bill from New York City’s payment portal.

Run on a computer in Singapore, the portal turns it away with its own Access Denied page. The program prints what the site said and stops the computer. One word changes, "SG" to "US", and the same program runs again. This time the portal answers: the AI finds the property through the City Register, opens its quarterly bill and saves it as a PDF, which comes back to the Mac in a zip. Both runs were recorded on 8 October 2026.

The Ruby below is an excerpt from the October recording, not a current integration recipe. SDK setup and application helpers are omitted. Use the current agent API and file handling docs when building an integration.

Ruby
COUNTRY = "US"          # the browser's egress country
SITE    = "https://nycserv.nyc.gov/NYCServWeb/NYCSERVMain"

computer = pine.create_computer(location: { country: COUNTRY })
session  = computer.create_session(browser: true)
session.create_tab(url: SITE)

session.agent.run(<<~GOAL)
  We're an accounting firm in Singapore, doing a client's Q3 audit in New York.
  Open #{SITE} and find what 350 Fifth Avenue owes in property tax this year.
  Save the latest bill as a PDF in the working directory.
GOAL
session.agent.events { |e| break if e.terminal? }
puts session.agent.result["summary"]

puts session.exec("ls -lh *.pdf").stdout

File.binwrite("bill.zip", session.download_artifacts_zip)
puts "bill.zip is on this Mac"

gets
computer.stop

location sets the country the computer’s browser reaches the web from. This changes browsing location, not the storage location of your data. These two runs do not establish access to every regional service or a bot-challenge success rate. More in the docs.

More from the blog

Build more.
Hand AI the work.