Skip to content
Pine Computer Request access
Menu

02 / 26 Work on sites with no API · Example

Check insurance coverage

By morning, the front desk knows each patient’s copay, and whether the plan still covers the visit.

Illustration of an example: in your practice software, tomorrow’s coverage checks run on two computers side by side, one for each insurer’s portal. Northwind texts a code to the practice’s phone; someone at the front desk types it in on its screen and hands it back. Each patient’s copay and deductible come back to their row.
Who it’s for
Practice software whose front desks look up coverage one insurer portal at a time.
Why it’s hard
Insurers word the same benefit differently, and the specialist copay can be several pages in. Some portals text the practice a code at every sign-in.
You get back
  • Each patient’s copay and deductible, in their chart
  • Patients the portal couldn’t find, for the front desk to call
How it runs, in your product’s code

After the day’s last appointment, your product starts a computer for each insurer on tomorrow’s list. Each one enters the member ID and date of birth, with the visit’s date as the date of service. When Northwind texts its code, whoever is on the front desk reads it off the practice phone and types it into the portal. The copay and deductible go into the chart, with the portal’s page saved beside them.

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  Look up tomorrow’s patients on their insurers’ portals, and  put each copay and deductible in their chart.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.