Skip to content
Pine Computer Request access
Menu

01 / 26 Work on sites with no API · Example

Renew permits

Your customer clicks Renew once, and every permit due this quarter is renewed on its own city’s portal.

Illustration of an example: in your customer’s property software, three permits are renewed at once, each on a computer of its own working its city’s portal. The portal for 9 Pier Road asks for a sign-in; your customer signs in on its screen and hands it back. Each city’s receipt comes back to its permit’s row as a PDF.
Who it’s for
Property-management software whose customers still renew rental permits city by city, by hand.
Why it’s hard
No city portal has an API, and no two forms ask for the same things. The login is your customer’s, so they have to sign in themselves.
You get back
  • The city’s receipt, as a PDF on each permit’s row
  • Any permit a portal refused, with the portal’s message
A real run: New York City’s payment portal turns away a computer in Singapore and answers one in the United States, and the quarterly property tax bill comes back as a PDF. Cookbook 06: Computer in a new country
How it runs, in your product’s code

Your product starts a computer for each city, and they run side by side. Each one opens the portal, finds the permit and fills in the renewal from the sheet. If a portal wants a login, the permit’s row turns to “Needs you: sign-in”; your customer signs in on the screen under the list and hands it back. The receipt is saved as a PDF, and its permit number is matched to the sheet before the row says Renewed.

Ruby · task-turn excerpt
# Existing backend Computer and session; see setup docs.# saved_message_id is your durable ID for this request.computer.require_agent_protocol!agent = session.agentgoal = <<~JOB  Renew the rental permits on this sheet that expire this  quarter, and save each receipt as a PDF.JOBturn = agent.run(goal, idempotency_key: saved_message_id)# Persist turn.turn_id before waiting or leaving this process.turn = agent.wait(turn_id: turn.turn_id, timeout: 30)case turn.statewhen "running", "canceling"  # Schedule another wait for this turn ID.when "needs_input"  # Present turn.question; authorize any desktop handoff.  # When the user replies, answer this turn and save the new ID:  # agent.answer(turn_id: turn.turn_id, answer: reply.text)when "answered"  # Continue with turn.next_turn_id; do not resubmit the goal.when "completed"  turn.result.artifacts.each do |file|    bytes = session.read_file(file.fetch("relative_path"))    # Save bytes in your own file store before stopping.  end  # Verify the outputs and external state against the request.when "failed", "canceled"  # Record the outcome; check side effects before any retry.end

Requires a configured Computer, session and durable request ID. The comments mark application logic you supply; this excerpt does not implement storage, polling or human handoff. Agent integration · Saving outputs

Build more.
Hand AI the work.