Skip to content
Pine Computer Request access
Menu

13 / 26 Documents and data · Example

Extract statement tables

The bookkeeper gets the quarter’s bank and broker statements as one workbook, every figure traced to its page.

Illustration of an example: in your bookkeeping software, the quarter’s statements for three accounts become one Excel workbook, a sheet per account. Your customer signs in to Kestrel Bank when the computer asks. Each line goes into its sheet with the page it came from, Stonecrop’s table across three pages included, and each sheet’s total is checked against the closing balance printed on its statement. The savings sheet misses it, and is flagged.
Who it’s for
Bookkeeping software whose users retype bank and broker statements into spreadsheets every quarter.
Why it’s hard
Stonecrop’s holdings table runs across several pages, with column headings only on the first. A wrong digit in a running balance is hard to spot later.
You get back
  • One Excel workbook, with a sheet for each account
  • Any sheet whose total misses the closing balance, flagged
How it runs, in your product’s code

At quarter end, your product hands a computer the list of accounts. Kestrel Bank shows statements to account holders only, so your customer signs in to it. Every table goes into the workbook with its page number, Stonecrop’s multi-page one included. Each sheet’s total is compared with the closing balance printed on its statement.

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  Download this quarter’s statements for each of this business’s  accounts, and put every table in one workbook, a sheet per  account.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.