Skip to content
Pine Computer Request access
Menu

22 / 26 Sales and marketing · Example

Monitor competitor prices

By six each morning, the price sheet shows what every rival charges for the same products.

Illustration of an example: your pricing software sends Pine Computer to each competitor’s site, from your user’s country, for every product on its list. Copperleaf Kitchen’s nearest match for the skillet comes with a lid, so the pricing manager decides on the live screen whether it counts. Each price lands in today’s sheet beside yesterday’s, with the page it was read from.
Who it’s for
Retail pricing software whose users keep pace with rivals that change prices without notice.
Why it’s hard
Rivals sell the same skillet in different packs, and only a like-for-like match is any use. Copperleaf prices by delivery country, so the check runs from where your user’s customers are.
You get back
  • Today’s prices beside yesterday’s, in the price sheet
  • The page behind every price
How it runs, in your product’s code

The computer searches each competitor’s site for every product on the list, from your user’s country. It reads the price and the stock, and compares the pack with your user’s own. When Copperleaf’s nearest match is the skillet with a lid, the row turns to “Needs you: a match”, and the pricing manager decides on the live screen whether it counts.

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  Record each competitor’s price for every product on our list  in today’s sheet.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.